GNU bug report logs - #21353
25.0.50; Emacs Trunk (OSX) -- `default-directory` is initially set to "."

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Wed, 26 Aug 2015 16:40:02 UTC

Severity: normal

Merged with 21104

Found in version 25.0.50

Done: Anders Lindgren <andlind <at> gmail.com>

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 21353 in the body.
You can then email your comments to 21353 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#21353; Package emacs. (Wed, 26 Aug 2015 16:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Keith David Bershatsky <esq <at> lawlist.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Aug 2015 16:40:02 GMT) Full text and rfc822 format available.

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

From: Keith David Bershatsky <esq <at> lawlist.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 09:39:25 -0700
The `default-directory` is initially set to ".", which results in erroneous entries being added to the `load-path` by `normal-top-level-add-subdirs-to-load-path` within `.../site-lisp/subdirs.el` when starting Emacs.  The erroneous entries look like this:

"." "./Applications" "./Applications (Parallels)" "./Desktop" "./Documents" "./Downloads" "./Library" "./Movies" "./Music" "./Pictures" "./Public" "./Sites" "./Users"

I built Emacs Trunk from the directory `~/Desktop`, in the event that has any relevance -- `/Users/HOME/Desktop/emacs`.

Thanks,

Keith


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.0.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549))
 of 2015-08-22 on server.local
Repository revision: 0a3ed5f70c6025fbc2a7e3ca53f11770e4fabe61
Windowing system distributor `Apple', version 10.3.1038
Configured using:
 `configure --with-ns --without-imagemagick'

Configured features:
DBUS ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  tb-mode: t
  sb-mode: t
  ml-mode: t
  sd-mode: t
  bc-mode: t
  buffer-read-only: t

Recent messages:
default-directory:  .
default-directory:  /Users/HOME/.0.data/.0.emacs/emacs_08_22_2015.app/Contents/Resources/site-lisp
Wrote /Users/HOME/.0.data/.0.emacs/.lock
*beep*

Load-path shadows:
None found.

Features:
(shadow emacsbug sendmail lawlist-ztree lawlist-yas lawlist-ws
lawlist-wl elmo-imap4 elmo-localdir modb-standard modb-legacy
elmo-internal elmo-flag mmelmo-imap mmelmo-buffer elsp-generic mel-u
ps-print ps-def lpr epg-config enriched lawlist-w3m doc-view
image-mode ccl lawlist-vl lawlist-view lawlist-undo lawlist-txt
lawlist-tm lawlist-tex compare-w lawlist-tabbar lawlist-speedbar
lawlist-shell info esh-groups ehelp ange-ftp lawlist-sgml lawlist-sb
lawlist-saveplace lawlist-ruler lawlist-replace lawlist-rectangle
lawlist-re-builder lawlist-python skeleton lawlist-profiler
lawlist-print lawlist-php cl-seq lawlist-perl lawlist-parens
lawlist-org lawlist-calendar org-agenda org org-macro org-footnote
org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs
find-func holidays hol-loaddefs cal-menu calendar cal-loaddefs
lawlist-neotree lawlist-movement lawlist-mouse lawlist-ml
lawlist-minibuffer lawlist-misc lawlist-messages lawlist-mc rect
lawlist-markdown noutline outline lawlist-lorem lawlist-ln
lawlist-keymap lawlist-js lawlist-ispell lawlist-isearch lawlist-imenu
lawlist-ibuffer lawlist-hl lawlist-grep lawlist-git ido vc-git vc
vc-dispatcher thingatpt time-stamp subr-x server nntp gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls utf7
netrc parse-time gnus-spec gnus-int gnus-range gnus-win nnoo mm-view
mml-smime smime dig mailcap log-view log-edit message mml mml-sec
mm-decode mm-bodies mm-encode gmm-utils mailheader pcvs-util add-log
ldap json grep compile find-lisp ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff diff-mode conf-mode
autorevert filenotify lawlist-frame lawlist-frame-bufs
lawlist-font-lock lawlist-fm lawlist-env lawlist-elscreen
lawlist-elisp lawlist-dv jka-compr lawlist-image cl-macs lawlist-files
zeroconf dbus xml lawlist-ds lawlist-dired edmacro kmacro dired
format-spec lawlist-desktop frameset lawlist-debug lawlist-window
debug lawlist-css smie lawlist-compile rx lawlist-color lawlist-cm gv
lawlist-cc cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs cc-bytecomp lawlist-calc
lawlist-calccomp lawlist-calcalg3 lawlist-calcalg2 lawlist-calc+
lawlist-bk lawlist-bc lawlist-bbdb gnus gnus-ems nnheader mail-utils
wid-edit mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
mail-extr rfc822 timezone lawlist-auth gnus-util mm-util help-fns
mail-prsvr password-cache lawlist-as lawlist-archive lawlist-+
lawlist-lcl byte-opt bytecomp byte-compile cl-extra seq cconv
lawlist-help disp-table easy-mmode quail help-mode easymenu
cl-loaddefs cl-lib pcase derived advice shell pcomplete comint
ansi-color ring savehist time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook
help simple abbrev minibuffer 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 dbusbind cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 2198610 241653)
 (symbols 48 87224 0)
 (miscs 40 128 238)
 (strings 32 193964 25144)
 (string-bytes 1 7182033)
 (vectors 16 39875)
 (vector-slots 8 957364 18787)
 (floats 8 2129 397)
 (intervals 56 369 40)
 (buffers 976 11))




