emacs-devel
[Top][All Lists]
Advanced

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

Wrong default-directory in shell buffer


From: Matthias Meulien
Subject: Wrong default-directory in shell buffer
Date: Sun, 15 May 2022 16:06:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

With a recent build from master branch, I sometime have a wrong value
("/../" to be precise) for the default-directory variable associated to
shell buffers.  I create shell buffers with project-shell, the
default-directory value is the expected one, the wrong value appears
after I've executed some commands.

(As a consequence all project-* commands fail to recognize current
project and I am asked to select a project which is really annoying.)

I have not found a recipe to reproduce; But I've found that I've
executed commands containing the string "/../" in a shell buffer with
the problem:

cd ../../
pushd ../../
xdg-open ../../

(Trailing slashes added by the completion framework, company).

I also executed commands like meson build which outputs strings
containing the "/../" string:

[2/3] /usr/bin/meson --internal msgfmthelper ../data/app.argos.Argos.desktop.in 
data/app.argos.Argos.desktop desktop ../data/../po

I didn't find any related bug report in debbugs.  Am I the only one
experiencing such a regression?  

I am using GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.24, cairo version 1.16.0) build from master on 2022-04-18, and I
keep shell-mode rather unchanged:

(add-hook 'shell-mode-hook
          (lambda ()
             (setq shell-font-lock-keywords nil)
             (goto-address-mode)))

(define-abbrev-table 'shell-mode-abbrev-table '(("null" "&> /dev/null")))
-- 
Matthias



reply via email to

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