emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-exp-bibtex missing in git?


From: Aaron Ecay
Subject: Re: [O] org-exp-bibtex missing in git?
Date: Thu, 7 Mar 2013 07:03:59 -0500

Hi Bastien,

On Thu, Mar 7, 2013 at 6:16 AM, Bastien <address@hidden> wrote:
> I want to allow adding link protocols (what I called "adding link
> types") from #+LINK.

Hmm.  I think I am beginning to understand your motivation for this.

> IIUC your proposal introduces some syntactic glue here:
> [[type:key;pre;post][desc]]
>           ^   ^
>
> If we allow this, it's better to allow this in general than just for a
> specific link type.  Hence my proposal to extend link abbreviation to
> be recognized as new link types when the #+LINK line contains more
> than two strings.

Will this be general enough, though?  HTML links can have a target in
addition to a title.  What if we used a key/value syntax?  Something
like:
[[type:address;key1=value1,key2=value2][description]]

The key/value pairs could be handled by the parser, and passed to the
link export function as an additional argument (or somehow stored in
one of the plists that gets shuffled around).

Then org-html-link would have to learn how to handle title, target,
and alt properties (the latter for images), as well as perhaps class
(for CSS styles).   I think there was a thread in the past couple
weeks, wherein it came to light that it's not possible presently to
uniquely associate an alt text with an image link (but I could be
misremembering, I didn't pay very close attention); this would fix
that issue as well.  org-bib-link would handle pre and post keywords.
(Obviously, the delimiters for this syntax would have to be chosen
carefully: semicolon and comma may not be the best choices.)

Then, it could be possible to have a keyword (perhaps LINK, but
perhaps PROTOCOL to decrease ambiguity) that behaves like a BIND for
org-link-protocols.  That is in the document
#+PROTOCOL: foo org-follow-foo org-export-foo
would be equivalent to the following lisp
(org-add-link-type "foo" #'org-follow-foo #'org-export-foo)

This still doesn't meet your desideratum of being able to specify new
syntaxes on the fly in a #+LINK keyword.  But one still has to write
lisp on your proposal (the org-html-link-with-title function), so it
just comes down to whether the customization goes in the document or
in the lisp.  (Which is ultimately a matter of taste, although my
impression is that one of the themes of the switch to the new exporter
has been to constrain the syntax and provide richer interfaces at the
lisp level for customizing behavior.)

Does that sound like a sensible proposal?  It has grown a bit beyond
the original "let's have bibliographies" motivation, but I hope that
it facilitates that while also being helpful more broadly.

Aaron



reply via email to

[Prev in Thread] Current Thread [Next in Thread]