GNU bug report logs - #40924
27.0.91; default-directory launched via Dock MacOS

Previous Next

Package: emacs;

Reported by: Tak Kunihiro <tak.kunihiro <at> gmail.com>

Date: Tue, 28 Apr 2020 08:52:01 UTC

Severity: normal

Tags: fixed

Found in version 27.0.91

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 40924 in the body.
You can then email your comments to 40924 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#40924; Package emacs. (Tue, 28 Apr 2020 08:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tak Kunihiro <tak.kunihiro <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 28 Apr 2020 08:52:02 GMT) Full text and rfc822 format available.

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

From: Tak Kunihiro <tak.kunihiro <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: help-gnu-emacs <at> gnu.org, tak.kunihiro <at> gmail.com
Subject: 27.0.91; default-directory launched via Dock MacOS
Date: Tue, 28 Apr 2020 17:24:50 +0900 (JST)
I want to launch emacs via Dock or Spotlight on MacOS.

From scratch buffer on emacs 26.3, C-x C-f prompts home directory
"~/".  However, from scratch buffer on emacs 27.0.91, C-x C-f prompts
root directory "/", which is inconvenient.

When emacs 27.0.91 is started in home directory, C-x C-f prompts
"~/", as expected.

I think that C-x C-f should prompt home directory "~/" instead of root
directory "/" when emacs is launched via Dock or Spotlight.  Since
that worked good until emacs 26.3, something was changed on emacs 27.

Can you store the behavior back?  I show the recipe below to reproduce
the problem.

 $ cd; mv .emacs.d dot.emacs.d
 click emacs 27.0.91 on Dock
 C-x b *scratch*
 C-x C-f ; => Find file: /
 M-x kill-emacs

 $ ./Downloads/emacs-27.0.91/nextstep/Emacs.app/Contents/MacOS/Emacs &
 C-x b *scratch*
 C-x C-f ; => Find file: ~/
 M-x kill-emacs

 click emacs 26.3 on Dock
 C-x b *scratch*
 C-x C-f ;=> Find file: ~/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40924; Package emacs. (Sun, 03 May 2020 02:53:02 GMT) Full text and rfc822 format available.

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

From: Tak Kunihiro <tak.kunihiro <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 27.0.91; default-directory launched via Dock MacOS
Date: Sun, 3 May 2020 11:52:49 +0900
> From scratch buffer on emacs 26.3, C-x C-f prompts home directory
> "~/".  However, from scratch buffer on emacs 27.0.91, C-x C-f prompts
> root directory "/", which is inconvenient.

When launched from Dock, on scratch buffer, default-directory is set to “~/“
and “/“ on 26.3 and 27.0.91, respectively.  I checked environmental variables
on 26.3 and 27.0.91 as shown below.  There is no difference, as expected.


* emacs 27.0.91 from dock


$ mv .emacs.d dot.emacs.d
launch emacs-27.0.91 from Dock

