From: Oleksandr Manzyuk <manzyuk@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Inner workings of `pcomplete'
Date: Thu, 9 Feb 2012 01:02:51 +0000 [thread overview]
Message-ID: <CAAwZTsQJaiGYoLzuPC7vB8sNorKo+uV=fT3=W6ntvrHeUj57zw@mail.gmail.com> (raw)
In-Reply-To: <jwvr4y6ytma.fsf-monnier+gnu.emacs.help@gnu.org>
On Wed, Feb 8, 2012 at 3:33 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> 1. emacs -Q
>> 2. M-: (boundp 'pcomplete-stub) RET ==> nil
>> 3. M-x shell
>> 4. M-: (boundp 'pcomplete-stub) RET ==> t
>> 5. M-: (special-variable-p 'pcomplete-stub) RET ==> nil
>> 6. Open the file `pcomplete.el' (for example, by looking up the variable
>> `pcomplete-stub') and M-x eval-buffer. Now (special-variable-p
>> 'pcomplete-stub) evaluates to t.
>
>> What is going on here?
>
> Duh! Thanks for catching this. Please M-x report-emacs-bug!
Done.
>> prompt and M-: (pcomplete-completions)). However, it is also passed as
>> a table argument to the function `complete-with-action', whose
>> documentation says that this argument should not be a function.
>
> The docstring is wrong, as the first line of the code indicates ;-)
Huh, indeed. Then I rephrase my question:
`pcomplete-completions-at-point' can return non-nil even when there
are no completions, which is easy to test: in a shell buffer, I type,
say, 5, and hit TAB. Assuming that there are no files in the current
directory starting with 5, there will be no matches. However, if I
evaluate (pcomplete-completions-at-point), I get some hairy data
structure. This means, in particular, that the functions in
`comint-dynamic-complete-functions' that appear after the function
`pcomplete-completions-at-point' are not tried. Is there a way around
this? The identifier completion that I'm experimenting with logically
happens after completions for arguments of the interpreter commands
have been tried (if I put the function responsible for the identifier
completion, I get the identifier completion, but lose completion for
arguments of commands, and I'd love to have both).
Best,
Sasha
--
Oleksandr Manzyuk
http://oleksandrmanzyuk.wordpress.com
next prev parent reply other threads:[~2012-02-09 1:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3469.1328658943.15002.help-gnu-emacs@gnu.org>
2012-02-08 3:33 ` Inner workings of `pcomplete' Stefan Monnier
2012-02-09 1:02 ` Oleksandr Manzyuk [this message]
2012-02-09 21:44 ` Stefan Monnier
2012-02-07 23:31 Oleksandr Manzyuk
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='CAAwZTsQJaiGYoLzuPC7vB8sNorKo+uV=fT3=W6ntvrHeUj57zw@mail.gmail.com' \
--to=manzyuk@gmail.com \
--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.