emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Flexible plain list bullets
@ 2012-04-19  1:24 Mark E. Shoulson
  2012-04-19  8:18 ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Mark E. Shoulson @ 2012-04-19  1:24 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/html, Size: 1429 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Lists-enable-customization-for-arbitrary-characters-.patch --]
[-- Type: text/x-patch; name="0001-Lists-enable-customization-for-arbitrary-characters-.patch", Size: 5200 bytes --]

From 5db3081b9487c09b17c7accfcf1b25f45002aa13 Mon Sep 17 00:00:00 2001
From: Mark Shoulson <mark@kli.org>
Date: Wed, 18 Apr 2012 20:55:41 -0400
Subject: [PATCH] Lists: enable customization for arbitrary characters for
 plain list bullets

* lisp/org-list.el (org-list-bulletcharlist): new custom variable
to set a list of characters for use as the bullets in plain lists.
Entails a few other variables set along with it.
---
 lisp/org-list.el |   67 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index 882ce3d..c751d1f 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -360,17 +360,60 @@ specifically, type `block' is determined by the variable
   "Regex corresponding to the end of a list.
 It depends on `org-empty-line-terminates-plain-lists'.")
 
-(defconst org-list-full-item-re
-  (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)"
-	  "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
-	  "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?"
-	  "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?")
+;; There shouldn't really have to be two different values here, since
+;; they need to be changed in sync...
+
+(defvar org-list-bullet-re)
+(defvar org-list-bullet-chars)
+(defvar org-list-full-item-re nil
   "Matches a list item and puts everything into groups:
 group 1: bullet
 group 2: counter
 group 3: checkbox
 group 4: description tag")
 
+(defcustom org-list-bulletcharlist '(?+ ?- ?*)
+  "Characters used as unordered plain list bullets.
+If nil, defaults to (?- ?+ ?*), i.e. hyphen, plus, and *.  If * is present,
+it only matches when not at the beginning of the line (it must be preceded
+by whitespace).
+
+Using letters as bullet characters is not recommended, as they also get
+interpreted as ordered lists."
+  :group 'org-plain-lists
+  :type '(choice (const nil)
+		 (const :tag "(+ - *)" '(?+ ?- ?*))
+		 (const :tag "(+ - * ‣)" '(?+ ?- ?* ?‣))
+		 (const :tag "(☞ ❦ ❧ ❥)" '(?☞ ?❦ ?❧ ?❥))
+		 (repeat character))
+  :set (lambda (name val)
+  	 (let* ((val (or val '(?- ?+ ?*)))
+  		;; - mustn't be in the middle!  Place it in front.
+  		(val (if (member ?- val)
+			 (cons ?- (remove ?- val))
+		       val))
+  		(star-p (member ?* val))
+  		(val (remove ?* val)))
+	   (setq org-list-bullet-chars 
+		 (concat (eval `(string ,@val))
+			 (when star-p "*")))
+	   (setq org-list-full-item-re
+		 (concat "^[ \t]*\\(\\(?:[" org-list-bullet-chars "]"
+			 "\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)"
+			 "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
+			 "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?"
+			 "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?"))
+  	   ;; * is a special case
+  	   (setq org-list-bullet-re 
+  		 (concat 
+  		  "\\(?:"
+  		  (when star-p "[[:blank:]]+\\*")
+  		  (when (and star-p val) "\\|")
+  		  "[[:blank:]]*["
+  		  (when val (eval `(string ,@val)))
+  		  "]\\)")))
+  	 (set name val)))
+
 (defun org-item-re ()
   "Return the correct regular expression for plain lists."
   (let ((term (cond
@@ -379,8 +422,8 @@ group 4: description tag")
 	       ((= org-plain-list-ordered-item-terminator ?.) "\\.")
 	       (t "[.)]")))
 	(alpha (if org-alphabetical-lists "\\|[A-Za-z]" "")))
-    (concat "\\([ \t]*\\([-+]\\|\\(\\([0-9]+" alpha "\\)" term
-	    "\\)\\)\\|[ \t]+\\*\\)\\([ \t]+\\|$\\)")))
+    (concat "\\(" org-list-bullet-re "\\|[ \t]*\\(\\(\\([0-9]+" alpha "\\)" term
+	    "\\)\\)\\)\\([ \t]+\\|$\\)")))
 
 (defsubst org-item-beginning-re ()
   "Regexp matching the beginning of a plain list item."
@@ -2229,7 +2272,7 @@ is an integer, 0 means `-', 1 means `+' etc.  If WHICH is
 		     (t (org-trim bullet))))
            ;; Compute list of possible bullets, depending on context.
 	   (bullet-list
-	    (append '("-" "+" )
+	    (append (mapcar 'char-to-string (string-to-list org-list-bullet-chars))
 		    ;; *-bullets are not allowed at column 0.
 		    (unless (and bullet-rule-p
 				 (looking-at "\\S-")) '("*"))
@@ -2403,7 +2446,9 @@ With optional prefix argument ALL, do this for the whole buffer."
   (interactive "P")
   (save-excursion
     (let ((cookie-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)")
-	  (box-re "^[ \t]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?\\(\\[[- X]\\]\\)")
+	  (box-re (concat 
+		   "^[ \t]*\\([" org-list-bullet-chars "]"
+		   "\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?\\(\\[[- X]\\]\\)"))
 	  (recursivep
 	   (or (not org-hierarchical-checkbox-statistics)
 	       (string-match "\\<recursive\\>"
@@ -2812,7 +2857,9 @@ COMPARE-FUNC to compare entries."
 				       (point) struct))))
 	     (value-to-sort
 	      (lambda ()
-		(when (looking-at "[ \t]*[-+*0-9.)]+\\([ \t]+\\[[- X]\\]\\)?[ \t]+")
+		(when (looking-at (concat
+				   "[ \t]*\\(?:[" org-list-bullet-chars "]"
+				   "\\|[0-9.)]\\)+\\([ \t]+\\[[- X]\\]\\)?[ \t]+"))
 		  (cond
 		   ((= dcst ?n)
 		    (string-to-number (buffer-substring (match-end 0)
-- 
1.7.7.6


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

* Re: Flexible plain list bullets
  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
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-04-19  8:18 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: emacs-orgmode

Hello,

"Mark E. Shoulson" <mark@kli.org> writes:

> Attached is a patch that adds a customization variable for setting
> which characters you can use as bullets in plain lists.  Unicode has
> all kinds of pretty characters like ❧ or ☞ that would be good for
> bullets, why limit ourselves to just [-+*]?

This has been discussed recently of the ML.  At that time, many
developers didn't like the idea of Unicode bullets.  I still don't.

> The variable's "set" function sets associated other related variables,
> regular expressions using it, treating "*" specially since it isn't
> a plain-list bullet at the beginning of a line.  Care is taken that
> the character "-" does not wind up in the middle of the character
> range (but there isn't special processing for "]", and maybe there
> should be).

If I understand it correctly, `org-list-full-item-re' wouldn't be set
for users not going through the Customize interface. If that's true, it
would be bad.

> Please take a look, see if it's worth adding tell me what else I need
> to do if necessary.  Thanks!

If you really want to beautify your Org files, you may, instead,
implement a minor mode adding customizable Unicode characters as
overlays on every bullet in the buffer.  I bet some users would
appreciate it.


Regards,

-- 
Nicolas Goaziou

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

* Re: Flexible plain list bullets
  2012-04-19  8:18 ` Nicolas Goaziou
@ 2012-04-19  9:40   ` suvayu ali
  2012-04-19 10:01     ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: suvayu ali @ 2012-04-19  9:40 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: org-mode mailing list

Hi Mark,

On Thu, Apr 19, 2012 at 10:18, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> "Mark E. Shoulson" <mark@kli.org> writes:
>
>> Attached is a patch that adds a customization variable for setting
>> which characters you can use as bullets in plain lists.  Unicode has
>> all kinds of pretty characters like ❧ or ☞ that would be good for
>> bullets, why limit ourselves to just [-+*]?
>
> This has been discussed recently of the ML.  At that time, many
> developers didn't like the idea of Unicode bullets.  I still don't.

As a user I don't like this either. I realise I don't have to use it if
I don't want to, but then this breaks the "Org format". I realise it is
still not formally defined but many external tools have been developed
which assumes these basic syntactic elements.

My personal reason for not liking this is, it makes it difficult for me
to use tools like grep or sed interactively when there is a file with
these fancy characters.

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.

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

* Re: Flexible plain list bullets
  2012-04-19  9:40   ` suvayu ali
@ 2012-04-19 10:01     ` Carsten Dominik
  2012-04-20  4:19       ` Mark E. Shoulson
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2012-04-19 10:01 UTC (permalink / raw)
  To: suvayu ali; +Cc: Mark E. Shoulson, org-mode mailing list


On Apr 19, 2012, at 11:40 AM, suvayu ali wrote:

> Hi Mark,
> 
> On Thu, Apr 19, 2012 at 10:18, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
>> "Mark E. Shoulson" <mark@kli.org> writes:
>> 
>>> Attached is a patch that adds a customization variable for setting
>>> which characters you can use as bullets in plain lists.  Unicode has
>>> all kinds of pretty characters like ❧ or ☞ that would be good for
>>> bullets, why limit ourselves to just [-+*]?
>> 
>> This has been discussed recently of the ML.  At that time, many
>> developers didn't like the idea of Unicode bullets.  I still don't.
> 
> As a user I don't like this either. I realise I don't have to use it if
> I don't want to, but then this breaks the "Org format". I realise it is
> still not formally defined but many external tools have been developed
> which assumes these basic syntactic elements.
> 
> My personal reason for not liking this is, it makes it difficult for me
> to use tools like grep or sed interactively when there is a file with
> these fancy characters.

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

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

* Re: Flexible plain list bullets
  2012-04-19 10:01     ` Carsten Dominik
@ 2012-04-20  4:19       ` Mark E. Shoulson
  2012-04-20  5:58         ` Jambunathan K
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Mark E. Shoulson @ 2012-04-20  4:19 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

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

(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
>
>

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

* Re: Flexible plain list bullets
  2012-04-20  4:19       ` Mark E. Shoulson
@ 2012-04-20  5:58         ` Jambunathan K
  2012-04-20 13:38         ` Bastien
  2012-04-20 14:51         ` Carsten Dominik
  2 siblings, 0 replies; 11+ messages in thread
From: Jambunathan K @ 2012-04-20  5:58 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: org-mode mailing list, Carsten Dominik

"Mark E. Shoulson" <mark@kli.org> writes:

> else reconsider my patch

Contributions to Org/Emacs requires copyright assignments.  Search for
FSF in the following page: http://orgmode.org/worg/org-contribute.html

I am wondering:

Why a overlay solution will not work for you?  Why do you need Unicode
characters right in the file.  Export engines can replace the ASCII
bullets with Unicode bullets.  

For the sake of argument, if the Org parser fails to parse and export a
non-canonical Org file will that upset you in anyways.

You need to offer a reason that goes beyond mere aesthetics to build a
much stronger case.

We should leave aside what is already there.  Your argument parallels
the below social situation. (Replace broken windows => Customizable
options, Vandalism => Feature creep)

Maintainers are trying to make sure that more customization aren't added
until a very strong case is made in support of them.

,---- http://en.wikipedia.org/wiki/Broken_windows_theory
| Consider a building with a few broken windows. If the windows are not
| repaired, the tendency is for vandals to break a few more
| windows. Eventually, they may even break into the building, and if
| it's unoccupied, perhaps become squatters or light fires inside. Or
| consider a sidewalk. Some litter accumulates. Soon, more litter
| accumulates. Eventually, people even start leaving bags of trash from
| take-out restaurants there or breaking into cars.
`----

That said, it is just a customizable option.  People use Org for diverse
needs.  If one is willing to pay the penalty of having a non-standard
Org file - broken export being one - then she is well within her rights
to shoot herself in the foot.

Btw, your proposal has received 3 downvotes already and not even a
single upvote yet.
-- 

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

* Re: Flexible plain list bullets
  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 14:51         ` Carsten Dominik
  2 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-04-20 13:38 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: org-mode mailing list, Carsten Dominik

Hi Mark,

I agree with Nicolas that a solution based on overlays would be better.

I also agree with you that there are many areas where we let the users
modify the content of Org files in a way that makes them unparsable in 
a systematic manner.

This is always a trade-off: user flexibility vs a rigid syntax.

On top of this trade-off there are many other one to consider, based 
on what are the available human (benevolent) resources to maintain Org.

I try to prioritize things this way:

1. fix current bugs
2. improve syntax stability (against current state of flexibility)
3. extend current features
4. integrate new features

Sometimes, a request raises a discussion somewhere between (3) and
(2) -- which is precisely the discussion we have now.  But pointing 
at failure in the current syntactic ground does not help promoting
a feature request at (3) :)  

Also, Nicolas is working on a generic parser which will be the 
base for future decision on (2), and (consequently) on (3).  

So yes, this is complicate.  We have many users.  And an overlay 
based solution will *not* be a temporary fix, it will be something
that any user can enjoy.

Thanks,

-- 
 Bastien

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

* Re: Flexible plain list bullets
  2012-04-20  4:19       ` Mark E. Shoulson
  2012-04-20  5:58         ` Jambunathan K
  2012-04-20 13:38         ` Bastien
@ 2012-04-20 14:51         ` Carsten Dominik
  2 siblings, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2012-04-20 14:51 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: org-mode mailing list


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

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

* Re: Flexible plain list bullets
  2012-04-20 13:38         ` Bastien
@ 2012-04-20 22:18           ` Mark E. Shoulson
  2012-04-20 22:35             ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Mark E. Shoulson @ 2012-04-20 22:18 UTC (permalink / raw)
  To: Bastien; +Cc: org-mode mailing list, Carsten Dominik

On 04/20/2012 09:38 AM, Bastien wrote:
> Hi Mark,
>
> I agree with Nicolas that a solution based on overlays would be better.

Probably, though very possibly not worth it.

>
> I also agree with you that there are many areas where we let the users
> modify the content of Org files in a way that makes them unparsable in
> a systematic manner.
>
> This is always a trade-off: user flexibility vs a rigid syntax.
Yes.  And as I noted in my examples, some/many of the cases involved 
were dealing with things that *really are worth* bending parsability for 
(as was pointed out to me on IRC.)  TODO keywords, for example, *really 
do* have to be customizable, and the system has to deal with it.  Even 
with global configuration variables, that in no way follow the files 
around.  I agree that those were worth doing it for.
>
> On top of this trade-off there are many other one to consider, based
> on what are the available human (benevolent) resources to maintain Org.
>
> I try to prioritize things this way:
>
> 1. fix current bugs
> 2. improve syntax stability (against current state of flexibility)
> 3. extend current features
> 4. integrate new features
>
> Sometimes, a request raises a discussion somewhere between (3) and
> (2) -- which is precisely the discussion we have now.  But pointing
> at failure in the current syntactic ground does not help promoting
> a feature request at (3) :)
Sure.  I'm just noting these because probably nobody would have seen 
them as issues if the importance of hard-coding the syntax hadn't come 
up as a point in answering me.  They (probably) aren't doing much harm 
anyway.  I'd offer to write a patch for some of the more obvious ones, 
to free up that much time from others, but it would be so small, it 
would probably take as long for someone to look over my patch as to 
write it themselves, so it wouldn't save anyone any time really.

"Pointing out a failure in the current syntactic ground does not help 
promoting a feature request at (3)"... It might have, had the failures 
been so widespread as to show that this was the intended mode all along 
(as was not the case, so no, it doesn't).  But getting the feature 
request in was already mostly off the table, I thought.  I found some 
stuff that might be useful to know about; thought I should say so. (I'm 
talkative, yes, but not necessarily a jerk.)
>
> Also, Nicolas is working on a generic parser which will be the
> base for future decision on (2), and (consequently) on (3).
That was mentioned, especially with respect to the source-blocks.
>
> So yes, this is complicate.  We have many users.  And an overlay
> based solution will *not* be a temporary fix, it will be something
> that any user can enjoy.
>
I played with making the customization only able to ADD new characters, 
which I think would not be so harmful, but really only for my own 
edification; I can see that there really is no desire (outside me) to 
add this feature anyway.

~mark

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

* Re: Flexible plain list bullets
  2012-04-20 22:18           ` Mark E. Shoulson
@ 2012-04-20 22:35             ` Bastien
  2012-04-22 13:43               ` Mike McLean
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-04-20 22:35 UTC (permalink / raw)
  To: Mark E. Shoulson; +Cc: org-mode mailing list, Carsten Dominik

Hi Mark,

"Mark E. Shoulson" <mark@kli.org> writes:

> I'd
> offer to write a patch for some of the more obvious ones, to free up that
> much time from others, but it would be so small, it would probably take as
> long for someone to look over my patch as to write it themselves, so it
> wouldn't save anyone any time really.

Writing a patch is the only way to have someone to look over it :)  
And this is always a good way to encourage devs to review/apply it.
And the author of the patch learns something new... we all started
there.

> (I'm talkative, yes, but not
> necessarily a jerk.)

:)

> I played with making the customization only able to ADD new characters,
> which I think would not be so harmful, but really only for my own
> edification; I can see that there really is no desire (outside me) to add
> this feature anyway.

Don't underestimate the Unpredictable -- I'm sure if you write something 
with overlays and funny Unicode chars for list bullets people will start
using it.  Speaking for me, I'd be curious to test it!

-- 
 Bastien

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

* Re: Flexible plain list bullets
  2012-04-20 22:35             ` Bastien
@ 2012-04-22 13:43               ` Mike McLean
  0 siblings, 0 replies; 11+ messages in thread
From: Mike McLean @ 2012-04-22 13:43 UTC (permalink / raw)
  To: Bastien; +Cc: Mark E. Shoulson, org-mode mailing list, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]


On Apr 20, 2012, at 6:35 PM, Bastien wrote:

> Don't underestimate the Unpredictable -- I'm sure if you write something 
> with overlays and funny Unicode chars for list bullets people will start
> using it.  Speaking for me, I'd be curious to test it!

Speaking of unpredictable; Emacs 24 now supports Unicode 6 and specifically U6 Emoticons (assuming a font that supports them, also).

http://j.mp/Ih9NZS

I actually see more of a use for new unicode characters for Tags than for bullet lists, but either one could be cool.

Mike


[-- Attachment #2: Type: text/html, Size: 1494 bytes --]

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

end of thread, other threads:[~2012-04-22 13:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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