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: Mon, 10 Oct 2011 20:36:54 +0200 Message-ID: <87y5wsvgl5.fsf@gmail.com> References: <87lisy7g00.fsf@gmail.com> <87hb3me15c.fsf@gmail.com> <877h4irsye.fsf@gmail.com> <878vowj3t4.fsf@gmail.com> <87botsobtk.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318271842 11708 80.91.229.12 (10 Oct 2011 18:37:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2011 18:37:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 10 20:37: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 1RDKiy-0003FX-5o for ged-emacs-devel@m.gmane.org; Mon, 10 Oct 2011 20:37:16 +0200 Original-Received: from localhost ([::1]:47744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDKix-0001Xw-LO for ged-emacs-devel@m.gmane.org; Mon, 10 Oct 2011 14:37:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDKiv-0001Xr-1P for emacs-devel@gnu.org; Mon, 10 Oct 2011 14:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDKit-0001pq-WA for emacs-devel@gnu.org; Mon, 10 Oct 2011 14:37:12 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:49138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDKit-0001pV-Qn for emacs-devel@gnu.org; Mon, 10 Oct 2011 14:37:11 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RDKir-0003CV-FZ for emacs-devel@gnu.org; Mon, 10 Oct 2011 20:37:09 +0200 Original-Received: from 17.211.85.79.rev.sfr.net ([79.85.211.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Oct 2011 20:37:09 +0200 Original-Received: from thierry.volpiatto by 17.211.85.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Oct 2011 20:37:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 17.211.85.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:8ElKpNVwZKkCuLf/3U2KiCj8Aro= 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:144820 Archived-At: Thierry Volpiatto writes: Hi, i made some simplifications to my last patch and fix also a little error: When command is called from lisp, `eshell-add-input-to-history' should not add history to ring. (this cause an error). Here the patch: diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index c33c2cc..0c1c039 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -349,11 +349,9 @@ With prefix ARG, insert output into the current buffer at point." (minibuffer-with-setup-hook #'(lambda () (eshell-mode) (eshell-return-exits-minibuffer)) - (unwind-protect - (unless command - (setq command (read-from-minibuffer "Emacs shell command: "))) - (when command - (eshell-add-input-to-history command))))) + (unless command + (setq command (read-from-minibuffer "Emacs shell command: ")) + (eshell-add-input-to-history command)))) (unless command (error "No command specified!")) ;; redirection into the current buffer is achieved by adding an If no objections i will install it tomorrow. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997