From: Drew Adams <drew.adams@oracle.com>
To: 33339@debbugs.gnu.org
Subject: bug#33339: 26; doc string of `write-file`
Date: Sat, 10 Nov 2018 14:42:16 -0800 (PST) [thread overview]
Message-ID: <1c69fed6-2e30-46a2-92dd-7f8ae6d62928@default> (raw)
"If you specify just a directory name as FILENAME, that means to use
the default file name but in that directory. You can also yank
the default file name into the minibuffer to edit it, using M-n."
"The default file name" is undefined. How is a user to know what we
mean? It turns out that in this particular case what we mean is this:
(file-name-nondirectory (or buffer-file-name (buffer-name)))
Not obvious from the description.
To start with, the doc string should say that it prompts for a file
name. If the current buffer is visiting a file then that file's name is
the default file name for reading. Otherwise the buffer name is the
default file name for reading.
The last part could be more exact. The default name in that case is
actually this:
(expand-file-name (file-name-nondirectory (buffer-name))
default-directory)
In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.16299
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
next reply other threads:[~2018-11-10 22:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 22:42 Drew Adams [this message]
2018-11-11 16:20 ` bug#33339: 26; doc string of `write-file` Eli Zaretskii
[not found] <<1c69fed6-2e30-46a2-92dd-7f8ae6d62928@default>
[not found] ` <<83h8gna8mj.fsf@gnu.org>
2018-11-11 16:55 ` Drew Adams
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=1c69fed6-2e30-46a2-92dd-7f8ae6d62928@default \
--to=drew.adams@oracle.com \
--cc=33339@debbugs.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.