all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18951: 24.4.51; eshell-pcomplete removes asterisk when attempting completion
@ 2014-11-05  5:50 Dmitry Gutov
  2017-11-01  4:16 ` bug#18951: " Daniel Kraus
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2014-11-05  5:50 UTC (permalink / raw)
  To: 18951

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@gmx.de-20141102112256-548dk6al63uy76uh
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS





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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2014-11-05  5:50 bug#18951: 24.4.51; eshell-pcomplete removes asterisk when attempting completion Dmitry Gutov
@ 2017-11-01  4:16 ` Daniel Kraus
  2017-11-01 12:46   ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Kraus @ 2017-11-01  4:16 UTC (permalink / raw)
  To: 18951

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!





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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-01  4:16 ` bug#18951: " Daniel Kraus
@ 2017-11-01 12:46   ` Noam Postavsky
  2017-11-02  7:00     ` Daniel Kraus
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2017-11-01 12:46 UTC (permalink / raw)
  To: Daniel Kraus; +Cc: 18951

Daniel Kraus <daniel@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.





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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-01 12:46   ` Noam Postavsky
@ 2017-11-02  7:00     ` Daniel Kraus
  2017-11-02 11:32       ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Kraus @ 2017-11-02  7:00 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 18951

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


Noam Postavsky <npostavs@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-02  7:00     ` Daniel Kraus
@ 2017-11-02 11:32       ` Noam Postavsky
  2017-11-02 14:15         ` Daniel Kraus
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2017-11-02 11:32 UTC (permalink / raw)
  To: Daniel Kraus; +Cc: 18951

Daniel Kraus <daniel@kraus.my> writes:

> Noam Postavsky <npostavs@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))






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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-02 11:32       ` Noam Postavsky
@ 2017-11-02 14:15         ` Daniel Kraus
  2017-11-03 21:25           ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Kraus @ 2017-11-02 14:15 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 18951

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


Noam Postavsky <npostavs@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-02 14:15         ` Daniel Kraus
@ 2017-11-03 21:25           ` Dmitry Gutov
  2017-11-05 17:17             ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2017-11-03 21:25 UTC (permalink / raw)
  To: Daniel Kraus, Noam Postavsky; +Cc: 18951

On 11/2/17 4:15 PM, Daniel Kraus wrote:
> 
> Noam Postavsky <npostavs@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.





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

* bug#18951: eshell-pcomplete removes asterisk when attempting completion
  2017-11-03 21:25           ` Dmitry Gutov
@ 2017-11-05 17:17             ` Noam Postavsky
  0 siblings, 0 replies; 8+ messages in thread
From: Noam Postavsky @ 2017-11-05 17:17 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Daniel Kraus, 18951

tags 18951 fixed
close 18951 26.1
quit

Dmitry Gutov <dgutov@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>





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

end of thread, other threads:[~2017-11-05 17:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05  5:50 bug#18951: 24.4.51; eshell-pcomplete removes asterisk when attempting completion Dmitry Gutov
2017-11-01  4:16 ` bug#18951: " Daniel Kraus
2017-11-01 12:46   ` Noam Postavsky
2017-11-02  7:00     ` Daniel Kraus
2017-11-02 11:32       ` Noam Postavsky
2017-11-02 14:15         ` Daniel Kraus
2017-11-03 21:25           ` Dmitry Gutov
2017-11-05 17:17             ` Noam Postavsky

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.