From 32441cd15150f541d3ba50633cfb9fffc8d3d11a Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 5 Jan 2010 12:34:17 +0100 Subject: [PATCH] Fix agenda link opening bug Charles Sebold writes: > This is with a clean Emacs, nothing in .emacs except for what is > necessary to add my org-mode lisp directory to the load path and > (require 'org-install), Emacs pulled down from bzr this morning, and > current git download of org-mode, pulled a few minutes ago. > > With an org file like this: > > ------------------------------------------------------------------------ > * TODO Try out [[elisp:(org-version)][link problem]] if possible > ------------------------------------------------------------------------ > > Pull this into an agenda view, then put cursor over the link and try to > follow it. The result is as follows: --- lisp/ChangeLog | 3 +++ lisp/org.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 98d46e68c..13570ea8f 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-01-05 Carsten Dominik + * org.el (org-offer-links-in-entry): Fix bug when there is a + single link. + * org-exp.el (org-export): Make sure the mark is activated, also when `transient-mark-mode' is off. diff --git a/lisp/org.el b/lisp/org.el index 75ddcd140..34a60a7f2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8564,7 +8564,7 @@ there is one, offer it as link number zero." ((null links) (message "No links")) ((equal (length links) 1) - (setq link (car links))) + (setq link (list (car links)))) ((and (integerp nth) (>= (length links) (if have-zero (1+ nth) nth))) (setq link (nth (if have-zero nth (1- nth)) links))) (t ; we have to select a link