emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Bastien <bzg@altern.org>
Cc: Andreas Leha <andreas.leha@med.uni-goettingen.de>, emacs-orgmode@gnu.org
Subject: Re: org-exp-bibtex missing in git?
Date: Thu, 7 Mar 2013 07:03:59 -0500	[thread overview]
Message-ID: <CAFcZrT2mG0tFZRTrx5tKhm2SURHte-fCnDa+PyGCZhWwTQwxNA@mail.gmail.com> (raw)
In-Reply-To: <876213laso.fsf@bzg.ath.cx>

Hi Bastien,

On Thu, Mar 7, 2013 at 6:16 AM, Bastien <bzg@altern.org> 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	other threads:[~2013-03-07 12:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03  7:06 org-exp-bibtex missing in git? Vikas Rawal
2013-03-03 10:39 ` François Allisson
2013-03-03 17:11   ` Bastien
2013-03-03 17:19     ` Nicolas Goaziou
2013-03-03 20:00       ` Andreas Leha
2013-03-03 20:42         ` Nicolas Goaziou
2013-03-04  9:29           ` Eric S Fraga
2013-03-06 13:38           ` Andreas Leha
2013-03-06 18:25             ` Bastien
2013-03-06 18:39               ` Nicolas Goaziou
2013-03-06 21:16                 ` Andreas Leha
2013-03-06 22:55                 ` Bastien
2013-03-06 23:37                   ` Andreas Leha
2013-03-07  8:32                     ` Bastien
2013-03-07  8:44                       ` Andreas Leha
2013-03-07  5:38               ` aaronecay
2013-03-07  8:54                 ` Eric S Fraga
2013-03-07 10:21                 ` Bastien
2013-03-07 11:04                   ` Aaron Ecay
2013-03-07 11:16                     ` Bastien
2013-03-07 12:03                       ` Aaron Ecay [this message]
2013-03-07 13:13                   ` Nicolas Goaziou
2013-03-07 15:28                     ` Bastien
2013-03-07 17:39                       ` Achim Gratz
2013-03-07 22:06                         ` Bastien
2013-03-07 22:46                           ` Achim Gratz
2013-03-07 23:37                             ` Rasmus Pank Roulund
2013-03-07 23:43                               ` Rasmus
2013-03-08  0:10                                 ` Thomas S. Dye
2013-03-08  9:27                                   ` Rasmus
2013-03-08 17:36                                     ` Thomas S. Dye
2013-03-08 19:32                               ` aaronecay
2013-03-08 19:40                                 ` Rasmus
2013-03-08 19:29                       ` aaronecay
2013-03-09  9:28                         ` Bastien
2013-03-19  5:02                           ` Aaron Ecay
2013-04-18 10:58                             ` Bastien
2013-03-09 15:15                         ` Nicolas Goaziou
2013-03-09 16:04                           ` Jambunathan K
2013-03-09 16:12                             ` Jambunathan K
2013-03-09 17:08                             ` Thomas S. Dye
2013-03-07 10:04             ` Jambunathan K
2013-03-11 13:34               ` Andreas Leha
2013-03-04  4:40   ` Vikas Rawal
2013-03-04 13:55     ` Suvayu Ali

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=CAFcZrT2mG0tFZRTrx5tKhm2SURHte-fCnDa+PyGCZhWwTQwxNA@mail.gmail.com \
    --to=aaronecay@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=bzg@altern.org \
    --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).