emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 459b669: Fix failures of vc-find-revision with no


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 459b669: Fix failures of vc-find-revision with non-ASCII file names
Date: Fri, 8 Feb 2019 02:00:49 -0500 (EST)

branch: emacs-26
commit 459b669b08d235a79ff4fa61b2d93e9a6229facd
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/vc/vc.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9925196..326284f 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1966,10 +1966,13 @@ Use BACKEND as the VC backend if specified."
        (with-current-buffer filebuf
          (let ((failed t))
            (unwind-protect
-               (let ((coding-system-for-read 'no-conversion)
-                     (coding-system-for-write 'no-conversion))
+               (let ((coding-system-for-read 'no-conversion))
                  (with-temp-file filename
                    (let ((outbuf (current-buffer)))
+                      ;; We will read the backend's output with no
+                      ;; conversions, so we should also save the
+                      ;; temporary file with no encoding conversions.
+                      (setq buffer-file-coding-system 'no-conversion)
                      ;; Change buffer to get local value of
                      ;; vc-checkout-switches.
                      (with-current-buffer filebuf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]