[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32588: 27.0.50; ‘default-directory’ not updated

From: Noam Postavsky
Subject: bug#32588: 27.0.50; ‘default-directory’ not updated
Date: Thu, 30 Aug 2018 07:18:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

tags 32588 notabug
close 32588

Andreas Röhler <address@hidden> 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'.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]