From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: M-x shell question Date: Wed, 17 Aug 2016 11:09:17 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1471457519 31879 195.159.176.226 (17 Aug 2016 18:11:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2016 18:11:59 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 17 20:11:56 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ba5Ji-000875-Pn for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2016 20:11:54 +0200 Original-Received: from localhost ([::1]:49068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba5Jf-0005sj-SO for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2016 14:11:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba5HJ-0004Gi-Mn for emacs-devel@gnu.org; Wed, 17 Aug 2016 14:09:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba5HF-00052c-9f for emacs-devel@gnu.org; Wed, 17 Aug 2016 14:09:24 -0400 Original-Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:35266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba5HF-00052W-2L for emacs-devel@gnu.org; Wed, 17 Aug 2016 14:09:21 -0400 Original-Received: by mail-pa0-x234.google.com with SMTP id i5so38417832pat.2 for ; Wed, 17 Aug 2016 11:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=SHSllwEJJTZfr1quuttVZr3bqefLBevpkMIMqaYlwWQ=; b=bfmEO7CHUm3sQSChEJPJxhOHhxGBO1oeI0+LrGzbPzG41EDZKXBcLz8sPN/u0AG6Ee ukvQxi0ibGfN+l95qWdbmVBO9vUVujkQIsdPtoFtEL+yH5WP3V3r0jUda/6vjObEr+zF j9ivMZo3tv6v/b8virKBE2t2SSp7RKSokT3BF6qyqiH1JqZjTKl5HirOaOn6VzcSgDCH IxoMBDILAI5A/FW3bRG97ALQLl96WYn8rZphvOC0Slxc/xJ1sOQk2XqzZjFszUhqBtkR fldjyejv/a2Whs7QXsI69VGOFwuBJvPVx8DOfEqLonwz9Zt089bNYGZjX4YJmWIGb6YI XpsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=SHSllwEJJTZfr1quuttVZr3bqefLBevpkMIMqaYlwWQ=; b=eKRh9jPrpoV0TQDtlMGfedeOLCDiLb79b8ljtlhy0Igsr191BvMUierJg0MknsB4UC O7+GBc+N6UhdF5F5a0oBVFqE0FwyJYak/iwfa8aJw4jjcP/0uQkCiCp7+bd1OmLcJpP2 meoy1O9ulkJlzVhuEmmWymhQL6mK8C0GXvKjh58fcfR1zFvvqnGpXczaea0uH2VB5BAG +dDRWaxFH1xxWCIb1EOkU2tedL8aVd2J5Xtn7qeJP4X+rDW2x6xxaTb7Z2ZEmGcOigsD eZ6l0bhTQNHVEeLldBoSQVZFiqFMYKk9FEtU0KpHZ7A0ZK7BeXnFRrcXfunJOzlfLpGa /z5g== X-Gm-Message-State: AEkoouvMsW6Mpr2iYNrihu1dhwOURI1ZkKY0pPMDUrnxMG7XCzHy/e6kHQ/+98qY9ele5phN X-Received: by 10.66.193.65 with SMTP id hm1mr78106529pac.12.1471457359810; Wed, 17 Aug 2016 11:09:19 -0700 (PDT) Original-Received: from raman-glaptop2 (c-73-170-121-60.hsd1.ca.comcast.net. [73.170.121.60]) by smtp.gmail.com with ESMTPSA id ah5sm292318pad.30.2016.08.17.11.09.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 17 Aug 2016 11:09:18 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Wed, 17 Aug 2016 13:45:15 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206636 Archived-At: Richard Stallman 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? --