diff options
| author | Eli Zaretskii | 2019-02-08 08:59:23 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-02-08 08:59:23 +0200 |
| commit | 459b669b08d235a79ff4fa61b2d93e9a6229facd (patch) | |
| tree | 5d856c6522a9a23b5075262b30a077fbac15ef89 | |
| parent | e9ff19053139c149460fa8b1214c4012fc11cd0d (diff) | |
| download | emacs-459b669b08d235a79ff4fa61b2d93e9a6229facd.tar.gz emacs-459b669b08d235a79ff4fa61b2d93e9a6229facd.zip | |
Fix failures of vc-find-revision with non-ASCII file names
* lisp/vc/vc.el (vc-find-revision): Instead of binding
coding-system-for-write, make the buffer-file-coding-system of
the temporary buffer be no-conversion. This avoids the
unwanted side effect of not encoding the command-line
arguments of the VCS commands invoked by the backend.
(Bug#34350)
| -rw-r--r-- | lisp/vc/vc.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9925196f737..326284f4446 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1966,10 +1966,13 @@ Use BACKEND as the VC backend if specified." | |||
| 1966 | (with-current-buffer filebuf | 1966 | (with-current-buffer filebuf |
| 1967 | (let ((failed t)) | 1967 | (let ((failed t)) |
| 1968 | (unwind-protect | 1968 | (unwind-protect |
| 1969 | (let ((coding-system-for-read 'no-conversion) | 1969 | (let ((coding-system-for-read 'no-conversion)) |
| 1970 | (coding-system-for-write 'no-conversion)) | ||
| 1971 | (with-temp-file filename | 1970 | (with-temp-file filename |
| 1972 | (let ((outbuf (current-buffer))) | 1971 | (let ((outbuf (current-buffer))) |
| 1972 | ;; We will read the backend's output with no | ||
| 1973 | ;; conversions, so we should also save the | ||
| 1974 | ;; temporary file with no encoding conversions. | ||
| 1975 | (setq buffer-file-coding-system 'no-conversion) | ||
| 1973 | ;; Change buffer to get local value of | 1976 | ;; Change buffer to get local value of |
| 1974 | ;; vc-checkout-switches. | 1977 | ;; vc-checkout-switches. |
| 1975 | (with-current-buffer filebuf | 1978 | (with-current-buffer filebuf |