(switch-to-buffer "*scratch*")
(with-output-to-temp-buffer "*Result*"
  (princ (format "default-directory=%s\n" default-directory))
  (princ (mapconcat 'identity process-environment "\n")))

default-directory=/
TERM=dumb
LANG=en_JP.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=org.gnu.Emacs.5376
TMPDIR=/var/folders/j1/1j1j4tj11wjg257v4vj1qh7r0000gn/T/
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
SHELL=/bin/bash
HOME=/Users/tkk
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.sn3vHBJoI0/Listeners
LOGNAME=tkk
PATH=/usr/bin:/bin:/usr/sbin:/sbin
USER=tkk


* emacs 27.0.91 from terminal


$ mv .emacs.d dot.emacs.d
$ ~/Downloads/emacs-27.0.91/nextstep/Emacs.app/Contents/MacOS/Emacs &

(switch-to-buffer "*scratch*")
(with-output-to-temp-buffer "*Result*"
  (princ (format "default-directory=%s\n" default-directory))
  (princ (mapconcat 'identity process-environment "\n")))

default-directory=~/
LANG=en_JP.UTF-8
_=/Users/tkk/Downloads/emacs-27.0.91/nextstep/Emacs.app/Contents/MacOS/Emacs
COLORTERM=truecolor
PERL_MM_OPT=INSTALL_BASE=/Users/tkk/perl5
ALTERNATE_EDITOR=/Applications/Emacs.app/Contents/MacOS/Emacs
LC_TERMINAL=iTerm2
PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig
LC_CTYPE=UTF-8
VISUAL=vi
LOGNAME=tkk
ITERM_SESSION_ID=w0t0p0:45E1D075-35E1-42BC-AE8D-50A61792E779
PERL_LOCAL_LIB_ROOT=/Users/tkk/perl5:/Users/tkk/perl5
RUNEMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
LC_TERMINAL_VERSION=3.3.8
COLORFGBG=0;15
HOME=/Users/tkk
SHLVL=2
TEXINPUTS=.:/Users/tkk/texmf/tex/latex//:
HISTCONTROL=ignoredups
XPC_SERVICE_NAME=0
HISTIGNORE=[   ]*:&:bg:fg:exit
PS1=\[\e]2;\u@\h \w\a\e[1;32m\]\h\[\e[0m\]> 
TMUX_PANE=%1
XPC_FLAGS=0x0
ITERM_PROFILE=Default
EDITOR=vi
PWD=/Users/tkk
WWW_HOME=http://dream.misasa.okayama-u.ac.jp/
PATH=/Users/tkk/perl5/bin:/Applications/Skim.app/Contents/SharedSupport/:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/usr/sbin:/Users/tkk/bin:/Users/tkk/xtreeml/bin:/Users/tkk/xtreeml/perl:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/tkk/perl5/bin:/Applications/Skim.app/Contents/SharedSupport/:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/Users/tkk/bin:/Users/tkk/xtreeml/bin:/Users/tkk/xtreeml/perl
EMACSCLIENT=/Applications/Emacs.app/Contents/MacOS/bin/emacsclient
TMUX=/private/tmp/tmux-501/default,48628,0
BASH_SILENCE_DEPRECATION_WARNING=1
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.sn3vHBJoI0/Listeners
USER=tkk
CDPATH=.:/Users/tkk:/Users/tkk/SpotDrive:/Users/tkk/Dropbox
LC_ALL=en_US.UTF-8
PERL_BADLANG=0
PERL_MB_OPT=--install_base "/Users/tkk/perl5"
TERM_SESSION_ID=w0t0p0:45E1D075-35E1-42BC-AE8D-50A61792E779
OLDPWD=/Users/tkk/.emacs.d
XTREEML=/Users/tkk/xtreeml
TERM_PROGRAM_VERSION=3.3.8
PERL5LIB=/Users/tkk/perl5/lib/perl5:/Users/tkk/xtreeml/perl:/Users/tkk/perl5/lib/perl5:/Users/tkk/xtreeml/perl:
TMPDIR=/var/folders/j1/1j1j4tj11wjg257v4vj1qh7r0000gn/T/
SHELL=/bin/bash
TERM=dumb
BSTINPUTS=.:/Users/tkk/texmf/bibtex/bst//:
TERM_PROGRAM=iTerm.app
MANPATH=/opt/local/share/man:/usr/share/man:/usr/local/share/man:/Library/TeX/Distributions/.DefaultTeX/Contents/Man:/opt/local/share/man
BIBINPUTS=.:/Users/tkk/texmf/bibtex/bib//:


* emacs 26.3 from Dock


$ mv .emacs.d dot.emacs.d
launch emacs-26.3 from Dock

(switch-to-buffer "*scratch*")
(with-output-to-temp-buffer "*Result*"
  (princ (format "default-directory=%s\n" default-directory))
  (princ (mapconcat 'identity process-environment "\n")))

default-directory=~/
TERM=dumb
LANG=en_JP.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=org.gnu.Emacs.4972
TMPDIR=/var/folders/j1/1j1j4tj11wjg257v4vj1qh7r0000gn/T/
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
SHELL=/bin/bash
HOME=/Users/tkk
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.sn3vHBJoI0/Listeners
LOGNAME=tkk
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_14:/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_14
USER=tkk





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40924; Package emacs. (Thu, 28 Jan 2021 06:45:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tak Kunihiro <tak.kunihiro <at> gmail.com>
Cc: 40924 <at> debbugs.gnu.org
Subject: Re: bug#40924: 27.0.91; default-directory launched via Dock MacOS
Date: Thu, 28 Jan 2021 07:44:17 +0100
Tak Kunihiro <tak.kunihiro <at> gmail.com> writes:

> When launched from Dock, on scratch buffer, default-directory is set to “~/“
> and “/“ on 26.3 and 27.0.91, respectively.  I checked environmental variables
> on 26.3 and 27.0.91 as shown below.  There is no difference, as expected.

I tested this (with Emacs 28) on Big Sur, and was unable to reproduce
it.  I vaguely seem to remember discussion about this some months ago,
so I'm going to go ahead and guess that it really has been fixed, and
I'm closing this bug report.  If the problem still persists for you in
Emacs 28, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Jan 2021 06:45:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 40924 <at> debbugs.gnu.org and Tak Kunihiro <tak.kunihiro <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Jan 2021 06:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40924; Package emacs. (Thu, 28 Jan 2021 10:03:01 GMT) Full text and rfc822 format available.

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

From: Tak Kunihiro <tak.kunihiro <at> gmail.com>
To: 40924 <at> debbugs.gnu.org,
 Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 国広卓也 <tak.kunihiro <at> gmail.com>
Subject: Re: bug#40924: 27.0.91; default-directory launched via Dock MacOS
Date: Thu, 28 Jan 2021 19:02:47 +0900
>> When launched from Dock, on scratch buffer, default-directory is set to “~/“
>> and “/“ on 26.3 and 27.0.91, respectively.  I checked environmental variables
>> on 26.3 and 27.0.91 as shown below.  There is no difference, as expected.
> 
> I tested this (with Emacs 28) on Big Sur, and was unable to reproduce
> it.  I vaguely seem to remember discussion about this some months ago,
> so I'm going to go ahead and guess that it really has been fixed, and
> I'm closing this bug report.

I also confirmed that it is fixed on 28.0.50 running on macOS Catalina.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40924; Package emacs. (Thu, 28 Jan 2021 10:26:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tak Kunihiro <tak.kunihiro <at> gmail.com>
Cc: 40924 <at> debbugs.gnu.org
Subject: Re: bug#40924: 27.0.91; default-directory launched via Dock MacOS
Date: Thu, 28 Jan 2021 11:25:14 +0100
Tak Kunihiro <tak.kunihiro <at> gmail.com> writes:

> I also confirmed that it is fixed on 28.0.50 running on macOS Catalina.

Thanks for checking.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40924; Package emacs. (Thu, 28 Jan 2021 10:58:01 GMT) Full text and rfc822 format available.

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

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 40924 <at> debbugs.gnu.org, Tak Kunihiro <tak.kunihiro <at> gmail.com>
Subject: Re: bug#40924: 27.0.91; default-directory launched via Dock MacOS
Date: Thu, 28 Jan 2021 12:57:34 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Tak Kunihiro <tak.kunihiro <at> gmail.com> writes:
>
>> I also confirmed that it is fixed on 28.0.50 running on macOS Catalina.
>
> Thanks for checking.

It's fixed in Bug#42836
Commit 16f4f266324077f5a50090bd1c8147c7cbe37e0e




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

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

Previous Next


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