emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex c8d5756 4/7: URI-encode ? in filename to %3F (bu


From: Tassilo Horn
Subject: [elpa] externals/auctex c8d5756 4/7: URI-encode ? in filename to %3F (bug#45510)
Date: Tue, 29 Dec 2020 12:13:42 -0500 (EST)

branch: externals/auctex
commit c8d5756b03790d630b42dc9b179b748d2c12aed9
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    URI-encode ? in filename to %3F (bug#45510)
    
    * tex.el (TeX-evince-sync-view-1): Evince's dbus method wants an URI
    where ? is properly encoded as %3F so do so (bug#45510).
---
 tex.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tex.el b/tex.el
index b255d39..936671a 100644
--- a/tex.el
+++ b/tex.el
@@ -1186,9 +1186,13 @@ DE is the name of the desktop environment, APP is the 
name of
 viewer."
   (require 'url-util)
   (let* ((uri (concat "file://"
-                      (url-encode-url
-                       (expand-file-name
-                        (TeX-active-master (TeX-output-extension))))))
+                      ;; bug#45510: ? in filenames must be escaped as
+                      ;; %3F to be a proper URI.
+                      (replace-regexp-in-string
+                       "[?]" "%3F"
+                       (url-encode-url
+                        (expand-file-name
+                         (TeX-active-master (TeX-output-extension)))))))
          (owner (dbus-call-method
                  :session (format "org.%s.%s.Daemon" de app)
                  (format "/org/%s/%s/Daemon" de app)



reply via email to

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