From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: [PATCH] minibuffer issue with eshell-command Date: Thu, 06 Oct 2011 09:09:51 +0200 Message-ID: <87lisy7g00.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1317885023 22001 80.91.229.12 (6 Oct 2011 07:10:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2011 07:10:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 06 09:10:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RBi5u-0002HB-81 for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 09:10:14 +0200 Original-Received: from localhost ([::1]:56675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBi5t-0002ty-6n for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 03:10:13 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBi5o-0002s2-H8 for emacs-devel@gnu.org; Thu, 06 Oct 2011 03:10:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBi5k-0007aA-HU for emacs-devel@gnu.org; Thu, 06 Oct 2011 03:10:08 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBi5k-0007Zi-55 for emacs-devel@gnu.org; Thu, 06 Oct 2011 03:10:04 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RBi5i-0002FJ-O7 for emacs-devel@gnu.org; Thu, 06 Oct 2011 09:10:02 +0200 Original-Received: from 214.77.197.77.rev.sfr.net ([77.197.77.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Oct 2011 09:10:02 +0200 Original-Received: from thierry.volpiatto by 214.77.197.77.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Oct 2011 09:10:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 214.77.197.77.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:JxPfqDPbtE/0BOR6VV3hLwtVHpU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144601 Archived-At: Hi all, When eshell-command start, it set eshell-mode in all minibuffers: ;(add-hook 'minibuffer-setup-hook 'eshell-mode) So when running another minibuffer, while eshell-command is started, it enable eshell-mode in this one, which is wrong. This patch fix this: Fix minibuffer-issue in eshell-command. From: Thierry Volpiatto --- lisp/eshell/eshell.el | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 1a9d7c9..34d05b0 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -346,14 +346,13 @@ With prefix ARG, insert output into the current buffer at point." (setq arg current-prefix-arg)) (unwind-protect (let ((eshell-non-interactive-p t)) - (add-hook 'minibuffer-setup-hook 'eshell-mode) - (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) - (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) - (unless command - (setq command (read-from-minibuffer "Emacs shell command: ")))) + (minibuffer-with-setup-hook 'eshell-mode + (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) + (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) + (unless command + (setq command (read-from-minibuffer "Emacs shell command: "))))) (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) - (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) - (remove-hook 'minibuffer-setup-hook 'eshell-mode)) + (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)) (unless command (error "No command specified!")) ;; redirection into the current buffer is achieved by adding an -- 𝕋𝕙𝕚𝕖𝕣𝕣𝕪 Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997