From: Tassilo Horn <tsdh@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Order of eshell/pcomplete completions when cycling
Date: Fri, 10 Apr 2015 15:53:07 +0200 [thread overview]
Message-ID: <873848m6nw.fsf@gnu.org> (raw)
In-Reply-To: <jwvpp7ci2nl.fsf-monnier+gmane.emacs.help@gnu.org> (Stefan Monnier's message of "Fri, 10 Apr 2015 08:36:39 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I suspect that there has been a time where that used to work, and in
>> the meantime the completion stuff has changed and forgotten that some
>> completion users want sorted completions also without calling
>> `completion-all-sorted-completions'.
>
> Indeed, it seems that the pcomplete completion UI code was somehow
> broken when its innards were separated to provide
> pcomplete-completion-at-point.
>
> The right fix moving forward (which I've been meaning to do but
> haven't found time for yet) is to change Eshell to not use the
> `pcomplete' command any more, but to use `completion-at-point' instead
> and to finally obsolete the `pcomplete' command.
I've just tried that:
--8<---------------cut here---------------start------------->8---
diff -u --label /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el --label \#\<buffer\ em-cmpl.el\> /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el /tmp/buffer-content-2696WcN
--- /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el
+++ #<buffer em-cmpl.el>
@@ -463,11 +463,7 @@
(interactive "p")
;; Pretend to be pcomplete so that cycling works (bug#13293).
(setq this-command 'pcomplete)
- (condition-case nil
- (if interactively
- (call-interactively 'pcomplete)
- (pcomplete))
- (text-read-only (completion-at-point)))) ; Workaround for bug#12838.
+ (completion-at-point))
(provide 'em-cmpl)
--8<---------------cut here---------------end--------------->8---
As far as I can tell, I don't see any difference to before, i.e., all
pcomplete/<command> functions are still considered, and also the order
when cycling completions is now test/, test1/, test11/, test2/ so my
value of `eshell-cmpl-compare-entry-function' seems to take effect.
It seems I can also remove the this-command workaround for bug#13293
without any negative effect. (But I didn't test too hard.)
Bye,
Tassilo
next prev parent reply other threads:[~2015-04-10 13:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 15:20 Order of eshell/pcomplete completions when cycling Tassilo Horn
2015-04-09 16:10 ` Eli Zaretskii
2015-04-10 11:08 ` Tassilo Horn
2015-04-10 11:21 ` Eli Zaretskii
2015-04-10 12:19 ` Tassilo Horn
2015-04-10 12:36 ` Stefan Monnier
2015-04-10 13:53 ` Tassilo Horn [this message]
2015-04-10 17:34 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873848m6nw.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.