GNU bug report logs - #50667
Update ecomplete when used via standard UI

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 18 Sep 2021 21:02:01 UTC

Severity: normal

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50667 in the body.
You can then email your comments to 50667 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Sat, 18 Sep 2021 21:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 Sep 2021 21:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Update ecomplete when used via standard UI
Date: Sat, 18 Sep 2021 23:01:30 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

If one keeps sets

    (setq message-mail-alias-type nil ;; or keep the default 'abbrev
          message-expand-name-standard-ui t)

and an ecomplete database file, then everything works OOTB, except that
the ecomplete database doesn't get updated with new addresses.

Is the following change a reasonable fix for this?

[0001-gnus-message.el-message-send-Always-update-ecomplete.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Sat, 18 Sep 2021 21:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 50667 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50667 <at> debbugs.gnu.org
Subject: Re: bug#50667: Update ecomplete when used via standard UI
Date: Sat, 18 Sep 2021 23:06:58 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> If one keeps sets
>
>     (setq message-mail-alias-type nil ;; or keep the default 'abbrev
>           message-expand-name-standard-ui t)
>
> and an ecomplete database file, then everything works OOTB,

Works in what way?

> except that the ecomplete database doesn't get updated with new
> addresses.
>
> Is the following change a reasonable fix for this?

[...]

> -      (when (and (message-mail-alias-type-p 'ecomplete)
> +      (when (and (bound-and-true-p ecomplete-database)

I think this would be highly surprising behaviour -- just loading a
library shouldn't have such side effects.

What's your use case here?  You don't want to use ecomplete for alias
expansions, but you still want to update the ecomplete database?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Sat, 18 Sep 2021 21:36:02 GMT) Full text and rfc822 format available.

Message #11 received at 50667 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50667 <at> debbugs.gnu.org
Subject: Re: bug#50667: Update ecomplete when used via standard UI
Date: Sat, 18 Sep 2021 23:35:51 +0200
On Sat, 18 Sep 2021 at 23:06, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
>> If one keeps sets
>>
>>     (setq message-mail-alias-type nil ;; or keep the default 'abbrev
>>           message-expand-name-standard-ui t)
>>
>> and an ecomplete database file, then everything works OOTB,
>
> Works in what way?

If I hit TAB in an address field, my completion UI kicks in and I can
choose an address from the ecomplete database.

>
>> except that the ecomplete database doesn't get updated with new
>> addresses.
>>
>> Is the following change a reasonable fix for this?
>
> [...]
>
>> -      (when (and (message-mail-alias-type-p 'ecomplete)
>> +      (when (and (bound-and-true-p ecomplete-database)
>
> I think this would be highly surprising behaviour -- just loading a
> library shouldn't have such side effects.

Loading ecomplete doesn't populate 'ecomplete-database'.  But if you set
'message-expand-name-standard-ui' to t, then 'ecomplete-start' will be
called when request completions.

>
> What's your use case here?  You don't want to use ecomplete for alias
> expansions, but you still want to update the ecomplete database?

I want to use ecomplete via completion at point instead of ecomplete's
electric UI.  This is what the variable
'message-expand-name-standard-ui' is meant for, right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Sun, 19 Sep 2021 15:11:02 GMT) Full text and rfc822 format available.

Message #14 received at 50667 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50667 <at> debbugs.gnu.org
Subject: Re: bug#50667: Update ecomplete when used via standard UI
Date: Sun, 19 Sep 2021 17:10:06 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

>>>     (setq message-mail-alias-type nil ;; or keep the default 'abbrev
>>>           message-expand-name-standard-ui t)
>>>
>>> and an ecomplete database file, then everything works OOTB,
>>
>> Works in what way?
>
> If I hit TAB in an address field, my completion UI kicks in and I can
> choose an address from the ecomplete database.

I think that's a bug -- I don't see anything in the documentation of
`message-expand-name-standard-ui' that says that that's going to use
ecomplete?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Sun, 19 Sep 2021 16:03:01 GMT) Full text and rfc822 format available.

Message #17 received at 50667 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 50667 <at> debbugs.gnu.org
Subject: Re: bug#50667: Update ecomplete when used via standard UI
Date: Sun, 19 Sep 2021 18:02:09 +0200
On Sun, 19 Sep 2021 at 17:10, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
>>>>     (setq message-mail-alias-type nil ;; or keep the default 'abbrev
>>>>           message-expand-name-standard-ui t)
>>>>
>>>> and an ecomplete database file, then everything works OOTB,
>>>
>>> Works in what way?
>>
>> If I hit TAB in an address field, my completion UI kicks in and I can
>> choose an address from the ecomplete database.
>
> I think that's a bug -- I don't see anything in the documentation of
> `message-expand-name-standard-ui' that says that that's going to use
> ecomplete?

Right, the docstring doesn't say anything but there is a NEWS entry
saying this is the intended behavior.

I've CCed Stefan, who introduced 'message-expand-name-standard-ui'.
Let's see what he says.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50667; Package emacs. (Fri, 05 Nov 2021 03:29:02 GMT) Full text and rfc822 format available.

Message #20 received at 50667 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50667 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#50667: Update ecomplete when used via standard UI
Date: Fri, 05 Nov 2021 04:28:41 +0100
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> If one keeps sets
>
>     (setq message-mail-alias-type nil ;; or keep the default 'abbrev
>           message-expand-name-standard-ui t)
>
> and an ecomplete database file, then everything works OOTB, except that
> the ecomplete database doesn't get updated with new addresses.

[...]

> -      (when (and (message-mail-alias-type-p 'ecomplete)
> +      (when (and (bound-and-true-p ecomplete-database)
>  		 (not message-inhibit-ecomplete))
>  	(message-put-addresses-in-ecomplete))

There wasn't any response for Stefan for what he was thinking when
adding the standard-ui variable 😀, but this can't be the correct
solution.  If message-mail-alias-type isn't 'ecomplete, there's nothing
to tell the code here that we want to put addresses in ecomplete.
Furthermore, this would break the functionality of that setting --
ecomplete-database will be nil when you start, so it'll never put
anything there.

So I think the right solution here (if you want to combine these two
things) is to put message-put-addresses-in-ecomplete into
message-sent-hook.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 50667 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 05 Nov 2021 03:29:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Dec 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.