unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vitalie Spinu <spinuvit@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: comint-filename-completion and :exclusive completion bugs
Date: Wed, 14 Mar 2012 22:51:06 +0100	[thread overview]
Message-ID: <87pqce97hx.fsf@gmail.com> (raw)
In-Reply-To: <jwvvcm7tdw0.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 14 Mar 2012 11:45:59 -0400")

>>>> Stefan Monnier <monnier@iro.umontreal.ca>
>>>> 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	other threads:[~2012-03-14 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 11:44 comint-filename-completion and :exclusive completion bugs Vitalie Spinu
2012-03-14 13:53 ` Stefan Monnier
2012-03-14 14:54   ` Vitalie Spinu
2012-03-14 15:45     ` Stefan Monnier
2012-03-14 21:51       ` Vitalie Spinu [this message]

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=87pqce97hx.fsf@gmail.com \
    --to=spinuvit@gmail.com \
    --cc=emacs-devel@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).