bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11962: 23.4; shell-process-cd called before executing command in she


From: Oleksandr Gavenko
Subject: bug#11962: 23.4; shell-process-cd called before executing command in shell, but must after.
Date: Tue, 17 Jul 2012 22:25:04 +0300

In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-04-07 on trouble, modified by Debian

I found md function useful under Bash:

  md () { mkdir -p "$1" && cd "$1"; }

as it save duplicate directory name typing. I decide to teach Emacs understand
this keyword. Natural way to do so is to modify:

  (setq shell-cd-regexp "[cm]d")

But I explore that this setting does not teach Emacs follow into directory
(default-directory still not updated). After debugging functions in
'lisp/shell.el.gz' I found that 'shell-process-cd' call 'shell-cd' which call
'cd' which fail as I believe because 'cd' called before 'md' actually passed
to shell  (directory does not exist and 'cd' fail)...

I think shell mode need to wait some mark that command processed (like waiting
for prompt). This fix my bug report automatically.

-- 
Best regards!





reply via email to

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