From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.devel Subject: Re: M-x shell question Date: Wed, 17 Aug 2016 19:04:18 +0000 Message-ID: <87oa4rfc99.fsf@mat.ucm.es> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1471460698 22291 195.159.176.226 (17 Aug 2016 19:04:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2016 19:04:58 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 17 21:04:52 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 1ba68x-0005SH-Io for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2016 21:04:51 +0200 Original-Received: from localhost ([::1]:49205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba68t-0002sI-Di for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2016 15:04:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba68h-0002sC-Qk for emacs-devel@gnu.org; Wed, 17 Aug 2016 15:04:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba68c-0002C2-OF for emacs-devel@gnu.org; Wed, 17 Aug 2016 15:04:35 -0400 Original-Received: from [195.159.176.226] (port=52806 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba68c-00029w-Gs for emacs-devel@gnu.org; Wed, 17 Aug 2016 15:04:30 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ba68W-0004JW-Oz for emacs-devel@gnu.org; Wed, 17 Aug 2016 21:04:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:tl0n9EfJcSBizV5Mw40RAxd7doU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:206637 Archived-At: >>> "raman" == raman writes: > Richard Stallman writes: > 1+ -- I implemented myself a different shell command specifically for > this case and bound it to a key: That function depends on emacspeak, why? > (defun emacspeak-wizards-shell-toggle () > "Switch to the shell buffer and cd to > the directory of the current buffer." > (interactive) > (declare (special default-directory)) What is this declare call good for? > (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)))