Re: [PATCH] Re: [Orgmode] Unintended behavior? Links without description

2011-02-14 Thread Bastien
Hi Christian,

Christian Moe m...@christianmoe.com writes:

 bbdb: Export links with normalized desc part

 * org-bbdb.el (org-bbdb-export): When a link description has been
 added by org-export-normalize-links, use path instead (remove the
 `bbdb:' prefix).

 The existing code handled the case where desc is nil. However, this no
 longer occurs, since org-export-normalize-links now automatically adds
 a desc to links, with a `bbdb:' prefix that would not usually be
 wanted in exported text. The patch results in the same output as
 originally intended.

 TINYCHANGE

Applied, thanks.

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[PATCH] Re: [Orgmode] Unintended behavior? Links without description

2011-02-13 Thread Christian Moe

bbdb: Export links with normalized desc part

* org-bbdb.el (org-bbdb-export): When a link description has been
added by org-export-normalize-links, use path instead (remove the
`bbdb:' prefix).

The existing code handled the case where desc is nil. However, this no
longer occurs, since org-export-normalize-links now automatically adds
a desc to links, with a `bbdb:' prefix that would not usually be
wanted in exported text. The patch results in the same output as
originally intended.

TINYCHANGE


diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index c04b7ff..1d3252c 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -208,10 +208,12 @@ date year).
   Create the export version of a BBDB link specified by PATH or DESC.
 If exporting to either HTML or LaTeX FORMAT the link will be
 italicized, in all other cases it is left unchanged.
+  (when (string= desc (format bbdb:%s path))
+(setq desc path))
   (cond
-   ((eq format 'html) (format i%s/i (or desc path)))
-   ((eq format 'latex) (format \\textit{%s} (or desc path)))
-   (t (or desc path
+   ((eq format 'html) (format i%s/i desc))
+   ((eq format 'latex) (format \\textit{%s} desc))
+   (t desc)))

 (defun org-bbdb-open (name)
   Follow a BBDB link to NAME.

diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index c04b7ff..1d3252c 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -208,10 +208,12 @@ date year).
   Create the export version of a BBDB link specified by PATH or DESC.
 If exporting to either HTML or LaTeX FORMAT the link will be
 italicized, in all other cases it is left unchanged.
+  (when (string= desc (format bbdb:%s path)) 
+(setq desc path))
   (cond
-   ((eq format 'html) (format i%s/i (or desc path)))
-   ((eq format 'latex) (format \\textit{%s} (or desc path)))
-   (t (or desc path
+   ((eq format 'html) (format i%s/i desc))
+   ((eq format 'latex) (format \\textit{%s} desc))
+   (t desc)))
 
 (defun org-bbdb-open (name)
   Follow a BBDB link to NAME.
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode