unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 26272@debbugs.gnu.org
Subject: bug#26272: default-directory: Remark that it must be a directory name
Date: Mon, 27 Mar 2017 17:43:19 +0300	[thread overview]
Message-ID: <83k27a93w8.fsf@gnu.org> (raw)
In-Reply-To: <87y3vrhvta.fsf@calancha-pc> (message from Tino Calancha on Mon,  27 Mar 2017 19:13:05 +0900)

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Mon, 27 Mar 2017 19:13:05 +0900
> 
> 
> 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.

Didn't we discuss that at some point in the past?

>    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)) */);

A word of advice for the future: it is usually best to start from
informal text that describes well what you mean in your own words, and
then "formalize" it as needed, taking care not to lose key words and
concepts.  If you compare your informal description above with the
patched doc string, I think you will agree with me that the former
says what you mean in a much more clear and concise way.  So something
important got lost in transition, and you tried to make up for that by
adding more explanations and an example.

Here's my suggestion:

  It should be a directory name (as opposed to a directory file-name).
  On GNU and Unix systems, directory names and in a slash `/'.

This basically says what your original description said, which is spot
on.

Thanks.





  reply	other threads:[~2017-03-27 14:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 10:13 bug#26272: default-directory: Remark that it must be a directory name Tino Calancha
2017-03-27 14:43 ` Eli Zaretskii [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83k27a93w8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=26272@debbugs.gnu.org \
    --cc=tino.calancha@gmail.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).