all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Feedback on fido-mode
@ 2020-03-07 15:16 Adam Porter
  2020-03-09 14:34 ` jixiuf
  2020-03-09 14:42 ` João Távora
  0 siblings, 2 replies; 11+ messages in thread
From: Adam Porter @ 2020-03-07 15:16 UTC (permalink / raw)
  To: emacs-devel

Hi,

Seeing João's recent message about Fido reminded me of it, and since I'm
testing Emacs 27+ for the first time lately, I gave it a try.  It was
not quite as useful or easy-to-use as I expected, so I thought maybe I
should send some feedback.  Of course, I'm not much of an ido nor
icomplete user, so maybe I'm missing something basic.

I've been testing Bufler [0] with Andrea's native-comp branch.  With
bufler-mode enabled, I enabled fido-mode, and here's how it went:

1.  M-x bufler-switch-buffers.  This presents the following completions
list, as expected (I hope these lines don't wrap):

  Possible completions are:
  *Help/Info* » *Help* 	
  *Special* » **Special** » *Warnings* 	
  *Special* » **Special** » *scratch* 	
  *Special* » **Special** » *Messages* 	
  *Special* » completion-list-mode » *Completions*
  *Special* » Custom-mode » *Customize Group: Icomplete*
  *Special* » Custom-mode » *Customize Apropos*				  
  *Special* » apropos-mode » *Apropos*					  
  *Special* » bufler-list-mode » *Bufler*				  
  Dir: ~/.emacs.d/ » Dir: /home/test/.emacs.d/ » emacs-lisp-mode » init.el

2.  I want to switch to the init.el buffer (the last candidate), so I
type "init", expecting it to become the selected (i.e. first) candidate.
Instead, the completions list shows the following choices, and init.el
is not the first one, even though it's the only candidate that matches
the input as a substring:

  Possible completions are:
  *Special* » completion-list-mode » *Completions*
  Dir: ~/.emacs.d/ » Dir: /home/test/.emacs.d/ » emacs-lisp-mode » init.el

I see the letters that spell "init" highlighted in the first candidate,
even though none of them are sequential in it.

3.  I want to select the last completion candidate, so I try the
following:

  - "C-n".  Minibuffer shows: "[End of buffer]"
  - "M-n".  Minibuffer shows: "*Help/Info* » *Help* (No matches)"
  - "TAB".  Result: expanded completion list, selected candidate
                    unchanged.
  - "C-h m", hoping to find out what the Fido keybindings are so I can
    select the candidate.  Result: A *Help* buffer showing minor-mode
    information, but nothing about Fido or any keybindings in the
    minibuffer.

At this point I'm not sure what Fido provides over Ido or Icomplete
(though, again, I am not an expert on either of those, since I mostly
use Helm and sometimes Ivy).  I'm sure it does something useful, of
course, but from the perspective of a user new to it, I don't understand
it yet.

4.  I happen to notice that if I type a ".", that causes the init.el
candidate to become the sole candidate.  Deleting the "." returns the
"*Completions*" candidate and causes it to be the selected one again.

5.  Having recently rediscovered the completion-styles option (remember,
I mostly use Helm ;), I wonder if adding the "substring" style will
help.  So I add it to the end of the completion-styles list and try
again.  It makes no difference: with input "init", the init.el candidate
is still at the end of the list and not selected.  I try putting
"substring" at the front of completion-styles, but that also changes
nothing.

6.  I see there's a new "flex" completion style, so I try that at the
front of completion-styles.  Again, it makes no difference: with input
"init", the init.el candidate is not selected, while the "*Special* »
completion-list-mode » *Completions*" candidate is.

At this point, I feel like I must be missing something or doing
something wrong.  When I type "init", and only one of the candidates
matches that substring, it seems like that should be the selected
candidate.  And it seems like it should be easier to discover the
keybinding to choose the next candidate.

7.  I disable fido-mode and enable ivy-mode.  I run "M-x
bufler-switch-buffer" again and type "init".  The init.el candidate is
the only candidate presented for that input, so I can hit RET to select
it.

So, whether all this indicates a PEBKAC, or a suboptimal default
completion experience, I'm not sure.  Maybe a little of both.  I think
that, generally, it would be helpful if Emacs's default completion
experience were closer to what Ivy provides (though not exactly with
Ivy's default settings, as I find its TAB binding a bit confounding, but
that's beside the point).

I hope this feedback is helpful.  Thanks to João and others for your
work on Emacs and Fido.

0: https://github.com/alphapapa/bufler.el




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

* Re: Feedback on fido-mode
  2020-03-07 15:16 Feedback on fido-mode Adam Porter
@ 2020-03-09 14:34 ` jixiuf
  2020-03-09 14:42 ` João Távora
  1 sibling, 0 replies; 11+ messages in thread
From: jixiuf @ 2020-03-09 14:34 UTC (permalink / raw)
  To: joaotavora; +Cc: emacs-devel

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

Another Feedback on fido-mode/icomplete-mode
Any plan to fix  or workaround this old bug for emacs27.   
 (setq icomplete-separator "\n")
The icomplete minibuffer prompt is invisible (bug).


https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293>
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39433 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39433>


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

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

* Re: Feedback on fido-mode
  2020-03-07 15:16 Feedback on fido-mode Adam Porter
  2020-03-09 14:34 ` jixiuf
@ 2020-03-09 14:42 ` João Távora
  2020-03-09 14:50   ` Dmitry Gutov
  2020-03-09 17:12   ` Eli Zaretskii
  1 sibling, 2 replies; 11+ messages in thread
From: João Távora @ 2020-03-09 14:42 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

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

Many thanks for the feedback, I will read it carefully as soon as
possible.

Please be aware that fido-mode is really Icomplete-mode emulating _some_
of ido-mode's features. It's likely that the emulation will get better in
the future
or even surpass ido-mode in features. But in any case, it's _not_ an
emulation
of Ivy-mode (if that's what you are after in some way).

Anyway, Eli, assuming some of these complaints are easy to fix and can
be fixed exclusively in fido-mode's code, what are your thoughts patching
it up in emacs-27?  Or is it too late for that? I'd say "it's too late"
myself,
but I'd like to hear your opinion.

Thanks,
João

On Sat, Mar 7, 2020 at 3:17 PM Adam Porter <adam@alphapapa.net> wrote:

> Hi,
>
> Seeing João's recent message about Fido reminded me of it, and since I'm
> testing Emacs 27+ for the first time lately, I gave it a try.  It was
> not quite as useful or easy-to-use as I expected, so I thought maybe I
> should send some feedback.  Of course, I'm not much of an ido nor
> icomplete user, so maybe I'm missing something basic.
>
> I've been testing Bufler [0] with Andrea's native-comp branch.  With
> bufler-mode enabled, I enabled fido-mode, and here's how it went:
>
> 1.  M-x bufler-switch-buffers.  This presents the following completions
> list, as expected (I hope these lines don't wrap):
>
>   Possible completions are:
>   *Help/Info* » *Help*
>   *Special* » **Special** » *Warnings*
>   *Special* » **Special** » *scratch*
>   *Special* » **Special** » *Messages*
>   *Special* » completion-list-mode » *Completions*
>   *Special* » Custom-mode » *Customize Group: Icomplete*
>   *Special* » Custom-mode » *Customize Apropos*
>   *Special* » apropos-mode » *Apropos*
>   *Special* » bufler-list-mode » *Bufler*
>   Dir: ~/.emacs.d/ » Dir: /home/test/.emacs.d/ » emacs-lisp-mode » init.el
>
> 2.  I want to switch to the init.el buffer (the last candidate), so I
> type "init", expecting it to become the selected (i.e. first) candidate.
> Instead, the completions list shows the following choices, and init.el
> is not the first one, even though it's the only candidate that matches
> the input as a substring:
>
>   Possible completions are:
>   *Special* » completion-list-mode » *Completions*
>   Dir: ~/.emacs.d/ » Dir: /home/test/.emacs.d/ » emacs-lisp-mode » init.el
>
> I see the letters that spell "init" highlighted in the first candidate,
> even though none of them are sequential in it.
>
> 3.  I want to select the last completion candidate, so I try the
> following:
>
>   - "C-n".  Minibuffer shows: "[End of buffer]"
>   - "M-n".  Minibuffer shows: "*Help/Info* » *Help* (No matches)"
>   - "TAB".  Result: expanded completion list, selected candidate
>                     unchanged.
>   - "C-h m", hoping to find out what the Fido keybindings are so I can
>     select the candidate.  Result: A *Help* buffer showing minor-mode
>     information, but nothing about Fido or any keybindings in the
>     minibuffer.
>
> At this point I'm not sure what Fido provides over Ido or Icomplete
> (though, again, I am not an expert on either of those, since I mostly
> use Helm and sometimes Ivy).  I'm sure it does something useful, of
> course, but from the perspective of a user new to it, I don't understand
> it yet.
>
> 4.  I happen to notice that if I type a ".", that causes the init.el
> candidate to become the sole candidate.  Deleting the "." returns the
> "*Completions*" candidate and causes it to be the selected one again.
>
> 5.  Having recently rediscovered the completion-styles option (remember,
> I mostly use Helm ;), I wonder if adding the "substring" style will
> help.  So I add it to the end of the completion-styles list and try
> again.  It makes no difference: with input "init", the init.el candidate
> is still at the end of the list and not selected.  I try putting
> "substring" at the front of completion-styles, but that also changes
> nothing.
>
> 6.  I see there's a new "flex" completion style, so I try that at the
> front of completion-styles.  Again, it makes no difference: with input
> "init", the init.el candidate is not selected, while the "*Special* »
> completion-list-mode » *Completions*" candidate is.
>
> At this point, I feel like I must be missing something or doing
> something wrong.  When I type "init", and only one of the candidates
> matches that substring, it seems like that should be the selected
> candidate.  And it seems like it should be easier to discover the
> keybinding to choose the next candidate.
>
> 7.  I disable fido-mode and enable ivy-mode.  I run "M-x
> bufler-switch-buffer" again and type "init".  The init.el candidate is
> the only candidate presented for that input, so I can hit RET to select
> it.
>
> So, whether all this indicates a PEBKAC, or a suboptimal default
> completion experience, I'm not sure.  Maybe a little of both.  I think
> that, generally, it would be helpful if Emacs's default completion
> experience were closer to what Ivy provides (though not exactly with
> Ivy's default settings, as I find its TAB binding a bit confounding, but
> that's beside the point).
>
> I hope this feedback is helpful.  Thanks to João and others for your
> work on Emacs and Fido.
>
> 0: https://github.com/alphapapa/bufler.el
>
>
>

-- 
João Távora

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

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

* Re: Feedback on fido-mode
  2020-03-09 14:42 ` João Távora
@ 2020-03-09 14:50   ` Dmitry Gutov
  2020-03-09 15:03     ` João Távora
  2020-03-09 15:59     ` Drew Adams
  2020-03-09 17:12   ` Eli Zaretskii
  1 sibling, 2 replies; 11+ messages in thread
From: Dmitry Gutov @ 2020-03-09 14:50 UTC (permalink / raw)
  To: João Távora, Adam Porter; +Cc: emacs-devel

On 09.03.2020 16:42, João Távora wrote:
> Please be aware that fido-mode is really Icomplete-mode emulating _some_
> of ido-mode's features. It's likely that the emulation will get better 
> in the future
> or even surpass ido-mode in features. But in any case, it's _not_ an 
> emulation
> of Ivy-mode (if that's what you are after in some way).

I'm reasonably sure that more of these observations would apply to 
ido-mode as well. Adam, have you tried it? Maybe with 
ido-ubiquitous-mode (so it applies to all completing-read calls).

The difference vs. Ivy is about full flex (fuzzy) matching versus only 
allowing arbitrary text where the search string has spaces. That's why 
Ivy only matches the intended buffer for the input "init".

And fuzzy matching doesn't work as well when input strings are so long.

fido-mode could benefit from a possibility to choose a search style like 
Ivy's, but first, I think, we should unbind SPC from 
minibuffer-complete-word everywhere.



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

* Re: Feedback on fido-mode
  2020-03-09 14:50   ` Dmitry Gutov
@ 2020-03-09 15:03     ` João Távora
  2020-03-09 15:06       ` Dmitry Gutov
  2020-03-09 15:59     ` Drew Adams
  1 sibling, 1 reply; 11+ messages in thread
From: João Távora @ 2020-03-09 15:03 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Adam Porter, emacs-devel

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

On Mon, Mar 9, 2020 at 2:50 PM Dmitry Gutov <dgutov@yandex.ru> wrote:

>
> fido-mode could benefit from a possibility to choose a search style like
> Ivy's, but first, I think, we should unbind SPC from
> minibuffer-complete-word everywhere.
>

Oh I'm going to resist that :-)

João

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

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

* Re: Feedback on fido-mode
  2020-03-09 15:03     ` João Távora
@ 2020-03-09 15:06       ` Dmitry Gutov
  2020-03-09 15:08         ` João Távora
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Gutov @ 2020-03-09 15:06 UTC (permalink / raw)
  To: João Távora; +Cc: Adam Porter, emacs-devel

On 09.03.2020 17:03, João Távora wrote:
> On Mon, Mar 9, 2020 at 2:50 PM Dmitry Gutov <dgutov@yandex.ru 
> <mailto:dgutov@yandex.ru>> wrote:
> 
> 
>     fido-mode could benefit from a possibility to choose a search style
>     like
>     Ivy's, but first, I think, we should unbind SPC from
>     minibuffer-complete-word everywhere.
> 
> 
> Oh I'm going to resist that :-)

Why? It's a weird command to begin with. Try 'C-h f' then press SPC 
repeatedly. You will see a line of dashes.



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

* Re: Feedback on fido-mode
  2020-03-09 15:06       ` Dmitry Gutov
@ 2020-03-09 15:08         ` João Távora
  0 siblings, 0 replies; 11+ messages in thread
From: João Távora @ 2020-03-09 15:08 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Adam Porter, emacs-devel

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

> > Oh I'm going to resist that :-)
>
> Why? It's a weird command to begin with. Try 'C-h f' then press SPC
> repeatedly. You will see a line of dashes.
>

Regardless, if you take it away you break my workflow.  That's why I
resist it.

(and I never to the space in the beginning thing, so it doesn't affect me)

-- 
João Távora

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

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

* RE: Feedback on fido-mode
  2020-03-09 14:50   ` Dmitry Gutov
  2020-03-09 15:03     ` João Távora
@ 2020-03-09 15:59     ` Drew Adams
  1 sibling, 0 replies; 11+ messages in thread
From: Drew Adams @ 2020-03-09 15:59 UTC (permalink / raw)
  To: Dmitry Gutov, João Távora, Adam Porter; +Cc: emacs-devel

> I think, we should unbind SPC from
> minibuffer-complete-word everywhere.

(I'm not really following this thread.  Just
happened to notice this suggestion.)

I proposed this at least as far back as 2005.

And like `SPC', `?' should be self-inserting
by default.  Icicles has been doing this for
15 years.  Icicles uses `M-SPC' (by default)
for word completion and `M-?' to show help.

Binding `SPC' and `?' to commands (other than
for self-insertion) is a holdover from a time
when completing minibuffer input was used
(by vanilla Emacs) pretty much only for `M-x'
and reading file names.

In 2005 we (finally!) got `SPC' to self-insert
for file names - but only for file names.

Isn't it time to let `SPC' and `?' self-insert?



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

* Re: Feedback on fido-mode
  2020-03-09 14:42 ` João Távora
  2020-03-09 14:50   ` Dmitry Gutov
@ 2020-03-09 17:12   ` Eli Zaretskii
  2020-03-09 17:14     ` João Távora
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-03-09 17:12 UTC (permalink / raw)
  To: João Távora; +Cc: adam, emacs-devel

> From: João Távora <joaotavora@gmail.com>
> Date: Mon, 9 Mar 2020 14:42:40 +0000
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
> Anyway, Eli, assuming some of these complaints are easy to fix and can 
> be fixed exclusively in fido-mode's code, what are your thoughts patching 
> it up in emacs-27?  Or is it too late for that? I'd say "it's too late" myself,
> but I'd like to hear your opinion.

It's up to you.  Since fido-mode is new in Emacs 27, there are no
fears of breaking something users expect.



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

* Re: Feedback on fido-mode
  2020-03-09 17:12   ` Eli Zaretskii
@ 2020-03-09 17:14     ` João Távora
  2020-03-09 22:43       ` Dmitry Gutov
  0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2020-03-09 17:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Adam Porter, emacs-devel

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

On Mon, Mar 9, 2020 at 5:12 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: João Távora <joaotavora@gmail.com>
> > Date: Mon, 9 Mar 2020 14:42:40 +0000
> > Cc: emacs-devel <emacs-devel@gnu.org>
> >
> > Anyway, Eli, assuming some of these complaints are easy to fix and can
> > be fixed exclusively in fido-mode's code, what are your thoughts
> patching
> > it up in emacs-27?  Or is it too late for that? I'd say "it's too late"
> myself,
> > but I'd like to hear your opinion.
>
> It's up to you.  Since fido-mode is new in Emacs 27, there are no
> fears of breaking something users expect.
>

Thanks. I've now skimmed the list and many of the complaints don't
seem to have an obvious "fix" in fido-mode or even in Emacs itself,
so unless more concrete problems appear, it's unlikely that I will be
changing anything.

João

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

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

* Re: Feedback on fido-mode
  2020-03-09 17:14     ` João Távora
@ 2020-03-09 22:43       ` Dmitry Gutov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Gutov @ 2020-03-09 22:43 UTC (permalink / raw)
  To: João Távora, Eli Zaretskii; +Cc: Adam Porter, emacs-devel

On 09.03.2020 19:14, João Távora wrote:

> Thanks. I've now skimmed the list and many of the complaints don't
> seem to have an obvious "fix" in fido-mode or even in Emacs itself,
> so unless more concrete problems appear, it's unlikely that I will be
> changing anything.

Defining named vars for styles config in fido-mode could make it easier 
to tweak, like Adam tried to do in step 5. Patch below for your 
consideration.

That's admittedly a half-measure since the 'substring' style is strictly 
less powerful than 'flex'. And we can't really use spaces for wildcards, 
so it still won't be as easy to use as Ivy or Helm.

Tweaking the 'flex' style to prefer consecutive matches more strongly 
could also improve the experience in this particular scenario, although 
I'm not sure it would be the best choice overall.

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 66bc731f67..490bf31cb0 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -320,6 +320,14 @@ icomplete-fido-mode-map
      map)
    "Keymap used by `fido-mode' in the minibuffer.")

+(defcustom icomplete-fido-completion-styles '(flex)
+  "Completion styles used by `fido-mode' in the minibuffer."
+  :type 'list)
+
+(defcustom icomplete-fido-category-defaults nil
+  "Values to use for `completion-category-defaults' in `fido-mode'."
+  :type 'list)
+
  (defun icomplete--fido-mode-setup ()
    "Setup `fido-mode''s minibuffer."
    (when (and icomplete-mode (icomplete-simple-completing-p))
@@ -328,8 +336,8 @@ icomplete--fido-mode-setup
      (setq-local icomplete-tidy-shadowed-file-names t
                  icomplete-show-matches-on-no-input t
                  icomplete-hide-common-prefix nil
-                completion-styles '(flex)
-                completion-category-defaults nil)))
+                completion-styles icomplete-fido-completion-styles
+                completion-category-defaults 
icomplete-fido-category-defaults)))

  ;;;###autoload
  (define-minor-mode fido-mode



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

end of thread, other threads:[~2020-03-09 22:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-07 15:16 Feedback on fido-mode Adam Porter
2020-03-09 14:34 ` jixiuf
2020-03-09 14:42 ` João Távora
2020-03-09 14:50   ` Dmitry Gutov
2020-03-09 15:03     ` João Távora
2020-03-09 15:06       ` Dmitry Gutov
2020-03-09 15:08         ` João Távora
2020-03-09 15:59     ` Drew Adams
2020-03-09 17:12   ` Eli Zaretskii
2020-03-09 17:14     ` João Távora
2020-03-09 22:43       ` Dmitry Gutov

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.