[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch: write-file to arbitrary target directory
From: |
Eduard Wiebe |
Subject: |
Re: patch: write-file to arbitrary target directory |
Date: |
Sun, 18 Nov 2007 00:22:12 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) |
Richard Stallman <address@hidden> writes:
> The change looks useful, but there may be a problem.
>
> ! (let ((dir (file-name-directory (buffer-name)))
> ! (file (file-name-nondirectory (buffer-name))))
>
> DIR will nearly always be nil, because buffer names normally
> do not include directory parts.
Right. With 'ido' package user can create buffers with arbitrary names.
> Thus, not using default-directory here
>
> ! (read-file-name "Write file: "
> ! dir (expand-file-name file dir) nil file)))
>
> seems like a bug.
I am not sure.
> What is the aim of that particular change?
Consider the case above, buffer has directory parts in name. By
calling 'write-file' i expect a proposal of directory name with these
directory parts of buffer name.
And if DIR is nil, read-file-name use 'default-directory' anyway.
(If i am not mistaken.)
> Aside from that, it needs changes in the manual (maybe in more than
> one place).
I try to identify these.
--
Eduard Wiebe
Re: patch: write-file to arbitrary target directory, martin rudalics, 2007/11/17
Re: patch: write-file to arbitrary target directory, Richard Stallman, 2007/11/17
- Re: patch: write-file to arbitrary target directory,
Eduard Wiebe <=
- Message not available