Browse Source

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:
Carsten Dominik 15 years ago
parent
commit
32441cd151
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2010-01-05  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* 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.
 

+ 1 - 1
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