GNU bug report logs - #17815
24.4.50; (process-file) erroneously raises its buffer when running with TRAMP

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Fri, 20 Jun 2014 08:11:02 UTC

Severity: normal

Found in version 24.4.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#17815: closed (24.4.50; (process-file) erroneously raises its
 buffer when running with TRAMP)
Date: Sun, 22 Jun 2014 09:29:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 22 Jun 2014 11:28:21 +0200
with message-id <87ha3d47ka.fsf <at> gmx.de>
and subject line Re: bug#17815: 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP
has caused the debbugs.gnu.org bug report #17815,
regarding 24.4.50; (process-file) erroneously raises its buffer when running with TRAMP
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
17815: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17815
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50;
 (process-file) erroneously raises its buffer when running with TRAMP
Date: Fri, 20 Jun 2014 01:09:28 -0700
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


[Message part 3 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Dima Kogan <dima <at> secretsauce.net>, 17815-done <at> debbugs.gnu.org
Subject: Re: bug#17815: 24.4.50;
 (process-file) erroneously raises its buffer when running with TRAMP
Date: Sun, 22 Jun 2014 11:28:21 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> 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.


This bug report was last modified 10 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.