Properly unescape optional part in file links
authorNicolas Goaziou <n.goaziou@gmail.com>
Sat, 15 Mar 2014 15:04:38 +0000 (16:04 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Sat, 15 Mar 2014 15:04:38 +0000 (16:04 +0100)
* lisp/org.el (org-open-at-point): Unescape optional part in file
  links.

This patch allows to handle properly links like:

  [[file:somefile.org::*headline%20with%20spaces]]

Thanks to Thomas Holst for reporting it.

lisp/org.el

index cbcc7f9..b1022fd 100644 (file)
@@ -10556,7 +10556,8 @@ is used internally by `org-open-link-from-string'."
                             (cond ((not option) nil)
                                   ((org-string-match-p "\\`[0-9]+\\'" option)
                                    (list (string-to-number option)))
-                                  (t (list nil option))))))))
+                                  (t (list nil
+                                           (org-link-unescape option)))))))))
               ((assoc type org-link-protocols)
                (funcall (nth 1 (assoc type org-link-protocols)) path))
               ((equal type "help")