From: Noam Postavsky <npostavs@gmail.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 32588@debbugs.gnu.org
Subject: bug#32588: 27.0.50; ‘default-directory’ not updated
Date: Thu, 30 Aug 2018 07:18:26 -0400 [thread overview]
Message-ID: <87h8jcrtkt.fsf@gmail.com> (raw)
In-Reply-To: <b3a3fcfa-cf1a-ed89-1313-24308d13fdac@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hler\=22's\?\= message of "Thu, 30 Aug 2018 13:09:35 +0200")
tags 32588 notabug
close 32588
quit
Andreas Röhler <andreas.roehler@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'.
prev parent reply other threads:[~2018-08-30 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 11:09 bug#32588: 27.0.50; ‘default-directory’ not updated Andreas Röhler
2018-08-30 11:18 ` Noam Postavsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8jcrtkt.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=32588@debbugs.gnu.org \
--cc=andreas.roehler@easy-emacs.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).