From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [poll] Fontify code in code blocks Date: Sat, 11 Jan 2014 10:48:20 +0100 Message-ID: <87y52m7st7.fsf@gmail.com> References: <86sisxz6ns.fsf@somewhere.org> <87wqi9ia0w.fsf@gmail.com> <87r48ezx8r.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1vAl-0004xV-3d for emacs-orgmode@gnu.org; Sat, 11 Jan 2014 04:48:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1vAf-00085G-PM for emacs-orgmode@gnu.org; Sat, 11 Jan 2014 04:48:07 -0500 In-Reply-To: <87r48ezx8r.fsf@bzg.ath.cx> (Bastien's message of "Sat, 11 Jan 2014 10:25:08 +0100") 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: Sebastien Vauban , emacs-orgmode@gnu.org, Joseph Vidal-Rosset Hello, Bastien writes: > Oh, maybe I see. You want highlighting in #+BEGIN_LaTeX > and #+BEGIN_HTML. > > Actually it makes sense. > > So that #+BEGIN_HTML would really be short for #+BEGIN_SRC html-mode > but with no need for header vars and all the plumbing. > > Nicolas, what do you think? I don't think it's a good idea. #+begin_html is /very/ different from #+begin_src html-mode. The former is raw html code that will be inserted in the output upon exporting. The latter is handled by Babel and is not an export-only feature (more often than not, it will not appear in the export output). Fontifying both the same way could introduce confusion between them. Additionally, some export back-ends allow multiple export block names (e.g. #+begin_markdown and #+begin_md), which could add to the confusion. And export one-liners, e.g. "#+HTML:" would probably need to be also fontified since they really are a shorthand for "#+begin_html...#+end_html". Too much trouble, IMO. > Would it be okay to enable syntax highlighting in #+BEGIN_{HTML,...} > blocks? It is possible to get syntax highlighting with C-c ' on such blocks. FWIW, I think this is enough. Regards, -- Nicolas Goaziou