* Re: [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-command-to-string
[not found] ` <20161227122750.AD0A72201C7@vcs.savannah.gnu.org>
@ 2016-12-27 15:34 ` Stefan Monnier
0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2016-12-27 15:34 UTC (permalink / raw)
To: emacs-devel; +Cc: Alexey Veretennikov
> + (file2-untrampified (ztree-untrampify-filename file2)))
> + (if (or
> + (/= (nth 7 (file-attributes file1-untrampified))
> (nth 7 (file-attributes file2-untrampified)))
> - (> (length (shell-command-to-string diff-cmd)) 2))
> + (/= 0 (process-file diff-command nil nil nil "-q"
> + file1-untrampified
> + file2-untrampified)))
process-file decides on which host to run the command based on
default-directory, so you should be careful to set it (that's why in my
example I bound it to (file-name-directory file1). Then using
file-relative-name saved me from having to mention Tramp explicitly).
Stefan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-27 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20161227122750.6385.19869@vcs.savannah.gnu.org>
[not found] ` <20161227122750.AD0A72201C7@vcs.savannah.gnu.org>
2016-12-27 15:34 ` [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-command-to-string Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.