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

2014-01-15 Thread Sebastien Vauban
Hello Bastien,

Bastien wrote:
 When `org-src-fontify-natively' will be `t' by default,
 it will be important to keep the distinction between source
 blocks and HTML/LaTeX blocks.

 So HTML blocks should remain unfontified by default, just
 to mark the difference with active source blocks.

I can share your idea that it's good to see a difference between both
types of code snippets. But, then, instead of _not_ fontifying the code
in question, it'd be better (for example) to provide them with
a different background color (other than the current
`org-block-background', shared by both types of snippets).

 I still think an option to highlight them would be nice.

Ouf ;-)

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

 For this I disagree... this would encourage using such
 one-liners too much.

I don't think having highlighting or not encourages one-lines: we need
them (for their purpose) or not, with or without highlighting.

On the contrary, not highlighting one-liners would encourage to convert
them into 3-liners (if we need the colors):

#+begin_html/latex
... one-line code ...
#+end_html/latex

Not sure to understand why you'd make a distinction.

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

 Well, it's not hard but not straightforward -- and I'd rather
 be sure that the decision is to take that route before I try to
 implement this.

 Waiting to read what other think.

So do I.

Best regards,
  Seb

-- 
Sebastien Vauban




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

2014-01-15 Thread Carsten Dominik



On 14 Jan 2014, at 21:47, Bastien b...@gnu.org wrote:

 Hi Sébastien,
 
 Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
 writes:
 
 I think this overall results of the poll is quite clear, no?
 
 Well, I think we should wait for Carsten's vote on this.
 
 Carsten, do you think `org-src-fontify-natively' should
 be set to `t' by default for Org 8.3?  Votes are for this
 default in majority so far, but there are only a few votes.


Hi Bastien,

I don’t have strong feelings either way.  Lets turn it on a see what the impact 
will be.

- Carsten

 
 -- 
 Bastien





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

2014-01-15 Thread Bastien


Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com writes:

 I don’t have strong feelings either way.  Lets turn it on a see what
 the impact will be.

Done in master, thanks,

-- 
 Bastien




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

2014-01-14 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 I think this overall results of the poll is quite clear, no?

Well, I think we should wait for Carsten's vote on this.

Carsten, do you think `org-src-fontify-natively' should
be set to `t' by default for Org 8.3?  Votes are for this
default in majority so far, but there are only a few votes.

-- 
 Bastien




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

2014-01-14 Thread Bastien


When `org-src-fontify-natively' will be `t' by default,
it will be important to keep the distinction between source
blocks and HTML/LaTeX blocks.

So HTML blocks should remain unfontified by default, just
to mark the difference with active source blocks.

I still think an option to highlight them would be nice.

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

For this I disagree... this would encourage using such
one-liners too much.

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

Well, it's not hard but not straightforward -- and I'd rather
be sure that the decision is to take that route before I try to
implement this.

Waiting to read what other think.

-- 
 Bastien




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

2014-01-13 Thread Eric S Fraga
Sebastien et al.,

+1 for org-src-fontify-natively set to t by default.  I've had this
turned on forever...  I cannot imagine using org without it!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




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

2014-01-13 Thread Sebastien Vauban
Hello Bastien,

Eric S Fraga wrote:
 +1 for org-src-fontify-natively set to t by default.  I've had this
 turned on forever...  I cannot imagine using org without it!

I think this overall results of the poll is quite clear, no?

Best regards,
  Seb

-- 
Sebastien Vauban




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

2014-01-11 Thread Bastien
Hi Joseph,

Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I must  add that  the highlighting  works only  in code  with begin_src-
 ... end_src à la org.

Yes, this is by design.

 But then,  at least in my configuration, it blocks
 the export in LaTeX or in HTML. 

Not sure I grok this part...

 I have not succeeded to get the same highlighting of the latex syntax at
 the moment in an org file with all the correct export functions. 

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?

Would it be okay to enable syntax highlighting in #+BEGIN_{HTML,...}
blocks?

-- 
 Bastien



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

2014-01-11 Thread Nicolas Goaziou
Hello,

Bastien b...@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



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

2014-01-11 Thread Sebastien Vauban
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




[O] [poll] Fontify code in code blocks

2014-01-09 Thread Sebastien Vauban
Hello,

Currently, to get code highlighting (which is contextual to the
language of the code block) enabled within your Org buffers, you need to
add the following line to your Emacs config file:

  (setq org-src-fontify-natively t)

as the default value of `org-src-fontify-natively' is `nil'.

WDYT if we turn it on by default?

Are there users explicitly wanting to keep that variable turned off. If
yes, can you explain why: performance reasons, others?

Best regards,
  Seb

-- 
Sebastien Vauban




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

2014-01-09 Thread Thierry Banel
Sebastien Vauban sva-news@... writes:

...
   (setq org-src-fontify-natively t)
 
 as the default value of `org-src-fontify-natively' is `nil'.
 
 WDYT if we turn it on by default?
...

I vote: YES, true by default






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

2014-01-09 Thread Joseph Vidal-Rosset
Le   jeu.   09   janv.   2014à   01:22:31   ,   Sebastien   Vauban
sva-n...@mygooglest.com a envoyé ce message:
 Hello,

 Currently, to get code highlighting (which is contextual to the
 language of the code block) enabled within your Org buffers, you need to
 add the following line to your Emacs config file:

   (setq org-src-fontify-natively t)

 as the default value of `org-src-fontify-natively' is `nil'.

 WDYT if we turn it on by default?

 Are there users explicitly wanting to keep that variable turned off. If
 yes, can you explain why: performance reasons, others?

 Best regards,
   Seb

Hello,

I must  add that  the highlighting  works only  in code  with begin_src-
... end_src à la org. But then,  at least in my configuration, it blocks
the export in LaTeX or in HTML. 

I have not succeeded to get the same highlighting of the latex syntax at
the moment in an org file with all the correct export functions. 

But in comparison of the advantages of org-mode, it is a very small problem. 

Best wishes,

Jo. 



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

2014-01-09 Thread Rick Frankel

On 2014-01-09 07:22, Sebastien Vauban wrote:

Hello,
(setq org-src-fontify-natively t)

as the default value of `org-src-fontify-natively' is `nil'.

WDYT if we turn it on by default?


+1.



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

2014-01-09 Thread Alexander Baier


On 2014-01-09 13:22 Sebastien Vauban wrote:
 WDYT if we turn it on by default?

+1. I turned this on the minute I found out about this feature. This was
one of the many wow-moments while discovering Org-mode.

Regards,
-- 
 Alexander Baier