emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded


From: Marc Ihm
Subject: [O] [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly
Date: Thu, 10 Aug 2017 22:25:05 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Hi,

the attached patch changes org-open-at-point in org.el:

Currently, when opening an url the function org-open-at-point uses the variable path, which is the result of applying org-link-unescape on the original url. Thus, all special chars like '() "' etc. which were originally encoded like %20%28 etc. are reverted to their clear text form. This worked for me in most cases, but gives me errors when my url contains encoded chars like '()', i.e. %28%29.

The submitted patch fixes this by simply using the original url with all special chars still encoded.

Please consider applying it, if fit.


Thanks,
Marc


--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10707,7 +10707,7 @@ a timestamp or a link."
                                   (t (list nil
(org-link-unescape option)))))))))
               ((functionp (org-link-get-parameter type :follow))
-               (funcall (org-link-get-parameter type :follow) path))
+ (funcall (org-link-get-parameter type :follow) (org-element-property :path link)))
               ((member type '("coderef" "custom-id" "fuzzy" "radio"))
                (unless (run-hook-with-args-until-success
                         'org-open-link-functions path)
--

Attachment: 0001-make-org-open-at-point-handle-parens-in-encoded-urls.patch
Description: application/empty


reply via email to

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