reddit / emacs

(Me) Default emacs completions are good, I swear!

gdunk2 · 2022-10-08 23:25
thetemp_ · 2022-10-09 00:10
Nice! You said you like having the separate "\*Completions\*" buffer, but for anyone else trying to give preference to built-in packages, there is also `icomplete-vertical` and `fido-vertical`. I like `vertico`, but I might give this a try, because... because I'm never satisfied.
yedefash · 2022-10-09 01:09
can you share your .emacs.d ?
itistheblurstoftimes · 2022-10-09 02:42
or just all of that code in one place
MagpieMars · 2022-10-09 05:13
You've convinced me to switch from `icomplete-vertical` to emacs default completions Especially with: (setq completions-max-height 20) (setq completion-auto-select nil) Being able to maintain focus and set the height is great!
1nc0ns1st3nt · 2022-10-09 07:35
I think my experience with incomplete and Fido is that, it's laggy, slower than vertico. Which is why I always go back to vertico. But functionality wise they do the same thing. Wouldn't it be cool for Emacs work out of the box :). Oh I think it's because incomplete and Fido map doesn't take effect that's why...
[deleted] · 2022-10-09 09:25
[deleted]
lrochfort · 2022-10-09 09:29
RemindMe! Tomorrow "check Emacs completions"
RemindMeBot · 2022-10-09 09:30
I will be messaging you in 1 day on [**2022-10-10 09:29:12 UTC**](http://www.wolframalpha.com/input/?i=2022-10-10%2009:29:12%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/emacs/comments/xz6oq8/me_default_emacs_completions_are_good_i_swear/irm6qdz/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Femacs%2Fcomments%2Fxz6oq8%2Fme_default_emacs_completions_are_good_i_swear%2Firm6qdz%2F%5D%0A%0ARemindMe%21%202022-10-10%2009%3A29%3A12%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%20xz6oq8) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|
gdunk2 · 2022-10-09 09:44
Here's all the elisp from the post (setq completions-format 'one-column (setq completions-header-format nil) (setq completions-max-height 20) (setq completion-auto-select nil) (define-key minibuffer-mode-map (kbd "C-n") 'minibuffer-next-completion) (define-key minibuffer-mode-map (kbd "C-p") 'minibuffer-previous-completion) (define-key completion-in-region-mode-map (kbd "C-n") 'minibuffer-next-completion) (define-key completion-in-region-mode-map (kbd "C-p") 'minibuffer-previous-completion) (defun my/minibuffer-choose-completion (&optional no-exit no-quit) (interactive "P") (with-minibuffer-completions-window (let ((completion-use-base-affixes nil)) (choose-completion nil no-exit no-quit)))) (define-key completion-in-region-mode-map (kbd "M-RET") 'my/minibuffer-choose-completion)
gdunk2 · 2022-10-09 09:49
Great to hear! One thing that's missing here compared to external completion frameworks is live narrowing of the completions buffer to match what's already been typed. I thought that I couldn't live without this feature (mct.el had it), but now I just find myself hitting <TAB> whenever I actually do need the buffer to be narrowed. Most of the time, when I'm completing something, I already know what it is, so I'm never really 'reading' the completions (unless I'm, say, C-h o'ing a symbol that I forgot the name of and hoping emacs will find it for me. In that case, live completion would be nice but hitting <tab>, for me anyway, isn't really that burdensome of a task).
deaddyfreddy · 2022-10-09 11:31
> Default emacs completions > Emacs 29 well, maybe in ten more years it will finally get something as good as `ivy` and `helm`
terminal_cope · 2022-10-09 12:33
So perhaps I am oblivious about what I'm missing, but switching to vertico et al from ivy a whole ago I don't feel like I lost anything. I feel like it's as good and sometimes better.
L-Szos · 2022-10-09 12:57
Apropos advice, if you have a way to detect the context when you want to use your new version vs the original version, you could define around advice which dispatches the correct logic depending upon the context.
[deleted] · 2022-10-09 15:10
[deleted]
thetemp_ · 2022-10-09 17:25
Hm. I don't remember that being a problem, but I switched back to Vertico a while back. The main thing I remember was that the annotations from Marginalia didn't align properly with icomplete/fido. Buuuut, there was probably more to it or I wouldn't have switched back, so I dunno.
thetemp_ · 2022-10-09 17:37
I just noticed that your "C-n" binding (`minibuffer-next-completion`) also brings up the completions. The need to hit "TAB" was honestly irritating me, but I would normally hit "C-n" anyway to select the completion I wanted. But I do like being able to avoid the distraction of showing the completions when they aren't needed. I usually do end up selecting from the list, regardless of whether it's the most efficient way, so maybe this will encourage me to do that a little less often.
1nc0ns1st3nt · 2022-10-09 18:28
Ahh, you are right about that also, the sum of those minor inconvenience outweighs the benefit of using this built-in completion framework.
gdunk2 · 2022-10-09 18:43
Yes, I noticed that too! A very convenient byproduct of that keybinding!
redguardtoo · 2022-10-10 00:33
Is there any performance measurement for bulitin completions?