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

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

[debbugs-tracker] bug#1975: closed (Reusing dead shell buffers)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#1975: closed (Reusing dead shell buffers)
Date: Fri, 30 Nov 2012 08:09:02 +0000

Your message dated Fri, 30 Nov 2012 16:06:33 +0800
with message-id <address@hidden>
and subject line Re: bug#1975: Reusing dead shell buffers
has caused the debbugs.gnu.org bug report #1975,
regarding Reusing dead shell buffers
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
1975: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1975
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Reusing dead shell buffers Date: Sun, 11 Jan 2009 21:19:21 +0100 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Severity: wishlist

[ resent from
  http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00295.html ]

Hi.

Just a tiny patch for shell.

The patch assumes that the person launching M-xshell while in a
shell-mode buffer with a terminated process really wants to launch a
shell process in the current buffer instead to switch to "*shell*".

The semantics of C-uM-xshell are not changed by the patch.

Index: shell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/shell.el,v
retrieving revision 1.165
diff -u -r1.165 shell.el
--- shell.el    5 Jan 2009 03:19:45 -0000       1.165
+++ shell.el    11 Jan 2009 19:46:35 -0000
@@ -555,6 +555,9 @@
                      (read-file-name
                       "Default directory: " default-directory default-directory
                       t nil 'file-directory-p))))))))
+  ;; If the current buffer is a dead shell buffer, use it.
+  (if (and (not buffer) (eq major-mode 'shell-mode))
+      (setq buffer (current-buffer)))
   (setq buffer (get-buffer-create (or buffer "*shell*")))
   ;; Pop to buffer, so that the buffer's window will be correctly set
   ;; when we call comint (so that comint sets the COLUMNS env var properly).



--- End Message ---
--- Begin Message --- Subject: Re: bug#1975: Reusing dead shell buffers Date: Fri, 30 Nov 2012 16:06:33 +0800 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux)
Lars Magne Ingebrigtsen <address@hidden> writes:

> Currently `C-u M-x shell' defaults to "*shell*", which seems pretty
> nonsensical.  Surely if the user wanted to use that buffer, then she
> would have just typed `M-x shell'.
>
> So perhaps `C-u M-x shell' should just default to the current buffer
> instead?

Agreed.  Implemented in trunk.


--- End Message ---

reply via email to

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