emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question on nested-blocks syntax
@ 2016-05-06  9:20 Albert Krewinkel
  2016-05-06 10:06 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2016-05-06  9:20 UTC (permalink / raw)
  To: emacs-orgmode

Hi list,

I was wondering about the current block syntax, specifically about
nested blocks.  The current way to get nested blocks requires escaping
of the nested block commands, e.g.

#+BEGIN_EXAMPLE
  ,#+BEGIN_EXAMPLE
    Meta-example
  ,#+END_EXAMPLE
#+END_EXAMPLE

My personal feeling is that it would be nicer to allow nesting blocks
simply by indenting them:

#+BEGIN_EXAMPLE
  #+BEGIN_EXAMPLE
    Indented meta-example
  #+END_EXAMPLE
#+END_EXAMPLE

I'd be very interested to learn if this (IMHO nicer) second option could
be supported or if there are æsthetical or technical reasons for not
supporting that syntax?

I'm the author of pandoc's org-mode reader and we initially supported
the latter syntax as it felt cleaner.  Since we are striving for maximum
comparability with Emacs as the reference implementation, this specific
feature has since been removed from the reader.

Is there any chance that indentation-based nesting will become legit
org-mode syntax?

Thanks,

Albert


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-06  9:20 Question on nested-blocks syntax Albert Krewinkel
@ 2016-05-06 10:06 ` Nicolas Goaziou
  2016-05-06 10:27   ` Albert Krewinkel
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2016-05-06 10:06 UTC (permalink / raw)
  To: Albert Krewinkel; +Cc: emacs-orgmode

Hello,

Albert Krewinkel <albert@zeitkraut.de> writes:

> Is there any chance that indentation-based nesting will become legit
> org-mode syntax?

I don't think so. It would introduce unnecessary complexity.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-06 10:06 ` Nicolas Goaziou
@ 2016-05-06 10:27   ` Albert Krewinkel
  2016-05-06 12:01     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2016-05-06 10:27 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Albert Krewinkel <albert@zeitkraut.de> writes:
>
>> Is there any chance that indentation-based nesting will become legit
>> org-mode syntax?
>
> I don't think so. It would introduce unnecessary complexity.

I guess that makes sense.  Too bad, though.

Thanks for the quick reply,

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-06 10:27   ` Albert Krewinkel
@ 2016-05-06 12:01     ` Nicolas Goaziou
  2016-05-07 18:09       ` Rasmus
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2016-05-06 12:01 UTC (permalink / raw)
  To: Albert Krewinkel; +Cc: emacs-orgmode

Albert Krewinkel <albert+orgmode@zeitkraut.de> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> I don't think so. It would introduce unnecessary complexity.
>
> I guess that makes sense.  Too bad, though.

My answer was terse. Let me elaborate a bit.

There are a few issues that come to mind when considering this. 

First, you cannot use regexps to parse an example block anymore. You
have to read a line after another until you find the end of the block.
This is more complex.

Also, it defeats the "-i" flag, which allows an user to ignore
indentation in an example block.

In any case, as long as fontification is not based on top of the parser,
I think we should refrain from introducing too deep changes in the
syntax without a serious motivation (e.g., speed concerns, or ambiguous
cases) behind it. I sympathize with aesthetics concerns, Org syntax,
particularly blocks, is "massive", but I think this is not a sufficient
motivation here.

Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-06 12:01     ` Nicolas Goaziou
@ 2016-05-07 18:09       ` Rasmus
  2016-05-08 13:52         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Rasmus @ 2016-05-07 18:09 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I sympathize with aesthetics concerns, Org syntax, particularly blocks,
> is "massive", but I think this is not a sufficient motivation here.

I wonder what you mean by "massive" here?  Do you mean the fact that there
is an explicit beginning and end?

Aside: I think a big getting rid of the FORTRAN-70 "touch" (capitalized
keywords and delimiters) would make Org must more ascetically pleasing.
(We’d just need to change default usage of templates and block
capitalization).

Rasmus

-- 
With monopolies the cake is a lie!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-07 18:09       ` Rasmus
@ 2016-05-08 13:52         ` Nicolas Goaziou
  2016-05-08 21:22           ` Rasmus
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2016-05-08 13:52 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> I sympathize with aesthetics concerns, Org syntax, particularly blocks,
>> is "massive", but I think this is not a sufficient motivation here.
>
> I wonder what you mean by "massive" here?  Do you mean the fact that there
> is an explicit beginning and end?

I mean that, visually, it can be a bit invasive, at times.

> Aside: I think a big getting rid of the FORTRAN-70 "touch" (capitalized
> keywords and delimiters) would make Org must more ascetically pleasing.
> (We’d just need to change default usage of templates and block
> capitalization).

I guess we could do that. 

However, I think it is already easy to write every keyword as lower
case. Moreover, there is no lower case for "#".


Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Question on nested-blocks syntax
  2016-05-08 13:52         ` Nicolas Goaziou
@ 2016-05-08 21:22           ` Rasmus
  0 siblings, 0 replies; 7+ messages in thread
From: Rasmus @ 2016-05-08 21:22 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> Aside: I think a big getting rid of the FORTRAN-70 "touch" (capitalized
>> keywords and delimiters) would make Org must more ascetically pleasing.
>> (We’d just need to change default usage of templates and block
>> capitalization).
>
> I guess we could do that. 
>
> However, I think it is already easy to write every keyword as lower 
> case.

As said, templates, and blocks inserted via org-structure-template-alist
are uppercased (as least the default).

> Moreover, there is no lower case for "#".

Neither is there a uppercase...


-- 
evidence suggests Snowden used a powerful tool called monospaced fonts

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-08 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06  9:20 Question on nested-blocks syntax Albert Krewinkel
2016-05-06 10:06 ` Nicolas Goaziou
2016-05-06 10:27   ` Albert Krewinkel
2016-05-06 12:01     ` Nicolas Goaziou
2016-05-07 18:09       ` Rasmus
2016-05-08 13:52         ` Nicolas Goaziou
2016-05-08 21:22           ` Rasmus

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).