* Bug fix for eshell-remote-command in lisp/eshell/esh-ext.el
@ 2009-07-27 4:17 Colin Williams
2009-07-27 17:53 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Colin Williams @ 2009-07-27 4:17 UTC (permalink / raw)
To: emacs-devel
The function shell-command will sometimes split the current frame to
display the output. This means that even though eshell-remote-command
kills the buffer in question, the window layout has been altered. I
suggest changing
(setq exitcode
(funcall handler 'shell-command
(mapconcat 'shell-quote-argument
(append (list command) args) " ")
outbuf errbuf))
to
(setq exitcode
(save-window-excursion
(funcall handler 'shell-command
(mapconcat 'shell-quote-argument
(append (list command) args) " ")
outbuf errbuf)))
which will fix any mucking around with the frames window configuration
that shell-command decides to do.
This is my first bug fix for a gnu project, so if you need me to
provide a diff for this change, let me know.
Colin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug fix for eshell-remote-command in lisp/eshell/esh-ext.el
2009-07-27 4:17 Bug fix for eshell-remote-command in lisp/eshell/esh-ext.el Colin Williams
@ 2009-07-27 17:53 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-07-27 17:53 UTC (permalink / raw)
To: Colin Williams; +Cc: emacs-devel
> The function shell-command will sometimes split the current frame to
> display the output. This means that even though eshell-remote-command
> kills the buffer in question, the window layout has been altered. I
> suggest changing
> (setq exitcode
> (funcall handler 'shell-command
> (mapconcat 'shell-quote-argument
> (append (list command) args) " ")
> outbuf errbuf))
> to
> (setq exitcode
> (save-window-excursion
> (funcall handler 'shell-command
> (mapconcat 'shell-quote-argument
> (append (list command) args) " ")
> outbuf errbuf)))
> which will fix any mucking around with the frames window configuration
> that shell-command decides to do.
Actually, it will not fix "any mucking around" but only "some mucking
around". E.g. it won't fix mucking arounds that end up creating
new frames (e.g. via pop-up-frames).
The only reliable solution is to prevent those windows/frames from being
created in the first place.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-27 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 4:17 Bug fix for eshell-remote-command in lisp/eshell/esh-ext.el Colin Williams
2009-07-27 17:53 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).