Explorar el Código

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.
Carsten Dominik hace 17 años
padre
commit
14ef6932e4
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. 3 0
      lisp/ChangeLog
  2. 3 1
      lisp/org.el

+ 3 - 0
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,

+ 3 - 1
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:"