From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Markus Rost Newsgroups: gmane.emacs.devel Subject: Suggestion for C-u M-x shell Date: Mon, 11 Aug 2003 15:33:33 -0400 (EDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200308111933.h7BJXXUG012298@hampton.math.ohio-state.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060630575 28036 80.91.224.253 (11 Aug 2003 19:36:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2003 19:36:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Aug 11 21:36:13 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19mISj-0004vk-00 for ; Mon, 11 Aug 2003 21:36:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19mIa7-0002Lt-00 for ; Mon, 11 Aug 2003 21:43:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mIR4-0003RN-EA for emacs-devel@quimby.gnus.org; Mon, 11 Aug 2003 15:34:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19mIQh-0003NS-RF for emacs-devel@gnu.org; Mon, 11 Aug 2003 15:34:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19mIQA-0003BD-P7 for emacs-devel@gnu.org; Mon, 11 Aug 2003 15:34:05 -0400 Original-Received: from [140.254.92.31] (helo=hermes.math.ohio-state.edu) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mIQA-0003B9-FC for emacs-devel@gnu.org; Mon, 11 Aug 2003 15:33:34 -0400 Original-Received: from hampton.math.ohio-state.edu (hampton.math.ohio-state.edu [140.254.93.46]) by hermes.math.ohio-state.edu (8.12.9/8.12.9) with ESMTP id h7BJXXNs010743; Mon, 11 Aug 2003 15:33:33 -0400 Original-Received: from hampton.math.ohio-state.edu (localhost [127.0.0.1]) by hampton.math.ohio-state.edu (8.12.9/8.12.9) with ESMTP id h7BJXX5f012301; Mon, 11 Aug 2003 15:33:33 -0400 (EDT) Original-Received: (from rost@localhost) by hampton.math.ohio-state.edu (8.12.9/8.12.8/Submit) id h7BJXXUG012298; Mon, 11 Aug 2003 15:33:33 -0400 (EDT) Original-To: emacs-devel@gnu.org X-Mailer: GNU Emacs 21.3+ X-Home-Page: http://www.math.ohio-state.edu/~rost X-RAVMilter-Version: 8.4.2(snapshot 20021217) (hermes) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15887 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15887 To run several shells in Emacs, one uses C-u M-x shell which prompts for a buffer name with "*shell*" as default. However for that name it would be enough to just call M-x shell without a prefix. What about suggesting a new unused buffer name in the prompt? That would come in handy for starting a new shell. What do people think? Here is a patch for this. * shell.el (shell): With prefix-arg, suggest a new buffer name. ===Buffer *diff*============================================ cd /home/rost/cvs/emacs/lisp/ diff -c /home/rost/cvs/emacs/lisp/shell.el /tmp/buffer-content-6992R3d *** /home/rost/cvs/emacs/lisp/shell.el Thu Jun 12 18:20:49 2003 --- /tmp/buffer-content-6992R3d Mon Aug 11 12:43:33 2003 *************** *** 533,539 **** (interactive (list (and current-prefix-arg ! (read-buffer "Shell buffer: " "*shell*")))) (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). --- 533,540 ---- (interactive (list (and current-prefix-arg ! (read-buffer "Shell buffer: " ! (generate-new-buffer-name "*shell*"))))) (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). Diff finished at Mon Aug 11 12:43:34 ============================================================