emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly
@ 2017-08-10 20:25 Marc Ihm
  2017-08-11 16:10 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Ihm @ 2017-08-10 20:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

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 #2: 0001-make-org-open-at-point-handle-parens-in-encoded-urls.patch --]
[-- Type: application/x-empty, Size: 896 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-11 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 20:25 [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly Marc Ihm
2017-08-11 16:10 ` Nicolas Goaziou
2017-08-11 18:24   ` Marc Ihm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).