GNU bug report logs - #32588
27.0.50; ‘default-directory’ not updated

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Thu, 30 Aug 2018 11:06:01 UTC

Severity: normal

Tags: notabug

Found in version 27.0.50

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 32588 <at> debbugs.gnu.org
Subject: Re: bug#32588: 27.0.50; ‘default-directory’ not updated
Date: Thu, 30 Aug 2018 07:18:26 -0400
tags 32588 notabug
close 32588
quit

Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> ‘default-directory’ not updated when dir was changed by a program
>
> Recipe from emacs -Q:
>
> M-x shell RET
> cd
> mkdir newdir
> echo "cd \$HOME/newdir/" > tonewdir
> chmod 700 tonewdir
> . tonewdir
> pwd
>
> ;;;
> `pwd` prints correctly result of $HOME/newdir
> while C-h v default-directory RET displays value of $HOME

(emacs) Directory Tracking:

    Shell mode keeps track of `cd', `pushd' and `popd' commands given to
    the subshell, in order to keep the Shell buffer's default directory
    (*note File Names::) the same as the shell's working directory.  It
    recognizes these commands by examining lines of input that you send.

       If you use aliases for these commands, you can tell Emacs to
    recognize them also, by setting the variables `shell-pushd-regexp',
    `shell-popd-regexp', and `shell-cd-regexp' to the appropriate regular
    expressions (*note Regexps::).

       If Emacs gets confused about changes in the working directory of the
    subshell, type `M-x dirs'.




This bug report was last modified 6 years and 272 days ago.

Previous Next


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