all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11962: 23.4; shell-process-cd called before executing command in shell, but must after.
@ 2012-07-17 19:25 Oleksandr Gavenko
  2020-12-07 17:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Gavenko @ 2012-07-17 19:25 UTC (permalink / raw)
  To: 11962

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!





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-20 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 19:25 bug#11962: 23.4; shell-process-cd called before executing command in shell, but must after Oleksandr Gavenko
2020-12-07 17:12 ` Lars Ingebrigtsen
2021-01-20 17:07   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.