GNU bug report logs -
#18951
24.4.51; eshell-pcomplete removes asterisk when attempting completion
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Wed, 5 Nov 2014 05:52:02 UTC
Severity: normal
Tags: fixed
Found in version 24.4.51
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18951 in the body.
You can then email your comments to 18951 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Wed, 05 Nov 2014 05:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 05 Nov 2014 05:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. Open a new Eshell session.
2. Type `*'.
3. Press `TAB' (invoking `eshell-pcomplete'), or `M-x pcomplete', or
`M-x completion-at-point'.
4. See the asterisk removed as the completions buffer is displayed.
I don't think it makes much sense (just replace it when a completion is
inserted), and it's quite inconvenient when
`pcomplete-completions-at-point' is used from company-mode during idle
completion, as reported here:
https://github.com/company-mode/company-mode/issues/218
In GNU Emacs 24.4.51.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
of 2014-11-03 on axl
Repository revision: 117658 michael.albinus <at> gmx.de-20141102112256-548dk6al63uy76uh
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.1 LTS
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Wed, 01 Nov 2017 04:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18951 <at> debbugs.gnu.org (full text, mbox):
Friendly bump.
The issue is now 3 years old, is there anything I can do to help get it fixed?
With all the new eshell hype I'm experimenting with switching more of my workflow
to eshell and would like instant company autocompleteion (instead of always using
(helm-)esh-pcomplete).
Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Wed, 01 Nov 2017 12:48:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 18951 <at> debbugs.gnu.org (full text, mbox):
Daniel Kraus <daniel <at> kraus.my> writes:
> The issue is now 3 years old, is there anything I can do to help get
> it fixed?
A good start would be to step through eshell-pcomplete with edebug and
find the piece of code which deletes the asterisk.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Thu, 02 Nov 2017 07:01:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18951 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
> A good start would be to step through eshell-pcomplete with edebug and
> find the piece of code which deletes the asterisk.
It's in `pcomplete-parse-arguments` (in pcomplete.el)
Line 776 on master:
```
(when (and begin (not pcomplete-show-list))
(delete-region begin (point))
(pcomplete-insert-entry "" pcomplete-stub))
```
Hope that helps.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Thu, 02 Nov 2017 11:33:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 18951 <at> debbugs.gnu.org (full text, mbox):
Daniel Kraus <daniel <at> kraus.my> writes:
> Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
>
>> A good start would be to step through eshell-pcomplete with edebug and
>> find the piece of code which deletes the asterisk.
>
> It's in `pcomplete-parse-arguments` (in pcomplete.el)
> Line 776 on master:
> ```
> (when (and begin (not pcomplete-show-list))
> (delete-region begin (point))
> (pcomplete-insert-entry "" pcomplete-stub))
> ```
Hmm, does this do the right thing?
--- i/lisp/pcomplete.el
+++ w/lisp/pcomplete.el
@@ -772,7 +772,7 @@ pcomplete-parse-arguments
(setq c (cdr c)))
(setq pcomplete-stub (substring common-stub 0 len)
pcomplete-autolist t)
- (when (and begin (not pcomplete-show-list))
+ (when (and begin (> len 0) (not pcomplete-show-list))
(delete-region begin (point))
(pcomplete-insert-entry "" pcomplete-stub))
(throw 'pcomplete-completions completions))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Thu, 02 Nov 2017 14:17:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 18951 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
> Hmm, does this do the right thing?
>
> --- i/lisp/pcomplete.el
> +++ w/lisp/pcomplete.el
> @@ -772,7 +772,7 @@ pcomplete-parse-arguments
> (setq c (cdr c)))
> (setq pcomplete-stub (substring common-stub 0 len)
> pcomplete-autolist t)
> - (when (and begin (not pcomplete-show-list))
> + (when (and begin (> len 0) (not pcomplete-show-list))
> (delete-region begin (point))
> (pcomplete-insert-entry "" pcomplete-stub))
> (throw 'pcomplete-completions completions))
I didn't test it too much if something else breaks but it
seems to work. pcomplete doesn't remove the * and company
mode also seems to work without problems now.
Thanks
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Fri, 03 Nov 2017 21:26:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 18951 <at> debbugs.gnu.org (full text, mbox):
On 11/2/17 4:15 PM, Daniel Kraus wrote:
>
> Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
>
>> Hmm, does this do the right thing?
>>
>> --- i/lisp/pcomplete.el
>> +++ w/lisp/pcomplete.el
>> @@ -772,7 +772,7 @@ pcomplete-parse-arguments
>> (setq c (cdr c)))
>> (setq pcomplete-stub (substring common-stub 0 len)
>> pcomplete-autolist t)
>> - (when (and begin (not pcomplete-show-list))
>> + (when (and begin (> len 0) (not pcomplete-show-list))
>> (delete-region begin (point))
>> (pcomplete-insert-entry "" pcomplete-stub))
>> (throw 'pcomplete-completions completions))
>
> I didn't test it too much if something else breaks but it
> seems to work. pcomplete doesn't remove the * and company
> mode also seems to work without problems now.
Looking good in my testing, and fixes the problem. Thanks!
pcomplete-completion-at-point is still buggy, of course, but no worse
than before.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18951
; Package
emacs
.
(Sun, 05 Nov 2017 17:18:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 18951 <at> debbugs.gnu.org (full text, mbox):
tags 18951 fixed
close 18951 26.1
quit
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 11/2/17 4:15 PM, Daniel Kraus wrote:
>>> --- i/lisp/pcomplete.el
>>> +++ w/lisp/pcomplete.el
>>> @@ -772,7 +772,7 @@ pcomplete-parse-arguments
>>> (setq c (cdr c)))
>>> (setq pcomplete-stub (substring common-stub 0 len)
>>> pcomplete-autolist t)
>>> - (when (and begin (not pcomplete-show-list))
>>> + (when (and begin (> len 0) (not pcomplete-show-list))
>>> (delete-region begin (point))
>>> (pcomplete-insert-entry "" pcomplete-stub))
>>> (throw 'pcomplete-completions completions))
>>
>> I didn't test it too much if something else breaks but it
>> seems to work. pcomplete doesn't remove the * and company
>> mode also seems to work without problems now.
>
> Looking good in my testing, and fixes the problem. Thanks!
> pcomplete-completion-at-point is still buggy, of course, but no worse
> than before.
Okay, pushed to emacs-26.
[1: 5d744e032f]: 2017-11-05 11:36:20 -0500
Don't replace user input when completion prefix is empty (Bug#18951)
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5d744e032fee9ce60446a3cc0cf7c2e681ace465>
Added tag(s) fixed.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 Nov 2017 17:18:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 26.1, send any further explanations to
18951 <at> debbugs.gnu.org and Dmitry Gutov <dgutov <at> yandex.ru>
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 Nov 2017 17:18:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 04 Dec 2017 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.