[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of sh
From: |
Stefan Monnier |
Subject: |
Re: [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-command-to-string |
Date: |
Tue, 27 Dec 2016 10:34:01 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> + (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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-command-to-string,
Stefan Monnier <=