GNU bug report logs - #5849
23.1.95; completion-auto-help blocks icomplete-mode

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Tue, 6 Apr 2010 15:33:01 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 5849 in the body.
You can then email your comments to 5849 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Tue, 06 Apr 2010 15:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 06 Apr 2010 15:33:01 GMT) Full text and rfc822 format available.

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

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Tue, 06 Apr 2010 16:31:55 +0100
1. Emacs -q -nw
2. (icomplete-mode t)
3. (setq completion-auto-help 'lazy)
4. M-x w TAB

The message from completion [Next char not unique] will block the hint
from icomplete mode.

Leo





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sat, 10 Apr 2010 17:25:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Leo <sdl.web <at> gmail.com>
Cc: 5849 <at> debbugs.gnu.org
Subject: Re: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 10 Apr 2010 13:24:22 -0400
> 1. Emacs -q -nw
> 2. (icomplete-mode t)
> 3. (setq completion-auto-help 'lazy)
> 4. M-x w TAB
>
> The message from completion [Next char not unique] will block the hint
> from icomplete mode.

Maybe completion-auto-help should do nothing if icomplete-mode is on.
What do you think?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sat, 10 Apr 2010 17:58:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>, "'Leo'" <sdl.web <at> gmail.com>
Cc: 5849 <at> debbugs.gnu.org
Subject: RE: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 10 Apr 2010 10:55:58 -0700
> > 1. Emacs -q -nw
> > 2. (icomplete-mode t)
> > 3. (setq completion-auto-help 'lazy)
> > 4. M-x w TAB
> >
> > The message from completion [Next char not unique] will 
> > block the hint from icomplete mode.
> 
> Maybe completion-auto-help should do nothing if icomplete-mode is on.
> What do you think?

That would be a terrible idea. That would mean not showing *Completions*.

If the value is `lazy' and you see [Next char not unique], that message just
lets you know that there are completions; hitting TAB a second time then shows
*Completions*.

If your suggestion were to just not show the message [Next char not unique] when
icomplete-mode is on, that would be different. In that case, OK. Yes, that
message is not really needed if icomplete-mode is showing possible completions.

But we certainly do not want to suppress display of *Completions* just because
icomplete-mode is on. That would be crazy.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sat, 10 Apr 2010 18:52:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 5849 <at> debbugs.gnu.org, 'Leo' <sdl.web <at> gmail.com>
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 10 Apr 2010 14:51:10 -0400
"Drew Adams" <drew.adams <at> oracle.com> writes:

> If your suggestion were to just not show the message [Next char not
> unique] when icomplete-mode is on

Yes, obviously this is what I meant.  Like this:

=== modified file 'lisp/minibuffer.el'
*** lisp/minibuffer.el	2010-03-24 18:02:56 +0000
--- lisp/minibuffer.el	2010-04-10 18:49:41 +0000
***************
*** 528,536 ****
                ;; Show the completion table, if requested.
                (cond
                 ((not exact)
!                 (if (case completion-auto-help
!                       (lazy (eq this-command last-command))
!                       (t completion-auto-help))
                      (minibuffer-completion-help)
                    (minibuffer-message "Next char not unique")))
                 ;; If the last exact completion and this one were the same, it
--- 528,537 ----
                ;; Show the completion table, if requested.
                (cond
                 ((not exact)
!                 (if (cond (icomplete-mode t)
! 			  ((eq completion-auto-help 'lazy)
! 			   (eq this-command last-command))
! 			  (t completion-auto-help))
                      (minibuffer-completion-help)
                    (minibuffer-message "Next char not unique")))
                 ;; If the last exact completion and this one were the same, it





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sat, 10 Apr 2010 19:33:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>
Cc: 5849 <at> debbugs.gnu.org, 'Leo' <sdl.web <at> gmail.com>
Subject: RE: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 10 Apr 2010 12:32:16 -0700
> > If your suggestion were to just not show the message
> > [Next char not unique] when icomplete-mode is on
> 
> Yes, obviously this is what I meant.  Like this:
> 
> (if (cond (icomplete-mode t)
>           ((eq completion-auto-help 'lazy)
>            (eq this-command last-command))
>           (t completion-auto-help))
>     (minibuffer-completion-help)
>   (minibuffer-message "Next char not unique")))

Yes, that's OK by me.
But either of these (equivalent) forms is clearer, IMO:

(if (or icomplete-mode
        (and completion-auto-help
             (or (not (eq completion-auto-help 'lazy))
                 (eq this-command last-command))))
    (minibuffer-completion-help)
  (minibuffer-message "Next char not unique"))

(if (or icomplete-mode
        (if (eq completion-auto-help 'lazy)
            (eq this-command last-command)
          completion-auto-help))
    (minibuffer-completion-help)
  (minibuffer-message "Next char not unique"))

---

And if we didn't care whether a non-t, non-`lazy', non-nil value calls
`minibuffer-completion-help', then this (not equivalent) would be OK too:

(if (or icomplete-mode
        (eq t completion-auto-help)
        (and (eq completion-auto-help 'lazy)
             (eq this-command last-command)))
    (minibuffer-completion-help)
  (minibuffer-message "Next char not unique"))





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sun, 11 Apr 2010 11:54:02 GMT) Full text and rfc822 format available.

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

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sun, 11 Apr 2010 12:53:10 +0100
On 2010-04-10 19:51 +0100, Chong Yidong wrote:
>> If your suggestion were to just not show the message [Next char not
>> unique] when icomplete-mode is on
>
> Yes, obviously this is what I meant.

The behaviour described is desirable. But it seems it will be better to
make minibuffer completion code more flexible instead of special-case
icomplete.

Leo






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Mon, 10 May 2010 06:59:02 GMT) Full text and rfc822 format available.

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

From: Leo <sdl.web <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5849 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Mon, 10 May 2010 07:58:49 +0100
On 2010-04-10 19:51 +0100, Chong Yidong wrote:
> "Drew Adams" <drew.adams <at> oracle.com> writes:
>
>> If your suggestion were to just not show the message [Next char not
>> unique] when icomplete-mode is on
>
> Yes, obviously this is what I meant.  Like this:
[...]

I wonder if it makes sense to always have the message from completion
append to the text in the minibuffer. For example, in this case, the
icomplete hint will go first and the completion message last.

This would seem to fix another problem seen in M-:. When users try to
complete while in minibuffer for example when using M-:, it switches to
show the completion message and blocks users from seeing the text they
are editing in the minibuffer.

Leo




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Fri, 23 Jul 2010 22:19:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5849 <at> debbugs.gnu.org, 'Leo' <sdl.web <at> gmail.com>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 24 Jul 2010 00:18:25 +0200
> Yes, obviously this is what I meant.  Like this:

> === modified file 'lisp/minibuffer.el'
> *** lisp/minibuffer.el	2010-03-24 18:02:56 +0000
> --- lisp/minibuffer.el	2010-04-10 18:49:41 +0000
> ***************
> *** 528,536 ****
>                 ;; Show the completion table, if requested.
>                 (cond
>                  ((not exact)
> !                 (if (case completion-auto-help
> !                       (lazy (eq this-command last-command))
> !                       (t completion-auto-help))
>                       (minibuffer-completion-help)
>                     (minibuffer-message "Next char not unique")))
>                  ;; If the last exact completion and this one were the same, it
> --- 528,537 ----
>                 ;; Show the completion table, if requested.
>                 (cond
>                  ((not exact)
> !                 (if (cond (icomplete-mode t)
> ! 			  ((eq completion-auto-help 'lazy)
> ! 			   (eq this-command last-command))
> ! 			  (t completion-auto-help))
>                       (minibuffer-completion-help)
>                     (minibuffer-message "Next char not unique")))
>                  ;; If the last exact completion and this one were the same, it

It's a good workaround, thanks.  Note that most other messages from the
completion code are similarly problematic, I think.  So maybe we should
have a buffer-local completion-inhibit-messages variable, which
icomplete could set in the minibuffer.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sun, 10 Apr 2011 21:31:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: 5849 <at> debbugs.gnu.org
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sun, 10 Apr 2011 17:30:46 -0400
I have checked in the patch that I posted earlier for this bug into the
emacs-23 branch, and a more complete fix into the trunk.  The latter
involves a new variable completion-show-inline-help, which
icomplete-mode binds to nil.




bug closed, send any further explanations to 5849 <at> debbugs.gnu.org and Leo <sdl.web <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 10 Apr 2011 21:32:01 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. (Mon, 09 May 2011 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Johan Bockgård <bojohan <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 09 Jul 2011 14:17:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sat, 09 Jul 2011 15:01:02 GMT) Full text and rfc822 format available.

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

From: Johan Bockgård <bojohan <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 5849 <at> debbugs.gnu.org
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sat, 09 Jul 2011 17:00:13 +0200
Chong Yidong <cyd <at> stupidchicken.com> writes:

> I have checked in the patch that I posted earlier for this bug into the
> emacs-23 branch, and a more complete fix into the trunk.  The latter
> involves a new variable completion-show-inline-help, which
> icomplete-mode binds to nil.

The fix in the trunk sets completion-show-inline-help globally which is
not quite right:

emacs -Q
M-x icomplete-mode RET
C-x C-f nonexistingfile TAB
=> no message
Expected: "[No match]"



This patch to the current trunk sets completion-show-inline-help locally
when icomplete is actually being used (simple completion).


2011-07-09  Johan Bockgård  <bojohan <at> gnu.org>

        Fix previous fix of Bug#5849.

	* icomplete.el (icomplete-mode): Don't set
	completion-show-inline-help.
	(icomplete-minibuffer-setup): Set completion-show-inline-help
	locally during icompletion.


=== modified file 'lisp/icomplete.el'
--- lisp/icomplete.el	2011-05-31 03:03:38 +0000
+++ lisp/icomplete.el	2011-07-09 14:01:48 +0000
@@ -179,11 +179,8 @@
   (if icomplete-mode
       ;; The following is not really necessary after first time -
       ;; no great loss.
-      (progn
-	(setq completion-show-inline-help nil)
-	(add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup))
-    (remove-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)
-    (setq completion-show-inline-help t)))
+      (add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)
+    (remove-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)))
 
 ;;;_ > icomplete-simple-completing-p ()
 (defun icomplete-simple-completing-p ()
@@ -209,6 +206,7 @@
   "Run in minibuffer on activation to establish incremental completion.
 Usually run by inclusion in `minibuffer-setup-hook'."
   (when (and icomplete-mode (icomplete-simple-completing-p))
+    (set (make-local-variable 'completion-show-inline-help) nil)
     (add-hook 'pre-command-hook
 	      (lambda () (run-hooks 'icomplete-pre-command-hook))
 	      nil t)





Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 19 Jul 2011 17:12:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5849; Package emacs. (Sun, 18 Sep 2011 16:19:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: 5849 <at> debbugs.gnu.org
Subject: Re: bug#5849: 23.1.95; completion-auto-help blocks icomplete-mode
Date: Sun, 18 Sep 2011 12:13:04 -0400
Johan Bockgård <bojohan <at> gnu.org> writes:

> The fix in the trunk sets completion-show-inline-help globally which is
> not quite right:
>
> emacs -Q
> M-x icomplete-mode RET
> C-x C-f nonexistingfile TAB
> => no message
> Expected: "[No match]"
>
> This patch to the current trunk sets completion-show-inline-help locally
> when icomplete is actually being used (simple completion).

Thanks, committed.




bug closed, send any further explanations to 5849 <at> debbugs.gnu.org and Leo <sdl.web <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 16:19:02 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. (Mon, 17 Oct 2011 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 255 days ago.

Previous Next


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