summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2008-12-19 16:40:12 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2008-12-19 16:40:12 +0100
commit14ef6932e472916cb4d7d5a44934ec70a7bd6d2a (patch)
tree2f77b9db7e7fb61cb7e26e83a21aee18d48ff452
parentc668817bf3be96f0864471566f45f27adea454f0 (diff)
downloadorg-mode-14ef6932e472916cb4d7d5a44934ec70a7bd6d2a.tar.gz
Store link: Capture description for ID links.
Creating links with org-store-link in org files did not capture the link description (the headline). Fixed with this patch. Report by F.D. Friedrichs.
-rwxr-xr-xlisp/ChangeLog3
-rw-r--r--lisp/org.el4
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f2ce31b..84db794 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2008-12-19 Carsten Dominik <carsten.dominik@gmail.com>
+ * org.el (org-store-link): Capture link description from
+ `org-id-store-link'.
+
* org-exp.el (org-export-html-format-image): Add the / to the end
of the <img> tag.
(org-export-format-source-code): Surround example by empty lines,
diff --git a/lisp/org.el b/lisp/org.el
index 397f91b..aeda46b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6270,7 +6270,9 @@ For file links, arg negates `org-context-in-file-links'."
(error nil)))))
;; We can make a link using the ID.
(setq link (condition-case nil
- (org-id-store-link)
+ (prog1 (org-id-store-link)
+ (setq desc (plist-get org-store-link-plist
+ :description)))
(error
;; probably before first headline, link to file only
(concat "file:"