emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Mark E. Shoulson" <mark@kli.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Flexible plain list bullets
Date: Fri, 20 Apr 2012 16:51:52 +0200	[thread overview]
Message-ID: <AE3BA9A4-83EB-4B04-A0DB-CC495A0D6854@gmail.com> (raw)
In-Reply-To: <4F90E3DC.1040901@kli.org>


On Apr 20, 2012, at 6:19 AM, Mark E. Shoulson wrote:

> I guess.  I spoke with someone on the IRC channel about this too, the basic idea being that the Org format should be stable, so the same file won't parse or behave differently on different installations.  There's something to be said for that, but there are a fair number of customizable options that conflict with that ideal already.  Some maybe should be there anyway, some might be better being made constants (or else reconsider my patch  :) ).  Examples:
> 
> + org-emphasis-regexp-components and org-emphasis-alist are probably top candidates.  These affect the parsing of Org in a pretty basic way: if you can change what characters to use for emphasis, and worse, exactly how they extend (what characters can interfere, etc), it's probably at least as potentially disruptive as alternate bullets.  You might consider making these defconst instead of defcustom, if at all possible.
> 
> + org-edit-src-region-extra is also a good example of exactly what you're saying shouldn't be there.  First code blocks came in different ad-hoc flavors like #+ascii or <lisp> or whatever.  Then the #+begin_src format came in order to unify them all and keep them from proliferating as new languages come up.  And so all of those are quite appropriately hardcoded, just as you say they should be, in the org-edit-src-find-region-and-lang function.  But that function also looks at org-edit-src-region-extra, which throws open exactly the same kind of problem you're objecting to.
> 
> + org-drawers is a customization that affects structure and parsing.  Notably it is also settable in-file, which anything like this really needs to be, so a file can carry its special needs with it.  This is actually probably a deeper structural change than bullets, but drawers can do great things, and so may be powerful enough to be worth it.
> 
> + TODO keywords and the like also affect parsing and export and cursor-movement (about the same stuff bullets would) and are settable, but again are really important and useful.  The COMMENT keyword less critical, but since it's a word, it's only reasonable that people should be able to have it in the appropriate language for their file.
> 
> Which does bring up one point: it isn't fair to imply that customizable bullets would not be "pure plain text."  Apart from the fact that they might well be used to make pure ASCII bullets (characters like @ or ! seem like possibilities), the fact is that Unicode *IS* plain text, that's what it's for.  TODO keywords and such can and should be able to take on values that use non-ascii letters for users of other languages, and Org files written in Hindi or Hebrew remain "pure plain text".


Hi Mark,

your point is well taken, but I believe that your argument
is in the end not a very strong one anyway:  The fact that we
do have cases where the Org syntax is not completely robust
and fixed cannot be an argument for adding more such cases.

<rant>
As you say, TODO keywords and DRAWERS can be set in the buffer,
to make parsing stable.

Using many different characters for emphasis is certainly a
mistake.  The main reason for the introduction of org-emphasis-alist
was to make html output configurable - and even that should
actually be done in a separate variable, as is done for
docbook and latex backends.  I have always hated myself for
introducing strikethrough emphasis at all and you can find
my rants about this through the years.  The trouble, however, is,
that once something like this has been added, it is hard to
remove again.

The reason for the existence of org-emphasis-regexp-components
is precisely because doing the parsing correctly for a large
set of emphasis delimiters is such a bitch, so I needed to play
with it to get it right.  But I totally agree with you, this
is a prime candidate for parser incompatibility between Org files.

Still, a syntax customization that changes the structure
of the file (like list bullets) is heavier that if a font
change goes wrong.  If you look back, I was originally not
for indroduction of alpha bullets, and I have often thought
that stars should not have been used for this purpose
because they cause ambiguity with headlines if unindented.
</rant>

Regards

- Carsten

> 
> (I wonder if it would matter if the customization could only ADD possibilities, like the org-edit-src-region-extra variable does, and not replace or take away the basic ones.)
> 
> ~mark
> 
> On 04/19/2012 06:01 AM, Carsten Dominik wrote:
>> On Apr 19, 2012, at 11:40 AM, suvayu ali wrote:
>> I think this is very well put.  Org must remain parsable,
>> and all basic syntactic elements should be pure plain text
>> and not configurable.
>> 
>> - Carsten
>> 
>>> However, Nicolas' suggestion about a minor mode to add overlays sounds
>>> like a great idea to me.
>>> 
>>> -- 
>>> Suvayu
>>> 
>>> Open source is the future. It sets us free.
>>> 
>> - Carsten
>> 
>> 
> 

- Carsten

      parent reply	other threads:[~2012-04-20 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19  1:24 Flexible plain list bullets Mark E. Shoulson
2012-04-19  8:18 ` Nicolas Goaziou
2012-04-19  9:40   ` suvayu ali
2012-04-19 10:01     ` Carsten Dominik
2012-04-20  4:19       ` Mark E. Shoulson
2012-04-20  5:58         ` Jambunathan K
2012-04-20 13:38         ` Bastien
2012-04-20 22:18           ` Mark E. Shoulson
2012-04-20 22:35             ` Bastien
2012-04-22 13:43               ` Mike McLean
2012-04-20 14:51         ` Carsten Dominik [this message]

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=AE3BA9A4-83EB-4B04-A0DB-CC495A0D6854@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mark@kli.org \
    /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).