Subject: bug#17815: closed (Re: bug#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 22 Jun 2014 09:29:03 +0000

Your bug report

#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17815: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17815
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP
From: Michael Albinus <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: Dima Kogan <[email-masked]>, [email-masked]
Date: Sun, 22 Jun 2014 11:28:21 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Stefan Monnier <[email-masked]> writes:

>>>> @Stefan: This is no regression, I could reproduce it even with Emacs
>>>> 23.4. Therefore, I will fix it in the trunk. Please tell me if you
>>>> believe it shall go into emacs-24.
>>> Show me the patch (when it's ready), so I can see whether it looks
>>> safe enough.
>> That's what I've committed to the Tramp repository:
>
> Looks safe enough for emacs-24, thanks.

I've committed the lisp files to the emacs-24 branch as 117284, closing
the bug. tramp-tests.el will be committed to the trunk, next time
emacs-24 has been merged there.

> And in trunk, could you try and reduce the code-duplication between
> tramp-sh.el and tramp-adb.el?

Well, all handlers I could factor out for several backends, live in
tramp.el as `tramp-handle-...'. `tramp-adb-handle-process-file' and
`tramp-sh-handle-process-file' contain subtle differences, it will be
harder to refactor them.

>         Stefan

Best regards, Michael.

Subject: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP
From: Dima Kogan <[email-masked]>
To: [email-masked]
Date: Fri, 20 Jun 2014 01:09:28 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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