emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [poll] Fontify code in code blocks


From: Sebastien Vauban
Subject: Re: [O] [poll] Fontify code in code blocks
Date: Sat, 11 Jan 2014 12:35:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Nicolas Goaziou wrote:
>> 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.

FWIW, I think this would be great. As soon as we have to type real
HTML/LaTeX or whatever code inside the Org document, it's a great
addition to see the code we type with correct syntax highlighting. That
helps preventing errors, and allows quicker and easier understanding of
what the code does.

That would be the same for #+HTML/LaTeX one-liners, yes!

Now, I have no idea about what's the work required. But I definitely
would love to see that implemented.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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