all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Suraj Acharya <sacharya@bea.com>
Subject: Re: Filename completion for the 'file widget
Date: Wed, 25 Aug 2004 15:34:08 -0700	[thread overview]
Message-ID: <cgj44v$ih1$1@sea.gmane.org> (raw)
In-Reply-To: <412CBF60.9030305@yahoo.com>

Kevin Rodgers wrote:

> Suraj Acharya wrote:
>  > Kevin Rodgers wrote:
>  >> That doesn't seem right.  I was going to suggest something like
>  >
>  > Why do you say it's not right? It gives me the behavior I expect, ie
>  > relative paths stay relative and I still get completion for them. It
>  > uses default-directory for the current buffer as the base for the
>  > relative path completion.
> 
> I was confusing the necessity of file-name-as-directory (which Stefan
> correctly pointed out in his response) with the functionality of
> expand-file-name.  Sorry!
> 
> ...

In this particular case I think file-name-as-directory isn't required 
because the directory name comes from file-name-directory which the docs 
hint might always add a file separator character at the end.


> 
>  >> But it's not clear to me (1) why widget-file-complete expands the
>  >> pattern nor (2) why it can safely assume the pattern has a non-nil
>  >> directory that can be passed as the second arg to
>  >> file-name-completion.
>  >
>  > (2) is definitely a bug. Asking for completion in a blank 'file widget
>  > gives "let*: Wrong type argument: stringp, nil" in the minibuffer.
> 
> It looks to me like it would fail any time the widget doesn't contain
> a directory separator, since e.g. (file-name-directory "foo") returns
> nil.  (And isn't it file-name-completion that signals the error, not
> let*?)

Yes, I was just indicating that there's at least one case where the code 
throws an error and so is buggy.

Suraj

  reply	other threads:[~2004-08-25 22:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24  0:59 Filename completion for the 'file widget Suraj Acharya
2004-08-25  0:04 ` Kevin Rodgers
2004-08-25  0:35   ` Suraj Acharya
2004-08-25 16:33     ` Kevin Rodgers
2004-08-25 22:34       ` Suraj Acharya [this message]
2004-08-25  2:31   ` Stefan
2004-08-25 20:35     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='cgj44v$ih1$1@sea.gmane.org' \
    --to=sacharya@bea.com \
    /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.