From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 8926@debbugs.gnu.org
Subject: bug#8926: 24.0.50; pcomplete regression
Date: Fri, 01 Jul 2011 06:41:50 +0200 [thread overview]
Message-ID: <87tyb6629d.fsf@gmail.com> (raw)
In-Reply-To: <jwvmxgzm30y.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 30 Jun 2011 17:19:46 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>>> Yup. Because among the various completion cases, the case for "files"
>>>>> used to return a list and now returns a function. Both are valid
>>>>> completion tables. Any caller of pcomplete-completions should expect to
>>>>> receive a completion table and not just a list of strings. It may very
>>>>> well receive a list of strings (which is one kind of completion table),
>>>>> but it may just as well receive something else.
>>>> Yes i saw that, and it's what i didn't understand.
>>>
>>> BTW, the reason for the above change was not just to fix a bug when
>>> using pcomplete-completions-at-point but also so that partial-completion
>>> now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
>>> ~/etc/emacs).
>> Yes, but the downside is now that it is hard to use by external
>> libraries outside the context of emacs shell/eshell.
>
> Presumably such code already handles completion tables, so having to
> handle a completion table rather than a list of strings shouldn't be
> that much of a problem. Calling `all-completions' shouldn't scare
> those authors.
The problem is not here, the problem is we have now to do extra
computing to extract the context (i.e command?, lisp-sym?, filename?...).
before, running `pcomplete-completions' was doing all the job, now we
have to use also (funcall (pcomplete-entries) string nil nil) to guess
filename, and then decide what to do.
e.g
(all-completions what (pcomplete-completions))
now we have to extract "what", before `pcomplete-completions' was guessing
that alone.
It would be better if it was returning always a table or always a list.
With a table we could use (funcall (pcomplete-completions)) whithout
worring about "what".
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2011-07-01 4:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 7:03 bug#8926: 24.0.50; pcomplete regression thierry
2011-06-25 16:43 ` Thierry Volpiatto
2011-06-27 1:18 ` Stefan Monnier
2011-06-27 4:21 ` Thierry Volpiatto
2011-06-30 16:51 ` Stefan Monnier
2011-06-30 16:53 ` Stefan Monnier
2011-06-30 17:45 ` Thierry Volpiatto
2011-06-30 21:19 ` Stefan Monnier
2011-07-01 4:41 ` Thierry Volpiatto [this message]
2011-07-01 14:33 ` Stefan Monnier
2011-07-01 19:30 ` Thierry Volpiatto
2011-07-01 21:59 ` Thierry Volpiatto
2011-07-04 16:00 ` Stefan Monnier
2011-06-26 13:03 ` Stefan Monnier
2011-06-26 18:17 ` Thierry Volpiatto
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tyb6629d.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=8926@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).