* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too @ 2023-03-03 18:18 Sean Whitton 2023-03-03 20:26 ` João Távora 2023-03-04 2:35 ` Sean Whitton 0 siblings, 2 replies; 14+ messages in thread From: Sean Whitton @ 2023-03-03 18:18 UTC (permalink / raw) To: 61943; +Cc: juri, joaotavora X-debbugs-cc: juri@linkov.net, joaotavora@gmail.com Many thanks to Juri and Joao for fixing #45763! It's a whole new world! I am a fido-mode user. I noticed that my custom bindings for the fido-mode minibuffer don't work for in-buffer completion. I think that icomplete--in-region-setup should compose in icomplete-fido-mode-map, in addition to icomplete-minibuffer-map, in the case that fido-mode is on? -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-03 18:18 bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too Sean Whitton @ 2023-03-03 20:26 ` João Távora 2023-03-04 2:13 ` Sean Whitton 2023-03-04 2:35 ` Sean Whitton 1 sibling, 1 reply; 14+ messages in thread From: João Távora @ 2023-03-03 20:26 UTC (permalink / raw) To: Sean Whitton; +Cc: 61943, juri On Fri, Mar 3, 2023, 18:19 Sean Whitton <spwhitton@spwhitton.name> wrote: > > X-debbugs-cc: juri@linkov.net, joaotavora@gmail.com > > Many thanks to Juri and Joao for fixing #45763! It's a whole new world! You're welcome, but I think Juri did most of the work. I had planned to tackle this some time ago but it got lost in somewhere in the bucket of TODOs. I haven't given it much testing, but I'm suprised it works the way it does. I imagined it would show the typical constantly-adjusting fido-mode/icomplete list of candidates in the echo area, but it doesn't, only for in-buffer instead of minibuffer. Instead, it seems to popup *Completions* as usual. Am I being dense here? How do you set it up? Is it just (setq icomplete-in-buffer t) + M-x fido-mode as I did? And how do you invoke it? Is it C-M-i? > I am a fido-mode user. I noticed that my custom bindings for the > fido-mode minibuffer don't work for in-buffer completion. I think that > icomplete--in-region-setup should compose in icomplete-fido-mode-map, in > addition to icomplete-minibuffer-map, in the case that fido-mode is on? This probably makes sense, but please, for my benefit, try to show a minimal config with just Emacs -Q and your keybindings that you want to use in both fido modes. João ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-03 20:26 ` João Távora @ 2023-03-04 2:13 ` Sean Whitton 0 siblings, 0 replies; 14+ messages in thread From: Sean Whitton @ 2023-03-04 2:13 UTC (permalink / raw) To: João Távora, 61943, juri Hello, On Fri 03 Mar 2023 at 08:26PM GMT, João Távora wrote: > I imagined it would show the typical constantly-adjusting > fido-mode/icomplete list of candidates in the echo area, but it > doesn't, only for in-buffer instead of minibuffer. > Instead, it seems to popup *Completions* as usual. > > Am I being dense here? How do you set it up? Is it just > (setq icomplete-in-buffer t) + M-x fido-mode as I did? > And how do you invoke it? Is it C-M-i? Well, the candidates are meant to appear as an overlay after point, not in the minibuffer. However, there's something strange going on in that sometimes you can get the candidates display in-buffer but *also* the *Completions* buffer popping up. Sometimes this happens and sometimes it doesn't, I haven't figured out the pattern yet ... >> I am a fido-mode user. I noticed that my custom bindings for the >> fido-mode minibuffer don't work for in-buffer completion. I think that >> icomplete--in-region-setup should compose in icomplete-fido-mode-map, in >> addition to icomplete-minibuffer-map, in the case that fido-mode is on? > > This probably makes sense, but please, for my benefit, try to show > a minimal config with just Emacs -Q and your keybindings that > you want to use in both fido modes. Sure, e.g. evaluating these forms in emacs -Q: (setq icomplete-in-buffer t) (fido-mode 1) (define-key icomplete-fido-mode-map [?\M-.] #'icomplete-forward-completions) (define-key icomplete-fido-mode-map [?\M-,] #'icomplete-backward-completions) .. then do something like typing "icomplete- into *scratch* and then C-M-i. -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-03 18:18 bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too Sean Whitton 2023-03-03 20:26 ` João Távora @ 2023-03-04 2:35 ` Sean Whitton 2023-03-04 11:30 ` João Távora 1 sibling, 1 reply; 14+ messages in thread From: Sean Whitton @ 2023-03-04 2:35 UTC (permalink / raw) To: João Távora, 61943, juri Hello, On Fri 03 Mar 2023 at 11:18AM -07, Sean Whitton wrote: > X-debbugs-cc: juri@linkov.net, joaotavora@gmail.com > > Many thanks to Juri and Joao for fixing #45763! It's a whole new world! > > I am a fido-mode user. I noticed that my custom bindings for the > fido-mode minibuffer don't work for in-buffer completion. I think that > icomplete--in-region-setup should compose in icomplete-fido-mode-map, in > addition to icomplete-minibuffer-map, in the case that fido-mode is on? I noticed that icomplete-hide-common-prefix etc. are wrong too. I think that icomplete--in-region-setup also needs to do something equivalent to the setq-local in icomplete--fido-mode-setup. -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 2:35 ` Sean Whitton @ 2023-03-04 11:30 ` João Távora 2023-03-04 18:52 ` Juri Linkov 2023-03-04 20:44 ` Sean Whitton 0 siblings, 2 replies; 14+ messages in thread From: João Távora @ 2023-03-04 11:30 UTC (permalink / raw) To: Sean Whitton, Eli Zaretskii; +Cc: 61943, juri On Sat, Mar 4, 2023 at 2:35 AM Sean Whitton <spwhitton@spwhitton.name> wrote: > > Hello, > > On Fri 03 Mar 2023 at 11:18AM -07, Sean Whitton wrote: > > > X-debbugs-cc: juri@linkov.net, joaotavora@gmail.com > > > > Many thanks to Juri and Joao for fixing #45763! It's a whole new world! > > > > I am a fido-mode user. I noticed that my custom bindings for the > > fido-mode minibuffer don't work for in-buffer completion. I think that > > icomplete--in-region-setup should compose in icomplete-fido-mode-map, in > > addition to icomplete-minibuffer-map, in the case that fido-mode is on? > > I noticed that icomplete-hide-common-prefix etc. are wrong too. > I think that icomplete--in-region-setup also needs to do something > equivalent to the setq-local in icomplete--fido-mode-setup. Yes, Sean, please report an Emacs -Q recipe for what you are trying to get working. I've now found a way to test this, and I was surprised at how easy it was, but also skeptical. As I remember analyzing it more than a year ago, and finding this a reasonbaly hard job. Also it seems to be completely broken for fido-vertical mode and icomplete-vertical-mode, so I think an approach that takes these cousin modes into consideration. All in all, I'm not sure we should be shipping this half-baked enhancement for emacs-29, at least not in this phase. I propose we revert it in emacs-29. I propose we revert it from there, keep the changes in master, and focus on making it more consistent there. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 11:30 ` João Távora @ 2023-03-04 18:52 ` Juri Linkov 2023-03-04 19:04 ` João Távora 2023-03-04 20:44 ` Sean Whitton 1 sibling, 1 reply; 14+ messages in thread From: Juri Linkov @ 2023-03-04 18:52 UTC (permalink / raw) To: João Távora; +Cc: 61943, Eli Zaretskii, Sean Whitton > All in all, I'm not sure we should be shipping this half-baked > enhancement for emacs-29, at least not in this phase. I propose > we revert it in emacs-29. > > I propose we revert it from there, keep the changes in master, > and focus on making it more consistent there. The patch that I created fixed a bug where in-buffer completion erased the whole buffer so it needs to stay in emacs-29. Also for your convenience I pushed your patch that adds support for in-buffer completion to fido-mode in the hope that the patch is already in the finished state. However, if you think that fido-vertical mode and/or icomplete-vertical-mode needs more work to support in-buffer completions, please decide whether to revert it or to write an additional patch for these modes in emacs-29. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 18:52 ` Juri Linkov @ 2023-03-04 19:04 ` João Távora 2023-03-04 19:14 ` Juri Linkov 0 siblings, 1 reply; 14+ messages in thread From: João Távora @ 2023-03-04 19:04 UTC (permalink / raw) To: Juri Linkov; +Cc: 61943, Eli Zaretskii, Sean Whitton On Sat, Mar 4, 2023 at 6:56 PM Juri Linkov <juri@linkov.net> wrote: > fido-vertical mode and/or icomplete-vertical-mode needs more work > to support in-buffer completions, please decide whether to revert it > or to write an additional patch for these modes in emacs-29. OK, I'll revert just the fido-mode-specific patch in emacs-29. But are you sure that icomplete-in-buffer works consistently for icomplete-mode? If it doesn't it'll need more changes, and -- crucially -- changes that don't break other icomplete cousins like fido and vertical modes. If it does work OK, then no problem. João ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 19:04 ` João Távora @ 2023-03-04 19:14 ` Juri Linkov 0 siblings, 0 replies; 14+ messages in thread From: Juri Linkov @ 2023-03-04 19:14 UTC (permalink / raw) To: João Távora; +Cc: 61943, Eli Zaretskii, Sean Whitton >> fido-vertical mode and/or icomplete-vertical-mode needs more work >> to support in-buffer completions, please decide whether to revert it >> or to write an additional patch for these modes in emacs-29. > > OK, I'll revert just the fido-mode-specific patch in emacs-29. But are > you sure that icomplete-in-buffer works consistently for icomplete-mode? > If it doesn't it'll need more changes, and -- crucially -- changes that > don't break other icomplete cousins like fido and vertical modes. > If it does work OK, then no problem. icomplete-in-buffer works consistently in all my tests. But maybe Sean will show more recipes if there are more problems. ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 11:30 ` João Távora 2023-03-04 18:52 ` Juri Linkov @ 2023-03-04 20:44 ` Sean Whitton 2023-03-21 22:06 ` Sean Whitton 1 sibling, 1 reply; 14+ messages in thread From: Sean Whitton @ 2023-03-04 20:44 UTC (permalink / raw) To: João Távora, 61943, juri Hello, On Sat 04 Mar 2023 at 11:30AM GMT, João Távora wrote: > On Sat, Mar 4, 2023 at 2:35 AM Sean Whitton <spwhitton@spwhitton.name> wrote: >> >> Hello, >> >> On Fri 03 Mar 2023 at 11:18AM -07, Sean Whitton wrote: >> >> > X-debbugs-cc: juri@linkov.net, joaotavora@gmail.com >> > >> > Many thanks to Juri and Joao for fixing #45763! It's a whole new world! >> > >> > I am a fido-mode user. I noticed that my custom bindings for the >> > fido-mode minibuffer don't work for in-buffer completion. I think that >> > icomplete--in-region-setup should compose in icomplete-fido-mode-map, in >> > addition to icomplete-minibuffer-map, in the case that fido-mode is on? >> >> I noticed that icomplete-hide-common-prefix etc. are wrong too. >> I think that icomplete--in-region-setup also needs to do something >> equivalent to the setq-local in icomplete--fido-mode-setup. > > Yes, Sean, please report an Emacs -Q recipe for what you are trying > to get working. Alright, how about this: (setq icomplete-in-buffer t) (fido-mode 1) M-x eshell touch foobarbaz C-x C-f fbb => matches the file C-g type "ls fbb" TAB => No matches C-g (setq completion-styles '(flex)) TAB => matches the file & expands but with fido-mode you shouldn't need to set completion-styles like this. (In Eshell TAB is completion-at-point and C-M-i is something else.) -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-04 20:44 ` Sean Whitton @ 2023-03-21 22:06 ` Sean Whitton 2023-03-21 23:40 ` João Távora 0 siblings, 1 reply; 14+ messages in thread From: Sean Whitton @ 2023-03-21 22:06 UTC (permalink / raw) To: João Távora; +Cc: 61943, juri Hello João, On Sat 04 Mar 2023 at 01:44PM -07, Sean Whitton wrote: > On Sat 04 Mar 2023 at 11:30AM GMT, João Távora wrote: > >> Yes, Sean, please report an Emacs -Q recipe for what you are trying >> to get working. > > Alright, how about this: > > (setq icomplete-in-buffer t) > (fido-mode 1) > M-x eshell > touch foobarbaz > C-x C-f fbb => matches the file > C-g > type "ls fbb" > > TAB => No matches > C-g > (setq completion-styles '(flex)) > TAB => matches the file & expands > > but with fido-mode you shouldn't need to set completion-styles like this. > > (In Eshell TAB is completion-at-point and C-M-i is something else.) May I ask whether you've had a chance to look into this yet? -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-21 22:06 ` Sean Whitton @ 2023-03-21 23:40 ` João Távora 2023-03-22 17:25 ` Sean Whitton 0 siblings, 1 reply; 14+ messages in thread From: João Távora @ 2023-03-21 23:40 UTC (permalink / raw) To: Sean Whitton; +Cc: 61943, juri On Tue, Mar 21, 2023 at 10:06 PM Sean Whitton <spwhitton@spwhitton.name> wrote: > > Hello João, > > On Sat 04 Mar 2023 at 01:44PM -07, Sean Whitton wrote: > > > On Sat 04 Mar 2023 at 11:30AM GMT, João Távora wrote: > > > >> Yes, Sean, please report an Emacs -Q recipe for what you are trying > >> to get working. > > > > Alright, how about this: > > > > (setq icomplete-in-buffer t) > > (fido-mode 1) > > M-x eshell > > touch foobarbaz > > C-x C-f fbb => matches the file > > C-g > > type "ls fbb" > > > > TAB => No matches > > C-g > > (setq completion-styles '(flex)) > > TAB => matches the file & expands > > > > but with fido-mode you shouldn't need to set completion-styles like this. > > > > (In Eshell TAB is completion-at-point and C-M-i is something else.) > > May I ask whether you've had a chance to look into this yet? Yes you may, but no, I haven't. Icomplete and Fido and cousins, it's true. But icomplete-in-buffer wasn't around (at least wasn't in any way functional) when Fido was born. So I don't have any plans of integrating this part of icomplete in Fido, because it's not really how I envision Fido being used for non-minibuffer completion. I have other plans for a future fido-in-buffer where the feedback overlay -- in horizontal or vertical form -- shows in the echo area instead. That said, if a simple patch to make icomplete-in-buffer work with fido-mode can be achieved, I have no problem reviewing it. As you suggested, it could be as simple as integrating icomplete--fido-mode-setup into icomplete--in-region-setup. But that is relatively tricky as whatever variables are set when entering this mode but be properly reset when leaving it. Doing this elegantly might not be hard, but it's not trivial either. João ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-21 23:40 ` João Távora @ 2023-03-22 17:25 ` Sean Whitton 2023-03-22 18:43 ` João Távora 0 siblings, 1 reply; 14+ messages in thread From: Sean Whitton @ 2023-03-22 17:25 UTC (permalink / raw) To: João Távora; +Cc: 61943, juri Hello, On Tue 21 Mar 2023 at 11:40PM GMT, João Távora wrote: > Yes you may, but no, I haven't. Icomplete and Fido and cousins, > it's true. But icomplete-in-buffer wasn't around (at least wasn't > in any way functional) when Fido was born. So I don't have > any plans of integrating this part of icomplete in Fido, because > it's not really how I envision Fido being used for non-minibuffer > completion. > > I have other plans for a future fido-in-buffer where > the feedback overlay -- in horizontal or vertical form -- shows > in the echo area instead. Interesting idea. What do you think the advantages are? It's breaking with how such things usually work, in Emacs and in other editors. Since you're up for reviewing a patch to make icomplete-in-buffer work with fido-mode, I assume you are interested in keeping both working? > That said, if a simple patch to make icomplete-in-buffer work with > fido-mode can be achieved, I have no problem reviewing it. > As you suggested, it could be as simple as integrating > icomplete--fido-mode-setup into icomplete--in-region-setup. > But that is relatively tricky as whatever variables are set > when entering this mode but be properly reset when leaving it. > Doing this elegantly might not be hard, but it's not trivial > either. Currently icomplete--in-region-setup sets completion-show-inline-help locally and then unconditionally kills that local variable. So we could do the same for fido-mode's variables, but is it possible that a major mode might want to set one of them? Otherwise, if there is to be some mechanism for restoring old buffer-local values, then we should use it for completion-show-inline-help too. -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-22 17:25 ` Sean Whitton @ 2023-03-22 18:43 ` João Távora 2023-03-23 19:13 ` Sean Whitton 0 siblings, 1 reply; 14+ messages in thread From: João Távora @ 2023-03-22 18:43 UTC (permalink / raw) To: Sean Whitton; +Cc: 61943, juri Sean Whitton <spwhitton@spwhitton.name> writes: > Hello, > > On Tue 21 Mar 2023 at 11:40PM GMT, João Távora wrote: > >> Yes you may, but no, I haven't. Icomplete and Fido and cousins, >> it's true. But icomplete-in-buffer wasn't around (at least wasn't >> in any way functional) when Fido was born. So I don't have >> any plans of integrating this part of icomplete in Fido, because >> it's not really how I envision Fido being used for non-minibuffer >> completion. >> >> I have other plans for a future fido-in-buffer where >> the feedback overlay -- in horizontal or vertical form -- shows >> in the echo area instead. > > Interesting idea. What do you think the advantages are? It's breaking > with how such things usually work, in Emacs and in other editors. I wouldn't call it breaking, it's just a different UI. Fido modes (fido-mode and fido-vertical-mode) work in the minibuffer which shares its display space with the echo area already, so I wouldn't think it's that odd. > Since you're up for reviewing a patch to make icomplete-in-buffer work > with fido-mode, I assume you are interested in keeping both working? As I said, only if an elegant enough patch can be devised for the current icomplete-in-buffer functionality. >> That said, if a simple patch to make icomplete-in-buffer work with >> fido-mode can be achieved, I have no problem reviewing it. >> As you suggested, it could be as simple as integrating >> icomplete--fido-mode-setup into icomplete--in-region-setup. >> But that is relatively tricky as whatever variables are set >> when entering this mode but be properly reset when leaving it. >> Doing this elegantly might not be hard, but it's not trivial >> either. > > Currently icomplete--in-region-setup sets completion-show-inline-help > locally and then unconditionally kills that local variable. So we could > do the same for fido-mode's variables, but is it possible that a major > mode might want to set one of them? > > Otherwise, if there is to be some mechanism for restoring old > buffer-local values, then we should use it for > completion-show-inline-help too. Yes, that's what's needed. "killing the variable" isn't the right approach since that erases a pre-override buffer-local setting. João ^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too 2023-03-22 18:43 ` João Távora @ 2023-03-23 19:13 ` Sean Whitton 0 siblings, 0 replies; 14+ messages in thread From: Sean Whitton @ 2023-03-23 19:13 UTC (permalink / raw) To: João Távora; +Cc: 61943, juri Hello, On Wed 22 Mar 2023 at 06:43PM GMT, João Távora wrote: > Sean Whitton <spwhitton@spwhitton.name> writes: > >> Interesting idea. What do you think the advantages are? It's breaking >> with how such things usually work, in Emacs and in other editors. > > I wouldn't call it breaking, it's just a different UI. Fido modes > (fido-mode and fido-vertical-mode) work in the minibuffer which shares > its display space with the echo area already, so I wouldn't think it's > that odd. Looking forward to trying it. >> Since you're up for reviewing a patch to make icomplete-in-buffer work >> with fido-mode, I assume you are interested in keeping both working? > > As I said, only if an elegant enough patch can be devised for the > current icomplete-in-buffer functionality. Cool. -- Sean Whitton ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-03-23 19:13 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-03 18:18 bug#61943: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too Sean Whitton 2023-03-03 20:26 ` João Távora 2023-03-04 2:13 ` Sean Whitton 2023-03-04 2:35 ` Sean Whitton 2023-03-04 11:30 ` João Távora 2023-03-04 18:52 ` Juri Linkov 2023-03-04 19:04 ` João Távora 2023-03-04 19:14 ` Juri Linkov 2023-03-04 20:44 ` Sean Whitton 2023-03-21 22:06 ` Sean Whitton 2023-03-21 23:40 ` João Távora 2023-03-22 17:25 ` Sean Whitton 2023-03-22 18:43 ` João Távora 2023-03-23 19:13 ` Sean Whitton
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.