unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
@ 2021-01-10 12:31 simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-17 10:47 ` João Távora
  0 siblings, 1 reply; 11+ messages in thread
From: simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-10 12:31 UTC (permalink / raw)
  To: 45763


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))





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2021-01-10 12:31 bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-08-17 10:47 ` João Távora
  2023-02-27 18:41   ` Juri Linkov
  0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2021-08-17 10:47 UTC (permalink / raw)
  To: 45763; +Cc: simon254, monnier

simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@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))





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2021-08-17 10:47 ` João Távora
@ 2023-02-27 18:41   ` Juri Linkov
  2023-02-28  0:13     ` João Távora
  0 siblings, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2023-02-27 18:41 UTC (permalink / raw)
  To: João Távora; +Cc: 45763, simon254, monnier

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)))





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-27 18:41   ` Juri Linkov
@ 2023-02-28  0:13     ` João Távora
  2023-02-28  7:55       ` Juri Linkov
  0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2023-02-28  0:13 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 45763, simon254, monnier

> 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?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28  0:13     ` João Távora
@ 2023-02-28  7:55       ` Juri Linkov
  2023-02-28  9:18         ` João Távora
  2023-02-28 12:14         ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Juri Linkov @ 2023-02-28  7:55 UTC (permalink / raw)
  To: João Távora; +Cc: 45763, simon254, monnier

>> 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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28  7:55       ` Juri Linkov
@ 2023-02-28  9:18         ` João Távora
  2023-02-28 17:31           ` Juri Linkov
  2023-02-28 12:14         ` Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: João Távora @ 2023-02-28  9:18 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 45763, simon254, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

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@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.
>

[-- Attachment #2: Type: text/html, Size: 973 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28  7:55       ` Juri Linkov
  2023-02-28  9:18         ` João Távora
@ 2023-02-28 12:14         ` Eli Zaretskii
  2023-02-28 17:31           ` Juri Linkov
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2023-02-28 12:14 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 45763, simon254, joaotavora, monnier

> Cc: 45763@debbugs.gnu.org, simon254@mailbox.org, monnier@iro.umontreal.ca
> From: Juri Linkov <juri@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28  9:18         ` João Távora
@ 2023-02-28 17:31           ` Juri Linkov
  0 siblings, 0 replies; 11+ messages in thread
From: Juri Linkov @ 2023-02-28 17:31 UTC (permalink / raw)
  To: João Távora; +Cc: 45763, simon254, Stefan Monnier

> 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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28 12:14         ` Eli Zaretskii
@ 2023-02-28 17:31           ` Juri Linkov
  2023-02-28 18:12             ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2023-02-28 17:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 45763, simon254, joaotavora, monnier

>> >> 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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28 17:31           ` Juri Linkov
@ 2023-02-28 18:12             ` Eli Zaretskii
  2023-03-01 17:57               ` Juri Linkov
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2023-02-28 18:12 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 45763, simon254, joaotavora, monnier

> From: Juri Linkov <juri@linkov.net>
> Cc: joaotavora@gmail.com,  45763@debbugs.gnu.org,  simon254@mailbox.org,
>   monnier@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion
  2023-02-28 18:12             ` Eli Zaretskii
@ 2023-03-01 17:57               ` Juri Linkov
  0 siblings, 0 replies; 11+ messages in thread
From: Juri Linkov @ 2023-03-01 17:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 45763, simon254, joaotavora, monnier

>> >> >> 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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-01 17:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-10 12:31 bug#45763: 27.1; fido-mode does not work with icomplete-in-buffer completion simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-17 10:47 ` João Távora
2023-02-27 18:41   ` Juri Linkov
2023-02-28  0:13     ` João Távora
2023-02-28  7:55       ` Juri Linkov
2023-02-28  9:18         ` João Távora
2023-02-28 17:31           ` Juri Linkov
2023-02-28 12:14         ` Eli Zaretskii
2023-02-28 17:31           ` Juri Linkov
2023-02-28 18:12             ` Eli Zaretskii
2023-03-01 17:57               ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).