emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint-filename-completion and :exclusive completion bugs


From: Vitalie Spinu
Subject: Re: comint-filename-completion and :exclusive completion bugs
Date: Wed, 14 Mar 2012 22:51:06 +0100
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.94 (gnu/linux)

>>>> Stefan Monnier <address@hidden>
>>>> on Wed, 14 Mar 2012 11:45:59 -0400 wrote:

  > If you need to modify the return value of comint-filename-completion in
  > non-trivial ways, I recommend

  >  (pcase (comint-filename-completion)
  >    (`(,beg ,end ,table . ,props)
  >     <blabla>))

This stuff is amazing. But it took me a while to figure out the
docs. Would be nice to have an info with a small example for each type
of pattern in the docs. Thanks a bunch for the package!

  >> Comint-filename-completion returns a list of length 2 or 3 depending on
  >> filesuffix.

  > Hmm... AFAICT, it's either 0, 3, or 5.

  >> So to tweak it, I have to check for the length, if 2, append, if
  >> 3 insert :exclusive into the last list.  Ugly as far as I am concerned.

  > If you only want to add :exclusive, (append <data> '(:exclusive no))
  > should work (except for the case where <data> is nil).

Oh, yes you are right. I was confused with the help of
completion-at-point-functions. PROPS is a tail not a list by itself:)

Thanks, that definitely solves the problem, no need for another version
of completion function.

Vitalie.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]