bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25951: 26.0.50; Error when ediffing files that are visited using quo


From: Philipp Stephani
Subject: bug#25951: 26.0.50; Error when ediffing files that are visited using quoted file names
Date: Sat, 22 Apr 2017 19:43:09 +0000



<address@hidden> schrieb am Sa., 22. Apr. 2017 um 00:48 Uhr:
Philipp Stephani <address@hidden> writes:

> +       (let ((buffer (current-buffer)))
> +         ;; `unquote-then-quote' is only used for the
> +         ;; `verify-visited-file-modtime' action, which takes a buffer
> +         ;; as only optional argument.
> +         (with-current-buffer (or (car arguments) buffer)
> +           (let ((buffer-file-name (substring buffer-file-name 2)))
> +             ;; Make sure to hide the temporary buffer change from the
> +             ;; underlying operation.
> +             (with-current-buffer buffer
> +               (apply operation arguments))))))

I think this could be simplified by using the buffer-file-name function:

    ;; `unquote-then-quote' is only used for the
    ;; `verify-visited-file-modtime' action, which takes a buffer
    ;; as only optional argument.
    (let ((buffer-file-name
           (substring (buffer-file-name (car arguments)) 2)))
      (apply operation arguments))

That's not the same, it will set the file name of the wrong buffer. 

reply via email to

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