GNU bug report logs - #63913
[PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only ding when appropriate.

Previous Next

Package: emacs;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Mon, 5 Jun 2023 17:56:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.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 63913 in the body.
You can then email your comments to 63913 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#63913; Package emacs. (Mon, 05 Jun 2023 17:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 05 Jun 2023 17:56:01 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only
 ding when appropriate.
Date: Mon, 05 Jun 2023 13:50:02 -0400
[Message part 1 (text/plain, inline)]
Hello,

I think this patch is self-explanatory.  In order to get the ding you
have to "(setopt completion-auto-help 'visible)" and try to complete
something successfully.  I was doing 'M-x eshell-command-mo <TAB>' to
complete the symbol eshell-command-mode.

I'm not sure if that's actually the complete minimal setup, but I don't
think you guys have to bother reproducing it since it's pretty obvious
my patch is an improvement.

[0001-lisp-minibuffer.el-minibuffer-completion-help-Only-d.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Thanks,

Morgan

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Mon, 05 Jun 2023 18:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Mon, 05 Jun 2023 21:50:50 +0300
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
> Date: Mon, 05 Jun 2023 13:50:02 -0400
> 
> I think this patch is self-explanatory.  In order to get the ding you
> have to "(setopt completion-auto-help 'visible)" and try to complete
> something successfully.  I was doing 'M-x eshell-command-mo <TAB>' to
> complete the symbol eshell-command-mode.
> 
> I'm not sure if that's actually the complete minimal setup, but I don't
> think you guys have to bother reproducing it since it's pretty obvious
> my patch is an improvement.

Sorry, no, it isn't obvious to me.  So please do provide a complete
recipe for reproducing the problem, starting frm "emacs -Q".

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Mon, 05 Jun 2023 19:10:01 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Mon, 05 Jun 2023 15:09:02 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>
> Sorry, no, it isn't obvious to me.  So please do provide a complete
> recipe for reproducing the problem, starting frm "emacs -Q".
>
> Thanks.

I apologize for my assumption.

emacs -Q
(setopt completion-auto-help 'visible)
(debug-on-entry 'ding) ;; just so we know when it dings

`M-x eshell` then spam TAB until the completion buffer pops up.  Now
type in enough to select a unique completion.  I'm completing
`eshell-command` so I'll make the minibuffer look like 'eshell-comman'.

Now press one final TAB to select the only available completion.  It
should ding.

Obviously it shouldn't ding in that situation since it is a success.
Also that situation doesn't respect completion-fail-discreetly if you
where to type in a failing completion before the final TAB press.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Tue, 06 Jun 2023 11:20:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Tue, 06 Jun 2023 14:19:50 +0300
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
> Cc: 63913 <at> debbugs.gnu.org
> Date: Mon, 05 Jun 2023 15:09:02 -0400
> 
> emacs -Q
> (setopt completion-auto-help 'visible)
> (debug-on-entry 'ding) ;; just so we know when it dings
> 
> `M-x eshell` then spam TAB until the completion buffer pops up.  Now
> type in enough to select a unique completion.  I'm completing
> `eshell-command` so I'll make the minibuffer look like 'eshell-comman'.
> 
> Now press one final TAB to select the only available completion.  It
> should ding.

I cannot reproduce this, in the latest build from the emacs-29 branch
(what will soon become Emacs 29.1).  In which version of Emacs do you
see this, and on what OS?

> Also that situation doesn't respect completion-fail-discreetly if you
> where to type in a failing completion before the final TAB press.

Recipe, please.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Tue, 06 Jun 2023 19:09:02 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Tue, 06 Jun 2023 15:08:26 -0400
[Message part 1 (text/plain, inline)]
I'm running on commit 7ca1d782f5910d0c3978c6798a45c6854ec668c7 from the
master branch.

I really hoping you can reproduce it with this:

[0001-Add-test-for-when-completion-auto-help-is-visible.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
It should error out because apparently dings cause ert errors.  I did
not know that before but I am happy about it.

Eli Zaretskii <eliz <at> gnu.org> writes:

>
>> Also that situation doesn't respect completion-fail-discreetly if you
>> where to type in a failing completion before the final TAB press.
>
> Recipe, please.

I said this from a static analysis point of view but I couldn't seem to
reproduce this with a test.  It might be a dead code pathway but it
would still be nice for it to be correct.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Thu, 08 Jun 2023 10:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Jimmy Aguilar Mena <spacibba <at> aol.com>
Cc: 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Thu, 08 Jun 2023 12:59:46 +0300
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
> Cc: 63913 <at> debbugs.gnu.org
> Date: Tue, 06 Jun 2023 15:08:26 -0400
> 
> I'm running on commit 7ca1d782f5910d0c3978c6798a45c6854ec668c7 from the
> master branch.
> 
> I really hoping you can reproduce it with this:

Apologies, it sounds like my original testing was faulty, as I can now
reproduce your original recipe.  What's more, it happens in Emacs 29
as well.

I've added to the discussion folks that know more about this than I
do.  Stefan, Ergus: any comments to the issue or about the proposed
patch?  (I'm not sure we need to change the message when we do "ding",
but that's a separate issue, I think.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Thu, 08 Jun 2023 16:55:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>,
 Jimmy Aguilar Mena <spacibba <at> aol.com>, 63913 <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Thu, 08 Jun 2023 12:54:37 -0400
> I've added to the discussion folks that know more about this than I
> do.  Stefan, Ergus: any comments to the issue or about the proposed
> patch?  (I'm not sure we need to change the message when we do "ding",
> but that's a separate issue, I think.)

The patch looks good to me.  Thank you, Morgan.


        Stefan





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 10 Jun 2023 09:14:02 GMT) Full text and rfc822 format available.

Notification sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
bug acknowledged by developer. (Sat, 10 Jun 2023 09:14:02 GMT) Full text and rfc822 format available.

Message #28 received at 63913-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Morgan.J.Smith <at> outlook.com, spacibba <at> aol.com, 63913-done <at> debbugs.gnu.org
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Sat, 10 Jun 2023 12:13:04 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>,  Jimmy Aguilar Mena
>  <spacibba <at> aol.com>,  63913 <at> debbugs.gnu.org
> Date: Thu, 08 Jun 2023 12:54:37 -0400
> 
> > I've added to the discussion folks that know more about this than I
> > do.  Stefan, Ergus: any comments to the issue or about the proposed
> > patch?  (I'm not sure we need to change the message when we do "ding",
> > but that's a separate issue, I think.)
> 
> The patch looks good to me.  Thank you, Morgan.

Thanks, installed on the emacs-29 branch, and closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Sat, 10 Jun 2023 17:35:02 GMT) Full text and rfc822 format available.

Message #31 received at 63913-done <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spacibba <at> aol.com, 63913-done <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Sat, 10 Jun 2023 13:34:32 -0400
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>
> Thanks, installed on the emacs-29 branch, and closing the bug.

Would you also consider installing the test patch I sent previously?
I've reattached it here for your convenience.

[0001-Add-test-for-when-completion-auto-help-is-visible.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63913; Package emacs. (Sat, 10 Jun 2023 17:57:02 GMT) Full text and rfc822 format available.

Message #34 received at 63913-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: spacibba <at> aol.com, 63913-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#63913: [PATCH] * lisp/minibuffer.el
 (minibuffer-completion-help): Only ding when appropriate.
Date: Sat, 10 Jun 2023 20:56:26 +0300
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,  spacibba <at> aol.com,
>   63913-done <at> debbugs.gnu.org
> Date: Sat, 10 Jun 2023 13:34:32 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >
> > Thanks, installed on the emacs-29 branch, and closing the bug.
> 
> Would you also consider installing the test patch I sent previously?
> I've reattached it here for your convenience.

Installed.  But please in the future try to follow better our
conventions for log messages, to avoid the need for me to manually fix
the log message when installing:

 . always mention the bug number in the log message
 . quote symbols 'like this'
 . make sure the lines are not too long (they will be longer by 8
   columns when converted to a ChangeLog as part of tarring the
   release)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 09 Jul 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 292 days ago.

Previous Next


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