emacs-devel
[Top][All Lists]
Advanced

[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?

-- 



reply via email to

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