GNU bug report logs - #45763
27.1; fido-mode does not work with icomplete-in-buffer completion

Previous Next

Package: emacs;

Reported by: simon254 <at> mailbox.org

Date: Sun, 10 Jan 2021 12:38:03 UTC

Severity: normal

Found in version 27.1

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

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 45763 in the body.
You can then email your comments to 45763 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#45763; Package emacs. (Sun, 10 Jan 2021 12:38:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to simon254 <at> mailbox.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 10 Jan 2021 12:38:03 GMT) Full text and rfc822 format available.

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

From: simon254 <at> mailbox.org
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.1; fido-mode does not work with icomplete-in-buffer completion
Date: Sun, 10 Jan 2021 12:31:14 +0000 (GMT)
in *sratch* evaluate
(setq icomplete-in-buffer t)
(fido-mode t)
type:
"(icompl" followed by C-M-i (completion-at-point) 
-> default completion is invoked, not fido-mode

same happens for shell completion:

M-x shell
ls xxx followed by tab -> default completion is invoked, not fido-mode

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2020-08-12 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 44811 6704)
(symbols 48 5927 1)
(strings 32 15254 1703)
(string-bytes 1 504784)
(vectors 16 10174)
(vector-slots 8 126879 9518)
(floats 8 19 39)
(intervals 56 189 0)
(buffers 1000 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 17 Aug 2021 10:48:01 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Tue, 17 Aug 2021 11:47:02 +0100
simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> in *sratch* evaluate
> (setq icomplete-in-buffer t)
> (fido-mode t)
> type:
> "(icompl" followed by C-M-i (completion-at-point) 
> -> default completion is invoked, not fido-mode

It's true, it doesn't.  And either does icomplete-mode.  It's completely
broken.  Even if I do this to fido-mode, it's still broken, quite
broken, I don't know how to fix it.

But I would like to fix it, maybe by letting the choice still happen
from the minibuffer while.  Let's keep this bug open to track this
development.

João

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index e06b33e43b..89ace7e434 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -411,9 +411,12 @@ fido-mode
   :global t :group 'icomplete
   (remove-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
   (remove-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)
+  (remove-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup)
   (when fido-mode
     (icomplete-mode -1)
     (setq icomplete-mode t)
+    (when icomplete-in-buffer
+      (add-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup))
     (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
     (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
 





>
> same happens for shell completion:
>
> M-x shell
> ls xxx followed by tab -> default completion is invoked, not fido-mode
>
> In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
> of 2020-08-12 built on builder10-14.porkrind.org
> Windowing system distributor 'Apple', version 10.3.1894
> System Description:  Mac OS X 10.15.7
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
>
> Configured using:
> 'configure --with-ns '--enable-locallisppath=/Library/Application
> Support/Emacs/${version}/site-lisp:/Library/Application
> Support/Emacs/site-lisp' --with-modules'
>
> Configured features:
> NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
> THREADS JSON PDUMPER
>
> Important settings:
>   value of $LANG: en_GB.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-mode: t
>   eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
> format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
> epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
> subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
> mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
> cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
> tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
> mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
> tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
> newcomment text-mode elisp-mode lisp-mode prog-mode register page
> tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
> jit-lock font-lock syntax facemenu font-core term/tty-colors frame
> minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
> tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
> romanian slovak czech european ethiopic indian cyrillic chinese
> composite charscript charprop case-table epa-hook jka-cmpr-hook help
> simple abbrev obarray cl-preloaded nadvice loaddefs button faces
> cus-face macroexp files text-properties overlay sha1 md5 base64 format
> env code-pages mule custom widget hashtable-print-readable backquote
> threads kqueue cocoa ns multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 44811 6704)
> (symbols 48 5927 1)
> (strings 32 15254 1703)
> (string-bytes 1 504784)
> (vectors 16 10174)
> (vector-slots 8 126879 9518)
> (floats 8 19 39)
> (intervals 56 189 0)
> (buffers 1000 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 17 Aug 2021 10:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Mon, 27 Feb 2023 18:43:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Mon, 27 Feb 2023 20:41:22 +0200
close 45763 30.0.50
thanks

>> (setq icomplete-in-buffer t)
>> (fido-mode t)
>> type:
>> "(icompl" followed by C-M-i (completion-at-point) 
>> -> default completion is invoked, not fido-mode
>
> It's true, it doesn't.  And either does icomplete-mode.  It's completely
> broken.  Even if I do this to fido-mode, it's still broken, quite
> broken, I don't know how to fix it.
>
> But I would like to fix it, maybe by letting the choice still happen
> from the minibuffer while.  Let's keep this bug open to track this
> development.

I fixed in-buffer completion in the commit a7a984c0ebe.
Now your patch works nicely in fido-mode,
so I pushed it was well, thanks.

> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index e06b33e43b..89ace7e434 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -411,9 +411,12 @@ fido-mode
>    :global t :group 'icomplete
>    (remove-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>    (remove-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)
> +  (remove-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup)
>    (when fido-mode
>      (icomplete-mode -1)
>      (setq icomplete-mode t)
> +    (when icomplete-in-buffer
> +      (add-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup))
>      (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>      (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))




bug marked as fixed in version 30.0.50, send any further explanations to 45763 <at> debbugs.gnu.org and simon254 <at> mailbox.org Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Mon, 27 Feb 2023 18:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 00:13:02 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1;
 fido-mode does not work with icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 00:13:42 +0000
> I fixed in-buffer completion in the commit a7a984c0ebe.
> Now your patch works nicely in fido-mode,
> so I pushed it was well, thanks.

If this is effectively fixing things shouldn't it be in emacs-29?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 08:17:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 09:55:07 +0200
>> I fixed in-buffer completion in the commit a7a984c0ebe.
>> Now your patch works nicely in fido-mode,
>> so I pushed it was well, thanks.
>
> If this is effectively fixing things shouldn't it be in emacs-29?

I could backport to the emacs-29 branch if Eli agrees.




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

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

From: João Távora <joaotavora <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#45763: 27.1;
 fido-mode does not work with icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 09:18:08 +0000
[Message part 1 (text/plain, inline)]
I just realized the patch shown in this bug is my own, and there's no
notice of what was done to fix this bug. Did you push my patch? Or
something else?

When I wrote it, it didn't work, according to the message.

João

On Tue, Feb 28, 2023, 08:16 Juri Linkov <juri <at> linkov.net> wrote:

> >> I fixed in-buffer completion in the commit a7a984c0ebe.
> >> Now your patch works nicely in fido-mode,
> >> so I pushed it was well, thanks.
> >
> > If this is effectively fixing things shouldn't it be in emacs-29?
>
> I could backport to the emacs-29 branch if Eli agrees.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 12:15:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, joaotavora <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1;
 fido-mode does not work with icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 14:14:19 +0200
> Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, monnier <at> iro.umontreal.ca
> From: Juri Linkov <juri <at> linkov.net>
> Date: Tue, 28 Feb 2023 09:55:07 +0200
> 
> >> I fixed in-buffer completion in the commit a7a984c0ebe.
> >> Now your patch works nicely in fido-mode,
> >> so I pushed it was well, thanks.
> >
> > If this is effectively fixing things shouldn't it be in emacs-29?
> 
> I could backport to the emacs-29 branch if Eli agrees.

Please show the patch you want to install on emacs-29.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 17:35:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 19:31:19 +0200
> I just realized the patch shown in this bug is my own, and there's no
> notice of what was done to fix this bug. Did you push my patch? Or
> something else?
>
> When I wrote it, it didn't work, according to the message.

Yes, your patch was pushed, and now it works.
Sorry for the typo in my previous message.

>     >> I fixed in-buffer completion in the commit a7a984c0ebe.
>     >> Now your patch works nicely in fido-mode,
>     >> so I pushed it was well, thanks.
>     >
>     > If this is effectively fixing things shouldn't it be in emacs-29?
>
>     I could backport to the emacs-29 branch if Eli agrees.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 17:35:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, joaotavora <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 19:31:54 +0200
>> >> I fixed in-buffer completion in the commit a7a984c0ebe.
>> >> Now your patch works nicely in fido-mode,
>> >> so I pushed it was well, thanks.
>> >
>> > If this is effectively fixing things shouldn't it be in emacs-29?
>> 
>> I could backport to the emacs-29 branch if Eli agrees.
>
> Please show the patch you want to install on emacs-29.

Two patches are in the commit a7a984c0ebe and b5c13032538.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Tue, 28 Feb 2023 18:14:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, joaotavora <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Tue, 28 Feb 2023 20:12:29 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: joaotavora <at> gmail.com,  45763 <at> debbugs.gnu.org,  simon254 <at> mailbox.org,
>   monnier <at> iro.umontreal.ca
> Date: Tue, 28 Feb 2023 19:31:54 +0200
> 
> >> >> I fixed in-buffer completion in the commit a7a984c0ebe.
> >> >> Now your patch works nicely in fido-mode,
> >> >> so I pushed it was well, thanks.
> >> >
> >> > If this is effectively fixing things shouldn't it be in emacs-29?
> >> 
> >> I could backport to the emacs-29 branch if Eli agrees.
> >
> > Please show the patch you want to install on emacs-29.
> 
> Two patches are in the commit a7a984c0ebe and b5c13032538.

Thanks, these are OK for emacs-29.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45763; Package emacs. (Wed, 01 Mar 2023 17:59:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 45763 <at> debbugs.gnu.org, simon254 <at> mailbox.org, joaotavora <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#45763: 27.1; fido-mode does not work with
 icomplete-in-buffer completion
Date: Wed, 01 Mar 2023 19:57:28 +0200
>> >> >> I fixed in-buffer completion in the commit a7a984c0ebe.
>> >> >> Now your patch works nicely in fido-mode,
>> >> >> so I pushed it was well, thanks.
>> >> >
>> >> > If this is effectively fixing things shouldn't it be in emacs-29?
>> >> 
>> >> I could backport to the emacs-29 branch if Eli agrees.
>> >
>> > Please show the patch you want to install on emacs-29.
>> 
>> Two patches are in the commit a7a984c0ebe and b5c13032538.
>
> Thanks, these are OK for emacs-29.

Now cherry-picked to emacs-29.




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

This bug report was last modified 1 year and 26 days ago.

Previous Next


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