[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrong default-directory in shell buffer
From: |
Matthias Meulien |
Subject: |
Re: Wrong default-directory in shell buffer |
Date: |
Mon, 16 May 2022 21:29:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Matthias Meulien <orontee@gmail.com> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Could it be related to "directory tracking", then?
>
> I guess so.
>
>> There are several different "solutions" to have shell buffers's
>> `default-directory` track the PWD of the shell, so I'm not sure which
>> one might be at fault here (if any).
>
> I see that shell-dirtrack-verbose is t, and dirtrack-mode is nil. Thus I
> guess emacs is using the default cd, pushd and popd tracking.
>
> I'll study this implementation.
It's simply that when the input is:
mkdir builddir && cd builddir
the function shell-directory-tracker fails to see the cd command.
I recently develop the habit to call successively:
mkdir builddir && cd builddir
# do some work
cd ..
rm -rf builddir
repeatedly. If initial value of the default-directory variable is
/home/matthias/Projets/argos then after 4 iterations it will have been
updated to /, and with the fifth it will be /..
I observed the same behavior with Emacs 27.1. No regression!
Comments in shell.el says of directory tracking that: "This is basically
a fragile hack". Confirmed.
--
Matthias
- Re: plz -> curl?, (continued)
- Re: plz -> curl?, Alan Mackenzie, 2022/05/17
- Re: plz -> curl?, Richard Stallman, 2022/05/17
- Re: plz -> curl?, Jonas Bernoulli, 2022/05/21
- Wrong default-directory in shell buffer, Matthias Meulien, 2022/05/15
- Re: Wrong default-directory in shell buffer, Stefan Monnier, 2022/05/15
- Re: Wrong default-directory in shell buffer, Matthias Meulien, 2022/05/16
- Re: Wrong default-directory in shell buffer,
Matthias Meulien <=
- Re: Wrong default-directory in shell buffer, Visuwesh, 2022/05/17
- Re: Wrong default-directory in shell buffer, Matthias Meulien, 2022/05/17
- Re: Wrong default-directory in shell buffer, Lars Ingebrigtsen, 2022/05/17
- Re: Wrong default-directory in shell buffer, Matthias Meulien, 2022/05/17
- Re: Wrong default-directory in shell buffer, Lars Ingebrigtsen, 2022/05/17
- Re: [ELPA] New package: plz, Richard Stallman, 2022/05/13
- Re: [ELPA] New package: plz, Adam Porter, 2022/05/13
Re: [ELPA] New package: plz, Stefan Monnier, 2022/05/11