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: Re: [PATCH] minibuffer issue with eshell-command Date: Thu, 06 Oct 2011 14:48:47 +0200 Message-ID: <87hb3me15c.fsf@gmail.com> References: <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 1317905350 29042 80.91.229.12 (6 Oct 2011 12:49:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2011 12:49:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 06 14:49:06 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 1RBnNq-0004dn-Gw for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 14:49:06 +0200 Original-Received: from localhost ([::1]:39708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBnNq-0001X4-59 for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 08:49:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBnNn-0001Wm-UY for emacs-devel@gnu.org; Thu, 06 Oct 2011 08:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBnNm-0006T6-QV for emacs-devel@gnu.org; Thu, 06 Oct 2011 08:49:03 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:34647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBnNm-0006Sx-Ge for emacs-devel@gnu.org; Thu, 06 Oct 2011 08:49:02 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RBnNk-0004c1-4t for emacs-devel@gnu.org; Thu, 06 Oct 2011 14:49:00 +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 14:49:00 +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 14:49:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 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:jVLxTHIwnI6Xa06KgMG4gR6a52g= 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:144609 Archived-At: Thierry Volpiatto writes: > 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: Any objections to push this on trunk? > 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