From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Problem with org-entities-user Date: Wed, 19 Sep 2012 09:23:59 -1000 Message-ID: References: <87k3vtgnhy.fsf@gmail.com> <87sjaeduh5.fsf@gmail.com> <7CC1FB98-B071-429C-A230-B91D461104FD@gmail.com> <87d31idn1v.fsf@gmail.com> <874nmuhrr4.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEPsY-00065w-Tn for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 15:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEPsV-0006P8-H7 for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 15:24:10 -0400 Received: from oproxy11-pub.bluehost.com ([173.254.64.10]:58514) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TEPsV-0006O9-7F for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 15:24:07 -0400 In-Reply-To: <874nmuhrr4.fsf@bzg.ath.cx> (Bastien's message of "Wed, 19 Sep 2012 19:00:47 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org-mode , Nicolas Goaziou , Carsten Dominik Aloha all, Bastien writes: > Hi, > > Nicolas Goaziou 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