Re: Add integration to gnus-search library, if present
Eric Abrahamsen <[email protected]> Wed, 11 Nov 2020 08:28:31 -0800
| Newsgroups | gmane.emacs.bbdb.user |
|---|---|
| Message-ID | <[email protected]> |
Eric Abrahamsen <[email protected]> writes: > "Roland Winkler" <[email protected]> writes: > >> On Fri Nov 6 2020 Eric Abrahamsen wrote: >>> A package like BBDB is one step removed from this logic. Ideally its >>> only job should be to provide a table of contact-related strings that >>> the user might want to complete on. It shouldn't be involved in the >>> "downstream" logic of examining user input, etc. >> >> If that's the case, it might make sense to have a new variable >> bbdb-completion-at-point-hashtable the content of which bbdb users >> can customize similar to bbdb-completion-list. Then this customized >> hashtable can be made available to the "outside world" such as the >> gnus-search library. > > I've been thinking about this a bit: there's no need to create a new > hashtable, since all that's needed is a list of strings to complete on. > We also want this list to be dynamic so that it reflects updates to the > BBDB as the user makes them. > > The completion code provides a `completion-table-dynamic' function that > wraps a function and returns a completion table, and that could be the > ticket. I've attached another patch to show how that could work. (Just realized the function that collects strings should be catching 'bbdb-hash-ok, not just testing the return value, but that's a simple change.)