all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] minibuffer issue with eshell-command
Date: Thu, 06 Oct 2011 14:48:47 +0200	[thread overview]
Message-ID: <87hb3me15c.fsf@gmail.com> (raw)
In-Reply-To: 87lisy7g00.fsf@gmail.com

Thierry Volpiatto <thierry.volpiatto@gmail.com> 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 <thierry.volpiatto@gmail.com>
>
>
> ---
>  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 




  reply	other threads:[~2011-10-06 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06  7:09 [PATCH] minibuffer issue with eshell-command Thierry Volpiatto
2011-10-06 12:48 ` Thierry Volpiatto [this message]
2011-10-06 15:00   ` Chong Yidong
2011-10-06 15:36   ` Stefan Monnier
2011-10-06 16:22     ` Thierry Volpiatto
2011-10-07 14:04       ` Thierry Volpiatto
2011-10-07 19:12         ` Thierry Volpiatto
2011-10-10 18:36           ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hb3me15c.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.