[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Completion functions in message-mode
From: |
Stefan Monnier |
Subject: |
Re: Completion functions in message-mode |
Date: |
Fri, 13 Apr 2018 21:17:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> message-mode adds message-expand-group and message-tab-body-function to
> `completion-at-point-functions'. Both of these functions check if
> they're in an appropriate location, and bail if not, allowing other
> functions to do their thing.
I think it's OK for Gnus to keep using message-completion-alist, but
message-expand-name should use a completion table which can be extended,
so EUDC, BBDB, ecomplete, and YouNameIt can add themselves to it.
> Packages such as EUDC and BBDB put their own functions in
> `completion-at-point-functions' (in the message-mode hook).
That doesn't sound right: the code which decides if we're inside
a message header, and which header contains email addresses, and how
they're separated (i.e. the code which knows about the format of
messages) should squarely belong to message-mode and not to
BBDB/EUDC/...
Instead these backends should only provide completion tables that
provide user names, email addresses, or such data.
I.e. the completion-at-point-function should come from message.el and
the completion-tables it returns should come from BBDB/EUDC/...
Stefan