From a01ae6ee38227f2922cc6cd0e5b533089e832c19 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 6 May 2009 12:17:24 +0200 Subject: [PATCH] Export: Respect the description in a coderef Shaun Johanson writes: > Consider the following Org file: > > * Test > > See [[(foo)][FOOBIE]] > > #+BEGIN_EXAMPLE > : blah blah (ref:foo) > #+END_EXAMPLE > > Question 1) > In Org mode the link displays as FOOBIE, in the exported HTML it > displays as (foo). Is there any way to cause the link to use the > description (FOOBIE) in HTML? If not would this be a useful option > to add? This was a bug, fixed now. --- lisp/ChangeLog | 3 +++ lisp/org-exp.el | 2 +- lisp/org-html.el | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 961e60f94..616e1a7e1 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-05-06 Carsten Dominik + * org-exp.el (org-export-get-coderef-format): Use the description + is present. + * org.el (org-sort-entries-or-items): Improve docstring, and make better implementation for time sorting. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 47f7c7dea..71781187f 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2576,7 +2576,7 @@ stacked delimiters is N. Escaping delimiters is not possible." (regexp-quote (concat "(" path ")")) desc)) (replace-match "%s" t t desc) - "%s"))) + (or desc "%s")))) (provide 'org-exp) diff --git a/lisp/org-html.el b/lisp/org-html.el index 6ae938e65..3feb12cd8 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -965,7 +965,6 @@ lang=\"%s\" xml:lang=\"%s\"> ""))) ((string= type "coderef") - (setq rpl (format "%s" path path path (format (org-export-get-coderef-format path (and descp desc))