From: Eduard Wiebe <usenet@pusto.de>
To: emacs-devel@gnu.org
Subject: Re: patch: write-file to arbitrary target directory
Date: Sun, 18 Nov 2007 00:22:12 +0100 [thread overview]
Message-ID: <86sl34a257.fsf@nirvana.pusto.de> (raw)
In-Reply-To: E1ItRgk-0006kv-2W@fencepost.gnu.org
Richard Stallman <rms@gnu.org> 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
next prev parent reply other threads:[~2007-11-17 23:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-17 1:09 patch: write-file to arbitrary target directory Eduard Wiebe
2007-11-17 1:34 ` Juri Linkov
2007-11-17 4:28 ` Stefan Monnier
2007-11-17 9:22 ` Eli Zaretskii
2007-11-17 13:14 ` Eduard Wiebe
2007-11-17 12:36 ` Eli Zaretskii
2007-11-17 13:03 ` Thien-Thi Nguyen
2007-11-17 22:04 ` Eduard Wiebe
2007-11-17 23:31 ` Richard Stallman
2007-11-17 9:34 ` martin rudalics
2007-11-17 13:15 ` Eduard Wiebe
2007-11-17 17:42 ` Richard Stallman
2007-11-17 23:22 ` Eduard Wiebe [this message]
[not found] ` <861waobh7m.fsf@nirvana.pusto.de>
2007-11-18 13:01 ` Richard Stallman
2007-11-19 0:01 ` Eduard Wiebe
2007-11-22 2:28 ` 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=86sl34a257.fsf@nirvana.pusto.de \
--to=usenet@pusto.de \
--cc=emacs-devel@gnu.org \
/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.