From: Tino Calancha <tino.calancha@gmail.com>
To: 26272@debbugs.gnu.org
Subject: bug#26272: default-directory: Remark that it must be a directory name
Date: Mon, 27 Mar 2017 19:13:05 +0900 [thread overview]
Message-ID: <87y3vrhvta.fsf@calancha-pc> (raw)
The docstring of `file-name-as-directory' suggests that is
important that `default-directory' be a directory name, i.e.,
for instance in GNU/Linux ends with '/'. The docstring of
`default-directory' doesn't mention it.
--8<-----------------------------cut here---------------start------------->8---
From 1579eeb2388d65c4fe65fb37e4e5abe373de69e3 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Mon, 27 Mar 2017 19:04:29 +0900
Subject: [PATCH] default-directory: Remark that it must be a directory name
* src/buffer.c (default-directory): Update docstring.
---
src/buffer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/buffer.c b/src/buffer.c
index c1c53dd220..f0c334f08b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5754,7 +5754,10 @@ visual lines rather than logical lines. See the documentation of
DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
Qstringp,
doc: /* Name of default directory of current buffer.
-To interactively change the default directory, use command `cd'. */);
+It must be a directory name, as the output of `file-name-as-directory'.
+To interactively change the default directory, use command `cd'.
+In a Elisp program is better to do
+(setq default-directory (file-name-as-directory DIR)) */);
DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function),
Qnil,
--
2.11.0
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 25.2.4 (x86_64-pc-linux-gnu, GTK+ Version 3.22.9)
of 2017-03-27
Repository revision: fb18bff91f01a3051253319e766ca276e5b756bd
next reply other threads:[~2017-03-27 10:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 10:13 Tino Calancha [this message]
2017-03-27 14:43 ` bug#26272: default-directory: Remark that it must be a directory name Eli Zaretskii
2017-03-27 15:15 ` Tino Calancha
2017-03-27 15:32 ` Eli Zaretskii
2017-03-27 15:52 ` Noam Postavsky
2017-03-27 18:26 ` Eli Zaretskii
2017-03-27 19:23 ` Noam Postavsky
2017-03-28 1:54 ` Tino Calancha
2017-03-28 2:32 ` Eli Zaretskii
2017-03-28 8:33 ` Tino Calancha
2017-03-28 10:13 ` Andreas Schwab
2017-03-28 11:26 ` Tino Calancha
2017-03-31 8:25 ` Tino Calancha
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=87y3vrhvta.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=26272@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.