Procházet zdrojové kódy

Better default description for link to Org-mode heading

Requested by Stefan Vollmar.
Carsten Dominik před 16 roky
rodič
revize
51ad548037
2 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-06-20  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-store-link): Better default description for link to
+	Org-mode headline.
+
 	* org-exp.el (org-export-generic): Autoload the generic exporter
 	function.
 	(org-export): Implement the `g' key for the generic exporter.

+ 1 - 1
lisp/org.el

@@ -7037,7 +7037,7 @@ For file links, arg negates `org-context-in-file-links'."
 			  (condition-case nil
 			      (org-make-org-heading-search-string txt)
 			    (error "")))
-		  desc "NONE")))
+		  desc (or (nth 4 (org-heading-components)) "NONE"))))
 	(if (string-match "::\\'" cpltxt)
 	    (setq cpltxt (substring cpltxt 0 -2)))
 	(setq link (org-make-link cpltxt)))))