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

From: Michael Albinus <[email-masked]>
Date: Sun, 22 Jun 2014 15:46:59 +0200

Stefan Monnier <[email-masked]> writes:

>> 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.
>
> Those functions are almost 100 lines long and yet the diff between the
> two is only the little thing below.

Right, that's why I wrote about "subtle" differences.

> Clearly, there's room for a good refactoring.  Maybe you can't replace
> them with a single function, but you can create a third function that
> holds most of the code.

Sure. But lately I was plagued with recursive loading of Tramp packages,
so I'm a little bit conservative in moving code between the different
files. 

Whenever it is possible to refactor code out I'll do. *-process-file is
on the list, but I cannot promise to do it immediately. One idea is to
generalize `tramp-send-command' and friends, for most of the handlers
this is the major difference between the different backends. Other
handlers but *-process-file would profit from this as well.

>         Stefan

Best regards, Michael.