emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Problem with org-entities-user


From: Thomas S. Dye
Subject: Re: [O] Problem with org-entities-user
Date: Wed, 19 Sep 2012 09:23:59 -1000

Aloha all,

Bastien <address@hidden> writes:

> Hi,
>
> Nicolas Goaziou <address@hidden> writes:
>
>> My point is not about removing anything related to LaTeX syntax. I'm
>> fine with a \cite{...} (although I think [[cite:...]] may be cleaner) as
>> long as it really is accepted by most major export back-ends.
>>
>> But I think accepting raw commands like \vspace, \hfill and al. is not
>> necessary (as long as there's still a way to send them to the export
>> back-end). We shouldn't trick users into thinking these commands will be
>> obeyed in any situation.
>
> The contrast between \cite{...} and \hfill is interesting: the former
> has an intuitive meaning in non-LaTeX backends too, so I agree
> [[cite:...]] would be better here, but \hfill is a pure LaTeXism
> (as are inline $...$ formulas for example.)
>
> If we had a general syntax like [[cite:...]], then allowing the
> \cite{...} latexism would be convenient but redundant, and we could
> safely advise against using it.
>
> But pure latexisms like \hfill have no intuitive equivalent in other
> backends, and there is no ambiguity on what the user expects when he
> uses this -- so accepting them is convenient.  Forcing #+LATEX: before
> these constructs would slow down editing the buffer.
>
> So here is the Occam's razor I suggest: let's generalize as much as
> possible, and let's handle as much latexisms as possible.

I wonder if the suggested razor is reasonable? Might it be better to
provide a mechanism for the user to generalize as much as possible and
have Org handle as many latexisms as needed to take fast notes?

I agree with Nicolas that having the regular expression recognize a
syntactically correct LaTeX command does not seem particularly useful if
Org isn't prepared to do the right thing in all cases. And, of course,
Org can't do the right thing in all cases because LaTeX isn't a fixed
target--there are new packages and commands introduced all the time.

Would the change to the regular expression that Nicolas proposes make it
possible to use org-entities-user more flexibly and practically as a way
to extend Org? I love the way org-entities takes care of all the export
backends *and* the display of the Org buffer. The examples that I used
to introduce this thread were unfortunately off the mark, and once I
stopped "thinking LaTeX" and started "thinking Org" I was able to
implement them perfectly with the existing Org facilities. Are there
examples of useful "entities" that would be made possible by Nicolas'
proposed change to the regular expression?

The other route I've found to extend Org (without messing the source
code) is links.  The approach I prefer parses the description (because
Org parses the path and I don't want to mess that up).  This works, but
it looks ugly in the Org buffer.  I'd love to be able to hook in a
function that told Org how to display my custom link :)

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



reply via email to

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