emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Sebastien Vauban <sva-news@mygooglest.com>,
	emacs-orgmode@gnu.org,
	Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
Subject: Re: [poll] Fontify code in code blocks
Date: Sat, 11 Jan 2014 10:48:20 +0100	[thread overview]
Message-ID: <87y52m7st7.fsf@gmail.com> (raw)
In-Reply-To: <87r48ezx8r.fsf@bzg.ath.cx> (Bastien's message of "Sat, 11 Jan 2014 10:25:08 +0100")

Hello,

Bastien <bzg@gnu.org> 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

  reply	other threads:[~2014-01-11  9:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 12:22 [poll] Fontify code in code blocks Sebastien Vauban
2014-01-09 12:56 ` Thierry Banel
2014-01-09 13:01 ` Joseph Vidal-Rosset
2014-01-11  9:25   ` Bastien
2014-01-11  9:48     ` Nicolas Goaziou [this message]
2014-01-11 11:35       ` Sebastien Vauban
2014-01-14 20:50         ` Bastien
2014-01-15  9:05           ` Sebastien Vauban
2014-01-09 17:10 ` Rick Frankel
2014-01-09 23:16 ` Alexander Baier
2014-01-13 16:33 ` Eric S Fraga
2014-01-13 20:26   ` Sebastien Vauban
2014-01-14 20:47     ` Bastien
2014-01-15 10:31       ` Carsten Dominik
2014-01-16  0:12         ` Bastien

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=87y52m7st7.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph.vidal.rosset@gmail.com \
    --cc=sva-news@mygooglest.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).