From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E. Shoulson" Subject: Flexible plain list bullets Date: Wed, 18 Apr 2012 21:24:45 -0400 Message-ID: <4F8F695D.5090600@kli.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040200050502070803060204" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKg7J-0007GD-GD for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:25:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKg7E-0002PQ-Sw for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:25:01 -0400 Received: from pi.meson.org ([96.56.207.26]:41798) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SKg7E-00026l-MD for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:24:56 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------040200050502070803060204 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

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 [-+*]?

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

I put in some example sets to choose from in the customization menu, though they probably will not be usable since I understand Org-mode still has to support emacs versions that don't support Unicode.

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


~mark

--------------040200050502070803060204 Content-Type: text/x-patch; name="0001-Lists-enable-customization-for-arbitrary-characters-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="0001-Lists-enable-customization-for-arbitrary-characters-.pa"; filename*1="tch" >From 5db3081b9487c09b17c7accfcf1b25f45002aa13 Mon Sep 17 00:00:00 2001 From: Mark Shoulson 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 "\\" @@ -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 --------------040200050502070803060204-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Flexible plain list bullets Date: Thu, 19 Apr 2012 10:18:02 +0200 Message-ID: <87vckw3zk5.fsf@gmail.com> References: <4F8F695D.5090600@kli.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKmbe-00069z-PZ for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 04:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKmbY-0006i8-FF for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 04:20:46 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:49245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKmbY-0006i3-6a for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 04:20:40 -0400 Received: by wibhj13 with SMTP id hj13so1148604wib.12 for ; Thu, 19 Apr 2012 01:20:38 -0700 (PDT) In-Reply-To: <4F8F695D.5090600@kli.org> (Mark E. Shoulson's message of "Wed, 18 Apr 2012 21:24:45 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Mark E. Shoulson" Cc: emacs-orgmode@gnu.org Hello, "Mark E. Shoulson" 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 =E2=9D=A7 or =E2=98=9E 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, --=20 Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Flexible plain list bullets Date: Thu, 19 Apr 2012 11:40:41 +0200 Message-ID: References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKnrR-0003ve-87 for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 05:41:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKnrM-0002FV-FS for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 05:41:08 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:63696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKnrM-0002FJ-89 for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 05:41:04 -0400 Received: by obbeh20 with SMTP id eh20so6932776obb.0 for ; Thu, 19 Apr 2012 02:41:01 -0700 (PDT) In-Reply-To: <87vckw3zk5.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Mark E. Shoulson" Cc: org-mode mailing list Hi Mark, On Thu, Apr 19, 2012 at 10:18, Nicolas Goaziou wrote: > "Mark E. Shoulson" writes: > >> Attached is a patch that adds a customization variable for setting >> which characters you can use as bullets in plain lists. =C2=A0Unicode ha= s >> all kinds of pretty characters like =E2=9D=A7 or =E2=98=9E that would be= good for >> bullets, why limit ourselves to just [-+*]? > > This has been discussed recently of the ML. =C2=A0At that time, many > developers didn't like the idea of Unicode bullets. =C2=A0I 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. --=20 Suvayu Open source is the future. It sets us free. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Flexible plain list bullets Date: Thu, 19 Apr 2012 12:01:53 +0200 Message-ID: References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKoBj-00089E-G4 for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 06:02:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKoBd-0001aU-Oq for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 06:02:06 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:43290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKoBd-0001Zz-Gy for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 06:02:01 -0400 Received: by wibhm17 with SMTP id hm17so1310738wib.0 for ; Thu, 19 Apr 2012 03:01:58 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: suvayu ali Cc: "Mark E. Shoulson" , org-mode mailing list On Apr 19, 2012, at 11:40 AM, suvayu ali wrote: > Hi Mark, >=20 > On Thu, Apr 19, 2012 at 10:18, Nicolas Goaziou = wrote: >> "Mark E. Shoulson" writes: >>=20 >>> 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 =E2=9D=A7 or =E2=98=9E that = would be good for >>> bullets, why limit ourselves to just [-+*]? >>=20 >> 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. >=20 > 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. >=20 > 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 >=20 > However, Nicolas' suggestion about a minor mode to add overlays sounds > like a great idea to me. >=20 > --=20 > Suvayu >=20 > Open source is the future. It sets us free. >=20 - Carsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E. Shoulson" Subject: Re: Flexible plain list bullets Date: Fri, 20 Apr 2012 00:19:40 -0400 Message-ID: <4F90E3DC.1040901@kli.org> References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SL5K6-0005LE-GK for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 00:19:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SL5K4-0002qb-EW for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 00:19:54 -0400 Received: from pi.meson.org ([96.56.207.26]:43985) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SL5K4-0002WE-9j for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 00:19:52 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 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 > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Flexible plain list bullets Date: Fri, 20 Apr 2012 11:28:08 +0530 Message-ID: <81k41bymfj.fsf@gmail.com> References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SL6rZ-0000mp-HH for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 01:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SL6rX-0000S5-IW for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 01:58:33 -0400 Received: from mail-pz0-f49.google.com ([209.85.210.49]:61982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SL6rX-0000Rt-9W for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 01:58:31 -0400 Received: by dadq36 with SMTP id q36so10277073dad.36 for ; Thu, 19 Apr 2012 22:58:29 -0700 (PDT) In-Reply-To: <4F90E3DC.1040901@kli.org> (Mark E. Shoulson's message of "Fri, 20 Apr 2012 00:19:40 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Mark E. Shoulson" Cc: org-mode mailing list , Carsten Dominik "Mark E. Shoulson" 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. -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Flexible plain list bullets Date: Fri, 20 Apr 2012 15:38:45 +0200 Message-ID: <8762cuttei.fsf@altern.org> References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLE1q-0008CS-Cy for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 09:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLE1o-0005GC-IF for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 09:37:37 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:63524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLE1o-0005F1-8x for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 09:37:36 -0400 Received: by werj55 with SMTP id j55so7891995wer.0 for ; Fri, 20 Apr 2012 06:37:34 -0700 (PDT) In-Reply-To: <4F90E3DC.1040901@kli.org> (Mark E. Shoulson's message of "Fri, 20 Apr 2012 00:19:40 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Flexible plain list bullets Date: Fri, 20 Apr 2012 16:51:52 +0200 Message-ID: References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLFBu-0006tV-DJ for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 10:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLFBn-0006sp-K9 for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 10:52:05 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:50467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLFBn-0006sJ-7M for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 10:51:59 -0400 Received: by eaal1 with SMTP id l1so2657442eaa.0 for ; Fri, 20 Apr 2012 07:51:55 -0700 (PDT) In-Reply-To: <4F90E3DC.1040901@kli.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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: >=20 > + 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. >=20 > + 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 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. >=20 > + 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. >=20 > + 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. >=20 > 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. 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. Regards - Carsten >=20 > (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.) >=20 > ~mark >=20 > 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. >>=20 >> - Carsten >>=20 >>> However, Nicolas' suggestion about a minor mode to add overlays = sounds >>> like a great idea to me. >>>=20 >>> --=20 >>> Suvayu >>>=20 >>> Open source is the future. It sets us free. >>>=20 >> - Carsten >>=20 >>=20 >=20 - Carsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E. Shoulson" Subject: Re: Flexible plain list bullets Date: Fri, 20 Apr 2012 18:18:29 -0400 Message-ID: <4F91E0B5.9090006@kli.org> References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> <8762cuttei.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLM9z-00040R-Sr for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:18:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLM9x-00072p-SM for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:18:35 -0400 Received: from pi.meson.org ([96.56.207.26]:45385) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SLM9x-00072Y-NW for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:18:33 -0400 In-Reply-To: <8762cuttei.fsf@altern.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Flexible plain list bullets Date: Sat, 21 Apr 2012 00:35:41 +0200 Message-ID: <87sjfy116q.fsf@altern.org> References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> <8762cuttei.fsf@altern.org> <4F91E0B5.9090006@kli.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLMPT-0005Qj-GD for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLMPR-0003OL-Nm for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:34:35 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:39257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLMPR-0003OG-Ee for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 18:34:33 -0400 Received: by wgbdr1 with SMTP id dr1so7497225wgb.30 for ; Fri, 20 Apr 2012 15:34:31 -0700 (PDT) In-Reply-To: <4F91E0B5.9090006@kli.org> (Mark E. Shoulson's message of "Fri, 20 Apr 2012 18:18:29 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Mark E. Shoulson" Cc: org-mode mailing list , Carsten Dominik Hi Mark, "Mark E. Shoulson" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McLean Subject: Re: Flexible plain list bullets Date: Sun, 22 Apr 2012 09:43:36 -0400 Message-ID: References: <4F8F695D.5090600@kli.org> <87vckw3zk5.fsf@gmail.com> <4F90E3DC.1040901@kli.org> <8762cuttei.fsf@altern.org> <4F91E0B5.9090006@kli.org> <87sjfy116q.fsf@altern.org> Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_5F4662FB-0292-4982-A82C-22705488831C" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLx4p-0005gX-Dk for emacs-orgmode@gnu.org; Sun, 22 Apr 2012 09:43:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLx4n-00040X-7S for emacs-orgmode@gnu.org; Sun, 22 Apr 2012 09:43:42 -0400 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:39356 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLx4m-00040F-U9 for emacs-orgmode@gnu.org; Sun, 22 Apr 2012 09:43:41 -0400 In-Reply-To: <87sjfy116q.fsf@altern.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: "Mark E. Shoulson" , org-mode mailing list , Carsten Dominik --Apple-Mail=_5F4662FB-0292-4982-A82C-22705488831C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 20, 2012, at 6:35 PM, Bastien wrote: > Don't underestimate the Unpredictable -- I'm sure if you write = something=20 > 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 --Apple-Mail=_5F4662FB-0292-4982-A82C-22705488831C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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).


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

Mike

= --Apple-Mail=_5F4662FB-0292-4982-A82C-22705488831C--