emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Some links not working anymore for me
@ 2014-03-11  3:29 François Pinard
  2014-03-11  4:43 ` Daimrod
  0 siblings, 1 reply; 2+ messages in thread
From: François Pinard @ 2014-03-11  3:29 UTC (permalink / raw)
  To: emacs-orgmode

Hi, Org people.

For a little while, I've not been able to follow links to Org files,
when the link contains a search to some header, and the searched header
itself contains white space or non-ASCII characters.  I just made this
patch that apparently helps me out of this new little misery :-).  The
patch is only indicative: I'm not sure it is the proper way to solve the
difficulty, as I do not really understand all the code surrounding it!

diff --git a/lisp/org.el b/lisp/org.el
index a0ed137..5c41b52 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10555,7 +10555,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")

François

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

* Re: Some links not working anymore for me
  2014-03-11  3:29 Some links not working anymore for me François Pinard
@ 2014-03-11  4:43 ` Daimrod
  0 siblings, 0 replies; 2+ messages in thread
From: Daimrod @ 2014-03-11  4:43 UTC (permalink / raw)
  To: emacs-orgmode

François Pinard <pinard@iro.umontreal.ca> writes:

> Hi, Org people.

Hello,

> For a little while, I've not been able to follow links to Org files,
> when the link contains a search to some header, and the searched header
> itself contains white space or non-ASCII characters.  I just made this
> patch that apparently helps me out of this new little misery :-).  The
> patch is only indicative: I'm not sure it is the proper way to solve the
> difficulty, as I do not really understand all the code surrounding it!

See this commit 8 days ago:
567ec87 * | Unescape links before opening them

> diff --git a/lisp/org.el b/lisp/org.el
> index a0ed137..5c41b52 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -10555,7 +10555,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")
>
> François
>

-- 
Daimrod/Greg

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

end of thread, other threads:[~2014-03-11  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11  3:29 Some links not working anymore for me François Pinard
2014-03-11  4:43 ` Daimrod

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).