Merged 21104 21353. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 26 Aug 2015 17:09:02 GMT) Full text and rfc822 format available.

Added indication that bug 21353 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 26 Aug 2015 17:09:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21353; Package emacs. (Wed, 26 Aug 2015 17:13:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 21353 <at> debbugs.gnu.org
Subject: Re: bug#21353: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 20:12:28 +0300
> Date: Wed, 26 Aug 2015 09:39:25 -0700
> From: Keith David Bershatsky <esq <at> lawlist.com>
> 
> The `default-directory` is initially set to "."

You mean, in the *scratch* buffer?  That happens in the function
init_buffer; we get the directory by calling get_current_dir_name.
Perhaps that function doesn't work well on Darwin?  Can you step with
a debugger through init_buffer, and see what happens there?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21353; Package emacs. (Wed, 26 Aug 2015 17:59:02 GMT) Full text and rfc822 format available.

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

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21353 <at> debbugs.gnu.org
Subject: Re: bug#21353: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 10:58:46 -0700
During startup, when Emacs reads `.../Emacs.app/Contents/Resources/site-lisp/subdirs.el` in a version of Emacs Trunk built on August 22, 2015, the value of the `default-directory` at the top of that file is:

"."

During startup, when Emacs reads `.../Emacs.app/Contents/Resources/site-lisp/subdirs.el` in prior working versions of Emacs Trunk (i.e., from last year), the value of the `default-directory` at the top of that file is:

".../Emacs.app/Contents/Resources/site-lisp"

The test can be duplicated by placing the following lines inside `.../Emacs.app/Contents/Resources/site-lisp/subdirs.el`

(message "What is the value of the default-directory?:  %s" default-directory)

(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
    (normal-top-level-add-subdirs-to-load-path))

This is true even if I completely remove the entire `lisp` directory.

On my Christmas wish-list is the desire to learn how to "step with a debugger"; however, that is presently beyond my limited hobbyist programming abilities.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Wed, 26 Aug 2015 20:12:28 +0300,
Eli Zaretskii wrote:
> 
>  Emacs Trunk (OSX) -- `default-directory` is initially set to "."
> 
> > Date: Wed, 26 Aug 2015 09:39:25 -0700
> > From: Keith David Bershatsky <esq <at> lawlist.com>
> > 
> > The `default-directory` is initially set to "."
> 
> You mean, in the *scratch* buffer?  That happens in the function
> init_buffer; we get the directory by calling get_current_dir_name.
> Perhaps that function doesn't work well on Darwin?  Can you step with
> a debugger through init_buffer, and see what happens there?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21353; Package emacs. (Wed, 26 Aug 2015 18:17:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 21353 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#21353: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 14:16:44 -0400
This is bug#21104, and as I said there:

  [...] it would be helpful for someone to pinpoint when this started.
  (It should be easy using nightly builds from

  http://emacsformacosx.com/builds/all )




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21353; Package emacs. (Wed, 26 Aug 2015 19:04:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 21353 <at> debbugs.gnu.org
Subject: Re: bug#21353: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 22:03:02 +0300
> Date:  Wed, 26 Aug 2015 10:58:46 -0700
> From:  Keith David Bershatsky <esq <at> lawlist.com>
> Cc:  21353 <at> debbugs.gnu.org
> 
> During startup, when Emacs reads `.../Emacs.app/Contents/Resources/site-lisp/subdirs.el` in a version of Emacs Trunk built on August 22, 2015, the value of the `default-directory` at the top of that file is:
> 
> "."

I think that is already too late.  Emacs determines its current
directory early on during startup, and then propagates that value to
every buffer it creates henceforth.

> On my Christmas wish-list is the desire to learn how to "step with a debugger"; however, that is presently beyond my limited hobbyist programming abilities.

OK, but you can still add fprintf lines to init_buffer and rebuild
Emacs to tell us the value returned by get_current_dir_name when it
starts, right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21353; Package emacs. (Wed, 26 Aug 2015 19:09:02 GMT) Full text and rfc822 format available.

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

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21353 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#21353: 25.0.50;
 Emacs Trunk (OSX) -- `default-directory` is initially set to "."
Date: Wed, 26 Aug 2015 12:08:22 -0700
This is interesting because none of the various nightly builds from emacsformacosx.com have this issue.

It would appear that my building blocks are somehow different.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Wed, 26 Aug 2015 14:16:44 -0400,
Glenn Morris wrote:
> 
> 
> This is bug#21104, and as I said there:
> 
>   [...] it would be helpful for someone to pinpoint when this started.
>   (It should be easy using nightly builds from
> 
>   http://emacsformacosx.com/builds/all )




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

This bug report was last modified 8 years and 108 days ago.

Previous Next


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