[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?
From: |
Tadeus Prastowo |
Subject: |
Re: [pcomplete.el (pcomplete-completions-at-point)] Why max? |
Date: |
Tue, 19 Mar 2019 10:55:14 +0100 |
Hi everyone,
Does John still maintain the pcomplete package?
--
Best regards,
Tadeus
On Sat, Mar 16, 2019 at 11:29 PM Tadeus Prastowo
<address@hidden> wrote:
>
> Hi John,
>
> I am using Emacs at commit 4633b0e and see a problem that can be
> solved ad-hoc by using `min' instead of `max' in the following code
> within function `pcomplete-completions-at-point' in file
> `lisp/pcomplete.el':
>
> (beg (max (- (point) (length pcomplete-stub))
> (pcomplete-begin)))
>
> What do you think will break if `min' is used instead of `max' to
> repair the following problem seen using `emacs -Q' at the said commit?
>
> M-x shell
> cd /tmp
> mkdir AAAA\ BB\ CCCC
> cd AAAA\ BB<tab>
>
> Autocomplete fails because (pcomplete-begin) returns the position of
> the first letter A but (length pcomplete-stub) is the length of "AAAA
> BB", which gives the position of the second letter A. The function
> `max', therefore, sets `beg' to the start of the second letter A.
> Consequently, file-name-completion will be asked to complete "AAA BB"
> instead of the correct one "AAAA BB".
>
> Thank you.
>
> --
> Best regards,
> Tadeus
- [pcomplete.el (pcomplete-completions-at-point)] Why max?, Tadeus Prastowo, 2019/03/16
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?,
Tadeus Prastowo <=
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Stefan Monnier, 2019/03/19
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Tadeus Prastowo, 2019/03/20
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Stefan Monnier, 2019/03/20
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Tadeus Prastowo, 2019/03/20
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Stefan Monnier, 2019/03/20
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, Tadeus Prastowo, 2019/03/20
- Re: [pcomplete.el (pcomplete-completions-at-point)] Why max?, John Wiegley, 2019/03/20