unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: eliz@gnu.org, Luc Teirlinck <teirllm@dms.auburn.edu>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [michael.cadilhac@lrde.org: PC-do-completion with directories adding stars.]
Date: Mon, 06 Mar 2006 15:52:47 -0500	[thread overview]
Message-ID: <jwvfylvxpso.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87u0abqqcu.fsf@mahaena.lrde> (Michael Cadilhac's message of "Mon, 06 Mar 2006 21:18:25 +0100")

>>> When I try it, I don't get that.  Instead I just see "[Ambiguous dir name]"
>>> appended to the minibuffer for 2 seconds.
>> 
>>> Then you must have a subdirectory of ~/ starting with `a'.
>> 
>> No, that wasn't it.  It turns out the difference is that my shell is zsh.
>> If I set SHELL to bash I can now reproduce your description.
>> 
>> This happens to illustrate what I said earlier:
>>> ... Of course, this part of the code is difficult to get right because it
>>> uses an underlying shell to do the globbing ...
>> 
>> I'll see if I can find a good fix for it,

I installed a fix for it.

>   This patch fixes a minor issue with files containing spaces in their
>   name, too. [1]

Yes, my patch doesn't try to address it.

>   However, I don't see what would be a « good fix » for the general
>   completion function (not the PC one).

I'm not sure what needs fixing there.

> !     (shell-command (concat "for f in " name "; do test -e \"$f\" && echo \"$f\"; done") t)

Problem is that this will fail depending on the user's shell (zsh vs tcsh
vs bash vs rc vs ...).
We could maybe use (concat "ls " name) which would do something mostly
equivalent but slightly more portable.  But really we should just use
shell's globbing commands instead.


        Stefan

  reply	other threads:[~2006-03-06 20:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-05  0:59 [michael.cadilhac@lrde.org: PC-do-completion with directories adding stars.] Richard Stallman
2006-03-05  4:36 ` Eli Zaretskii
2006-03-05 14:00   ` Michael Cadilhac
2006-03-05 19:59     ` Eli Zaretskii
2006-03-05 20:53       ` Stefan Monnier
2006-03-05 21:05         ` Luc Teirlinck
2006-03-06  3:31           ` Stefan Monnier
2006-03-06  3:31             ` Luc Teirlinck
2006-03-06  7:43               ` Stefan Monnier
2006-03-06 14:09             ` Luc Teirlinck
2006-03-06 18:38               ` Stefan Monnier
2006-03-06 20:18                 ` Michael Cadilhac
2006-03-06 20:52                   ` Stefan Monnier [this message]
2006-03-06 21:01                     ` Michael Cadilhac
2006-03-07  4:49                       ` Eli Zaretskii
2006-03-07 11:26                         ` Juanma Barranquero
2006-03-07 19:35                           ` Eli Zaretskii
2006-03-07 23:21                             ` Juanma Barranquero
2006-03-06  0:49   ` Richard Stallman

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=jwvfylvxpso.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=teirllm@dms.auburn.edu \
    /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).