emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 17 May 2022 21:14:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Visuwesh <visuweshm@gmail.com> writes:

> (...)  I have come to the conclusion that the most reliable way to
> track directories is to stick the directory in the prompt and parse
> the prompt in Emacs side, or if you're on Emacs 28, you can use the
> OSC7 escape sequence to track the directory.  I do the latter now, and
> so far no problems.

Do you have any implementation of the OSC7 trick to share?

On the other hand I must confess I don't understand why we don't rely on
the current directory of the buffer process (from the Unix point of
view):

  matthias@carbon:~/Projets/argos$ mkdir builddir && cd builddir
  matthias@carbon:~/Projets/argos/builddir$ readlink -e /proc/593787/cwd/
  /home/matthias/Projets/argos/builddir

I've read in efaq.info, node: Shell mode loses the current directory,
that there's an intrinsic limitation of Unix but I don't know where this
limitation comes from and if it applies to many Unices...
-- 
Matthias



reply via email to

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