From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Devlin Newsgroups: gmane.emacs.bugs Subject: bug#42836: 27.1; default-directory is set to "/" after startup Date: Wed, 12 Aug 2020 16:53:56 -0400 Message-ID: <460AAF63-B6EC-4AE7-8259-1808D46A5BFD@toadstyle.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3652.0.5\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8220"; mail-complaints-to="usenet@ciao.gmane.io" To: 42836@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 12 22:55:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5xmA-00021m-8T for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 22:55:10 +0200 Original-Received: from localhost ([::1]:58404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5xm9-0006vj-AT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 16:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5xm2-0006ua-9j for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 16:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5xm2-0002EC-0h for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 16:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5xm1-0002Xy-W9 for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 16:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Devlin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2020 20:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42836 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15972656459719 (code B ref -1); Wed, 12 Aug 2020 20:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Aug 2020 20:54:05 +0000 Original-Received: from localhost ([127.0.0.1]:45667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5xl6-0002Wh-Lr for submit@debbugs.gnu.org; Wed, 12 Aug 2020 16:54:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5xl4-0002WY-4N for submit@debbugs.gnu.org; Wed, 12 Aug 2020 16:54:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5xl3-0006pw-MP for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 16:54:01 -0400 Original-Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:35697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5xl1-00025e-Ay for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 16:54:01 -0400 Original-Received: by mail-qt1-x844.google.com with SMTP id b25so2672138qto.2 for ; Wed, 12 Aug 2020 13:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=AQ8D+EMODqUANlhQQboxUAMEIiwBmbbpXabePJyc5EE=; b=Fe70W7qTNvbZ1s7YFvcQBuD+LxOp7F3sQpAJCLgdntTBSrUEcpBFYJcVft6ssPLx6T jfnw6tSXOopYeNkAx4peLEUobduG4mHfRPSfNhjPkzr4ZyRxgK8hkySB9nczn4pVHtzI LROsYLDzwC+cZYa97nKmHy21e6x0qFNCppt0smMk4+DQDkwIckDo64acmWqw+4EpIKpK lHduZmc8xXswYYtK17fkK7SBb/UaCznqVFpCmKqr0tu8DMPQ9dXpCkL0bdrwoDZhHwjl rFWPxQmPY5QxmUefbfADWhkxUqnveXzitI1phFCidPbR2JVYlCcH0x3xIv5fg2nuF9GM ImUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=AQ8D+EMODqUANlhQQboxUAMEIiwBmbbpXabePJyc5EE=; b=bpqsdbhJ9iAc1nZUGmh21jtQyYy6fQj8/y/UxYcngB0SmXY5K+jOTlNut8AcVl/YbR jMwqQFOE2tcoLVNxvtt6ybGSh5BueSk+jjnnbjfUQPcII1kmcIj+QwoJIp8mhaHo525Y H1yGcuuX8Xp7w3ZEYFqke+Yz7JLxKl7j7+qKd7ieup92vEwUAJ3XHNJYUbJDhQLsTLPY nc4MRfmdL0dncoKBa4j6tcLaqNJEVpWflZMG2MrQAaqgZeyJxMMeLjfvAXB312yLBMJq MjKiNuyaJuWgiikCIjQYIny3Zt9YZCe5Km3ur325WCpfjHoUylawHEtSAsgBmTwH+xkE FNUg== X-Gm-Message-State: AOAM531Np3vutgSsOHZi4PKZqMY9EBuNz4RIYzbEc5qppSgps7OV6/5C FW4bK6z4EFR9t/B86EUy0iBqqfpoonMMIg== X-Google-Smtp-Source: ABdhPJwvnmGik310f3Fj2ITnquMySkWVUuM4fiQg4QY1zqm+0C8asA58IJhBAIREnlfzLd45e13CXQ== X-Received: by 2002:ac8:604f:: with SMTP id k15mr1759062qtm.338.1597265637421; Wed, 12 Aug 2020 13:53:57 -0700 (PDT) Original-Received: from localhost ([2604:2000:14c6:84b0:3096:fb74:916b:67a3]) by smtp.gmail.com with ESMTPSA id u39sm4194769qtc.54.2020.08.12.13.53.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2020 13:53:57 -0700 (PDT) X-Mailer: Apple Mail (2.3652.0.5) Received-SPF: pass client-ip=2607:f8b0:4864:20::844; envelope-from=spd@toadstyle.org; helo=mail-qt1-x844.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184877 Archived-At: Hi folks, When I start Emacs, the value of default-directory in the *scratch* and *Messages* buffers is "/". In previous versions of Emacs, it was "~/". I am on macOS, and I installed Emacs 27.1 as packaged by https://emacsformacosx.com. There is information about how this is built and packaged here: https://emacsformacosx.com/about. Basically, it provides a .app bundle as per typical on macOS. This lets you open Emacs by clicking on the application icon or running "open -a Emacs" from the terminal. You can also run it directly by invoking the full path to the executable (e.g. /Applications/Emacs.app/Contents/MacOS/Emacs) from the terminal. When I open Emacs 27.1 by either of the first two methods, the value of default-directory in the *scratch* and *Messages* buffers is "/". This is true even though the process working directory is my home directory, which I verified by running "lsof -a -d cwd -p $(pgrep -i emacs)" after starting Emacs. I reinstalled a copy of Emacs 26.3 and verified default-directory used to be "~/" in these buffers after startup. When I open Emacs 27.1 by invoking the executable directly (i.e. the last method above), the default-directory in those buffers is "~/". I have performed all the above steps using the "-Q" argument to make sure my own configuration is not confounding anything. I think you should be able to reproduce by the following steps: 1. Download Emacs from https://emacsformacosx.com and install the application. (I think https://emacsformacosx.com/emacs-builds/Emacs-27.1-universal.dmg is the right URL.) 2. In a terminal, run "open -a Emacs --args -Q" to start Emacs. 3. Once Emacs starts, switch to the *scratch* buffer and evaluate "default-directory" or "(pwd)" and observe the result. I tried to do a little digging to determine how and when this variable is first set to "/", but I couldn't figure it out. It seems that the default directory is already "/" by the time early-init.el runs. I determined this by putting "(message default-directory)" in my early-init.el file and checking the messages buffer after startup. Please let me know if there's any more information I can provide. Thanks! In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 = Version 10.14.6 (Build 18G95)) of 2020-08-12 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2004 System Description: macOS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set Mark deactivated Making completion list... Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 44955 6142) (symbols 48 5927 1) (strings 32 15262 1819) (string-bytes 1 504806) (vectors 16 10186) (vector-slots 8 126975 12482) (floats 8 19 42) (intervals 56 201 0) (buffers 1000 12))