From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#26272: default-directory: Remark that it must be a directory name Date: Mon, 27 Mar 2017 19:13:05 +0900 Message-ID: <87y3vrhvta.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1490609660 6949 195.159.176.226 (27 Mar 2017 10:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Mar 2017 10:14:20 +0000 (UTC) To: 26272@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 27 12:14:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csRf7-0000em-Me for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Mar 2017 12:14:09 +0200 Original-Received: from localhost ([::1]:45734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csRfD-0004Iw-Mq for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Mar 2017 06:14:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csRf6-0004Ia-96 for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:14:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csRf0-0001JF-Nx for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:14:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csRf0-0001J5-H8 for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1csRf0-0002LF-9v for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Mar 2017 10:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14906096198957 (code B ref -1); Mon, 27 Mar 2017 10:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Mar 2017 10:13:39 +0000 Original-Received: from localhost ([127.0.0.1]:46845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csRed-0002KP-0x for submit@debbugs.gnu.org; Mon, 27 Mar 2017 06:13:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csReb-0002KB-Ke for submit@debbugs.gnu.org; Mon, 27 Mar 2017 06:13:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csReS-0000eH-HB for submit@debbugs.gnu.org; Mon, 27 Mar 2017 06:13:32 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1csReS-0000e4-CY for submit@debbugs.gnu.org; Mon, 27 Mar 2017 06:13:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csReI-0003pN-3M for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:13:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csReA-0000Pk-0O for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:13:18 -0400 Original-Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]:34039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csRe9-0000Ob-OE for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2017 06:13:09 -0400 Original-Received: by mail-pg0-x231.google.com with SMTP id 21so35598120pgg.1 for ; Mon, 27 Mar 2017 03:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=FETEWCXwOEots/77Xv94gq/Uv/h8ckTwQJ6/2QHE7fA=; b=ExphoqdWq7dkTV9ZYpwV7eNEkzMnZE2LnoRZf9hioA6efPkquPlrM5GaidO1janFfd 9BKBGexDqpyb+WuI4/gR39uN0I0g0F+jVXOMWXcqosukISZkx/AoYgNuAEc6gOJ967UZ WE9vz1+kk5LyIuldYogQxWBvNY0loUF7xX6SMZW3PV7S1wtWffEGM3trUhI3gNTQwcn4 1mRvWo/qW66y0NkIMr1x9B+K86UAON95zsD27ywn6vE82CvREGLqvSWsbTIIbFxBu7Ja lG5GHvtSRpL0PEDbslkNAy7RUwMwk4rSZ6I3HFmxsv+JLouaxLhvmTaqBuPh7HC9zRZ6 0kRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=FETEWCXwOEots/77Xv94gq/Uv/h8ckTwQJ6/2QHE7fA=; b=BGWDfJE1tXjP9/Z8Vg9qWRHqDgx3XthyYoo7d8Sa7PuORe+A1KTE28YC6yV5iiRXWV 57LheR+usahlaweIH5Oj9rVbHF0Q4vvflMLmd2r9tAregE80ZMvuoUcuNzdNdkMegr0n iNKqsW0vbmX+2ZVbjmuAIpa/W16eAjGC3Ii3mqqoo46hZII1jhYeOpEIClkLXQOTz3b5 DlmS628KwOfR2OQ2etw6CQQsRQGO9ZnW9m+8f84s8Y3vpC9nIxtayVnjzPLT1Aw2DPFY ZDxC1IUtO8spiVKfjcmeb5K0DIGEG8v4AZmrojJJB8ZVUDIBsscDWMaX+6bN0xFroKNA 2YLw== X-Gm-Message-State: AFeK/H1WHUKEwwdYyj9eHuNyGoRjXWYd3EBLpu+hGN+I8vI56ltWBOnhUd+vcOJ46MxsNg== X-Received: by 10.98.11.8 with SMTP id t8mr24211045pfi.195.1490609588623; Mon, 27 Mar 2017 03:13:08 -0700 (PDT) Original-Received: from calancha-pc (234.204.100.220.dy.bbexcite.jp. [220.100.204.234]) by smtp.gmail.com with ESMTPSA id v17sm154039pgc.20.2017.03.27.03.13.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Mar 2017 03:13:08 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131006 Archived-At: 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 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