emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Moving "manual.org" into core


From: Nicolas Goaziou
Subject: Re: [O] [RFC] Moving "manual.org" into core
Date: Mon, 22 Jan 2018 18:20:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Kaushal Modi <address@hidden> writes:

> I am hoping that using "begin_src org" preserves the meta data that a code
> block is an Org snippet when the Org manual HTML pages are published on
> orgmode.org.

Again, Org manual, as published in "orgmode.org", is generated through
Texinfo, which treats "begin_src org" exactly as "begin_example". So,
switching to "begin_src org" will not give us Org fontification in HTML
output.

> Moreover, the advantage of using "begin_example" instead is:
>> 1. we can use fixed-width for one-liners,
>>
>
> I personally don't see that as a big advantage. Whether the snippet is a
> single line or more, one can just select those and use the Org structural
> template insertion to wrap that with "#+begin_src org" .. "#+end_src".

This is not about typing. When the markup is more visible than the
contents, it is visual clutter.

>> 2. Org fontification for source blocks can be sometimes misleading,
>>    as you sometimes cannot what is an example and what is not.

> I didn't understand that limitation. I use Org src blocks quite liberally
> in this Org document[1], some even with nested non-Org src blocks.
>
> #+BEGIN_SRC org :noweb-ref src-block-n-default-continue
> ,#+BEGIN_SRC emacs-lisp +n
> ;; This will be listed as line 22
> (message "This is line 23")
> ,#+END_SRC
> #+END_SRC
>
> I haven't found any issue.

It is a matter of taste. I tested both when updating the manual, and
eventually settled for example blocks.

In any case, I have no strong opinion about it. I just lean towards
simplicity.

> While pasting that example, I realized, that you don't even need to
> specially made an Org snippet an src block just because you want to use it
> as a noweb ref in the manual. Making Org snippets, src blocks, always, just
> feels like the right thing.

I didn't understand this part.



reply via email to

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