From: Marc Ihm <marc@ihm.name>
To: emacs-orgmode@gnu.org
Subject: [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly
Date: Thu, 10 Aug 2017 22:25:05 +0200 [thread overview]
Message-ID: <omifeu$u6d$1@blaine.gmane.org> (raw)
[-- 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 --]
next reply other threads:[~2017-08-10 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 20:25 Marc Ihm [this message]
2017-08-11 16:10 ` [PATCH] lisp/org.el: make org-open-at-point handle parens in encoded urls correctly Nicolas Goaziou
2017-08-11 18:24 ` Marc Ihm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='omifeu$u6d$1@blaine.gmane.org' \
--to=marc@ihm.name \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.