From: Christian Moe <mail@christianmoe.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Unintended behavior? Links without description
Date: Tue, 28 Dec 2010 11:11:06 +0100 [thread overview]
Message-ID: <4D19B7BA.8010505@christianmoe.com> (raw)
Hi,
In pre-processing for export, links that lack a description part are
given one, which consists of the full raw path of the link. In other
words, link descriptions are never nil. This seems to conflict with
the expectations of org-bbdb.el and custom links based on that example.
The link [[bbdb:Carsten Dominik]], for instance, is exported to html
and latex as follows:
<i>bbdb:Carsten Dominik</i>
\textit{bbdb:Carsten Dominik}.
Org-bbdb.el is clearly prepared to be passed a desc that is nil, in
which case it would use path instead:
(defun org-bbdb-export (path desc format)
"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."
(cond
((eq format 'html) (format "<i>%s</i>" (or desc path)))
((eq format 'latex) (format "\\textit{%s}" (or desc path)))
(t (or desc path))))
However, desc is never nil, because a missing description part is
replaced in export pre-processing by a string consisting of the link
type, a colon, and the path. This takes place in the function
org-export-normalize-links.
This makes for unexpected behavior in custom links that some of us
have defined. E.g., Thomas S. Dye's `cite' links:
next reply other threads:[~2010-12-28 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 10:11 Christian Moe [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-12-28 10:29 Unintended behavior? Links without description Christian Moe
2010-12-31 20:09 ` Thomas S. Dye
2011-02-12 22:11 ` Bastien
2011-02-13 12:49 ` Christian Moe
2011-02-15 4:39 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D19B7BA.8010505@christianmoe.com \
--to=mail@christianmoe.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).