[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M-x shell question
From: |
raman |
Subject: |
Re: M-x shell question |
Date: |
Wed, 17 Aug 2016 11:09:17 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) |
Richard Stallman <address@hidden> writes:
1+ -- I implemented myself a different shell command specifically for
this case and bound it to a key:
(defun emacspeak-wizards-shell-toggle ()
"Switch to the shell buffer and cd to
the directory of the current buffer."
(interactive)
(declare (special default-directory))
(let ((dir default-directory))
(shell)
(unless (string-equal (expand-file-name dir)
(expand-file-name default-directory))
(goto-char (point-max))
(insert (format "pushd %s" dir))
(comint-send-input)
(shell-process-cd dir))
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-mode-line)))
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> I'm thinking that M-x shell should cd the subshell
> to the current directory of the buffer you're in
> when you type M-x shell. I often want to do that.
>
> Or perhaps C-u M-x shell should do that.
>
> The current behavior of C-u M-x shell, to use a different buffer name
> for the shell buffer, is not very useful; if you want to make multiple
> shell buffers, the easiest way is to make each one as *shell* and
> rename it.
>
> Is anyone against?
--
- M-x shell question, Richard Stallman, 2016/08/17
- Re: M-x shell question,
raman <=
- Re: M-x shell question, Uwe Brauer, 2016/08/17
- Re: M-x shell question, Richard Stallman, 2016/08/18
- Fwd: M-x shell question, Kaushal Modi, 2016/08/18
- Re: Fwd: M-x shell question, Richard Stallman, 2016/08/19
- Re: Fwd: M-x shell question, Kaushal Modi, 2016/08/19
- Re: Fwd: M-x shell question, Eli Zaretskii, 2016/08/19
- Re: Fwd: M-x shell question, Robert Weiner, 2016/08/19
- Re: Fwd: M-x shell question, Kaushal Modi, 2016/08/19
- Re: Fwd: M-x shell question, Robert Weiner, 2016/08/19