unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP
@ 2014-06-20  8:09 Dima Kogan
  2014-06-20  8:32 ` Michael Albinus
  0 siblings, 1 reply; 7+ messages in thread
From: Dima Kogan @ 2014-06-20  8:09 UTC (permalink / raw)
  To: 17815

Hi.

The documentation is a bit unclear, so I'm not 100% sure this is a bug;
it's definitely a surprising behavior, though.

I have a bit of elisp to create a temporary buffer and to run a process,
sending its output to this buffer:

 (let ((output-buffer (get-buffer-create "*test-buf*")))
   (with-current-buffer output-buffer
     (erase-buffer)
     (let ((default-directory "/tmp"))
       (process-file "whoami" nil output-buffer t))))

Note that I do not ask for this buffer to be raised. On my machine
(Debian/sid amd64) this indeed does not raise the *test-buf* buffer, and
I do not even see it if I don't explicitly switch to it. This is good.

If I change the directory from "/tmp" to any TRAMP path (for instance
"/sudo::/tmp") then this elisp DOES raise *test-buf*. This difference
between normal and TRAMP behavior sounds like a bug to me.

Note that I have (process-file ... ... ... t). Changing this to nil
resolves the issue. The documentation says

 Fourth arg DISPLAY non-nil means redisplay buffer as output is
 inserted.

I don't know if "redisplay" includes "raise", but I do think the
behavior should be the same, TRAMP or not.

Thanks





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-22 13:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20  8:09 bug#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP Dima Kogan
2014-06-20  8:32 ` Michael Albinus
2014-06-20 13:09   ` Stefan Monnier
2014-06-20 13:50     ` Michael Albinus
     [not found]       ` <jwvwqcbprk7.fsf-monnier+emacsbugs@gnu.org>
2014-06-22  9:28         ` Michael Albinus
2014-06-22 12:55           ` Stefan Monnier
2014-06-22 13:46             ` Michael Albinus

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).