From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Completion functions in message-mode Date: Fri, 13 Apr 2018 21:17:03 -0400 Message-ID: References: <20180323044822.32467.63948@vcs0.savannah.gnu.org> <20180323044823.1A70C20BDE@vcs0.savannah.gnu.org> <877eq3732w.fsf@ericabrahamsen.net> <87h8oer459.fsf_-_@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523671602 22696 195.159.176.226 (14 Apr 2018 02:06:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Apr 2018 02:06:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 14 04:06:38 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7AaM-0005nR-0J for ged-emacs-devel@m.gmane.org; Sat, 14 Apr 2018 04:06:38 +0200 Original-Received: from localhost ([::1]:46338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7AcS-0006bH-GG for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2018 22:08:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7AcK-0006ao-Un for emacs-devel@gnu.org; Fri, 13 Apr 2018 22:08:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f7AcG-0001Nd-U6 for emacs-devel@gnu.org; Fri, 13 Apr 2018 22:08:40 -0400 Original-Received: from [195.159.176.226] (port=46408 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f7AcG-0001NM-LO for emacs-devel@gnu.org; Fri, 13 Apr 2018 22:08:36 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f79mM-00005R-5H for emacs-devel@gnu.org; Sat, 14 Apr 2018 03:14:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:TLk/w7FfT8sFHqK2s+6a3OuF7oM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224575 Archived-At: > 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