emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Bastien <bzg@altern.org>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <n.goaziou@gmail.com>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Problem with org-entities-user
Date: Wed, 19 Sep 2012 09:23:59 -1000	[thread overview]
Message-ID: <m18vc5erzk.fsf@tsdye.com> (raw)
In-Reply-To: <874nmuhrr4.fsf@bzg.ath.cx> (Bastien's message of "Wed, 19 Sep 2012 19:00:47 +0200")

Aloha all,

Bastien <bzg@altern.org> writes:

> Hi,
>
> Nicolas Goaziou <n.goaziou@gmail.com> 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	other threads:[~2012-09-19 19:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17  2:32 Problem with org-entities-user Thomas S. Dye
2012-09-17  6:41 ` Nicolas Goaziou
2012-09-17 16:37   ` Thomas S. Dye
2012-09-19 13:15     ` Nicolas Goaziou
2012-09-19 14:55       ` Carsten Dominik
2012-09-19 15:55         ` Nicolas Goaziou
2012-09-19 17:00           ` Bastien
2012-09-19 19:23             ` Thomas S. Dye [this message]
2012-09-20  7:33           ` Carsten Dominik
2012-09-20 11:57             ` Nicolas Goaziou
2012-09-20 13:36               ` Carsten Dominik
2012-09-22  8:52                 ` Nicolas Goaziou
2012-09-22 14:57                   ` Carsten Dominik
2012-09-22 16:52                     ` Thomas S. Dye
2012-09-23  8:30                     ` Nicolas Goaziou
2012-09-23 10:01                       ` Carsten Dominik
2012-09-23 18:18                         ` Thomas S. Dye

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=m18vc5erzk.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=bzg@altern.org \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).