GNU bug report logs - #44446
27.1; Emacs starts in wrong directory when launched from mac OS Finder

Previous Next

Package: emacs;

Reported by: Richard Brooksby <rb <at> ravenbrook.com>

Date: Wed, 4 Nov 2020 16:15:02 UTC

Severity: normal

Merged with 42836

Found in version 27.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44446 in the body.
You can then email your comments to 44446 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44446; Package emacs. (Wed, 04 Nov 2020 16:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Brooksby <rb <at> ravenbrook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Nov 2020 16:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Brooksby <rb <at> ravenbrook.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Emacs starts in wrong directory when launched from mac OS Finder
Date: Wed, 4 Nov 2020 16:04:12 +0000
Launching a build of Emacs 27.1-1 downloaded from
<https://emacsformacosx.com/> from the mac OS Finder starts Emacs in "/"
rather than the user's home directory, as it did in Emacs 26.

There appears to be explicit code for handling this case in main.c (see <https://github.com/emacs-mirror/emacs/blob/emacs-26/src/emacs.c#L1304-L1323>), and that
code has changed between Emacs 26 and 27 (see
<https://github.com/emacs-mirror/emacs/commit/900276502fbb4dcabdabc5d7d24b4bc5645f2cf3>)
so it looks to me (at first glance) like this change is the culprit.

Further evidence:

- StackExchange
  <https://apple.stackexchange.com/questions/399187/how-to-set-default-directory-for-emacs-27-1-app/405575#405575>
- build-emacs <https://github.com/caldwell/build-emacs/issues/98>


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.1671
System Description:  Mac OS X 10.14.6

Recent messages:
Mark set
Mark saved where search started [2 times]
Mark set
Quit
Mark set
C-x C-g is undefined
Quit [2 times]
Making completion list...
Mark saved where search started
<right-fringe> <mouse-1> is undefined

Configured using:
'configure --with-ns '--enable-locallisppath=/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_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C/*l

Minor modes in effect:
  bug-reference-prog-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml
mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ruby-mode
smie eieio-opt speedbar sb-image ezimage dframe find-func thingatpt
help-fns radix-tree vc-git bug-reference texinfo cl-extra help-mode
novice misearch multi-isearch dired-aux solarized-rb-theme todotxt-mode
p4 derived edmacro kmacro cl ps-print ps-print-loaddefs ps-def lpr
diff-mode easy-mmode dired dired-loaddefs compile comint ansi-color ring
server finder-inf package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib 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 231923 8254)
(symbols 48 16774 1)
(strings 32 64106 2048)
(string-bytes 1 1899286)
(vectors 16 22498)
(vector-slots 8 288882 15198)
(floats 8 287 160)
(intervals 56 4255 0)
(buffers 1000 19))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44446; Package emacs. (Wed, 04 Nov 2020 21:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 44446 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Richard Brooksby <rb <at> ravenbrook.com>
Cc: 44446 <at> debbugs.gnu.org
Subject: Re: bug#44446: 27.1; Emacs starts in wrong directory when launched
 from mac OS Finder
Date: Wed, 04 Nov 2020 23:43:06 +0200
Richard Brooksby <rb <at> ravenbrook.com> writes:

> Launching a build of Emacs 27.1-1 downloaded from
> <https://emacsformacosx.com/> from the mac OS Finder starts Emacs in "/"
> rather than the user's home directory, as it did in Emacs 26.

This is fixed in Bug#42836
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42836




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44446; Package emacs. (Thu, 05 Nov 2020 07:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 44446 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>,
 Richard Brooksby <rb <at> ravenbrook.com>
Cc: 44446 <at> debbugs.gnu.org
Subject: Re: bug#44446: 27.1; Emacs starts in wrong directory when launched
 from mac OS Finder
Date: Wed, 4 Nov 2020 23:33:03 -0800
forcemerge 42836 44446
thanks

Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:

> Richard Brooksby <rb <at> ravenbrook.com> writes:
>
>> Launching a build of Emacs 27.1-1 downloaded from
>> <https://emacsformacosx.com/> from the mac OS Finder starts Emacs in "/"
>> rather than the user's home directory, as it did in Emacs 26.
>
> This is fixed in Bug#42836
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42836

Merged.  Looks like the fix will be in 27.2.




Forcibly Merged 42836 44446. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 05 Nov 2020 07:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.