From mboxrd@z Thu Jan 1 00:00:00 1970 From: E Sabof Subject: Fwd: org-bullets extension Date: Sun, 16 Dec 2012 01:37:52 +0000 Message-ID: References: <87fw37n0j4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f3b9dad2d4a8404d0ee507a Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tk3Ay-0002lp-Nw for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 20:37:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tk3Aw-0007I5-9i for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 20:37:56 -0500 Received: from mail-ie0-f195.google.com ([209.85.223.195]:60106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tk3Aw-0007I1-4f for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 20:37:54 -0500 Received: by mail-ie0-f195.google.com with SMTP id k11so1258794iea.6 for ; Sat, 15 Dec 2012 17:37:53 -0800 (PST) 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: emacs-orgmode@gnu.org --e89a8f3b9dad2d4a8404d0ee507a Content-Type: text/plain; charset=ISO-8859-1 * Currently the bullets get painted with background color on occasion. * Overlays are easy to turn on/off. Same might be true for font-lock, I just haven't figured out a way. * Org-bullets conflict with overlay-heavy modes (ex. org-columns). This probably won't be the case with font-lock. * An important point is that in my version every character in text translates to a single character on display. Which makes it easier to work with headlines. In any case, I'm open to the possibility that this approach might lead to a better/shorter solution. On Sat, Dec 15, 2012 at 9:10 AM, Jambunathan K wrote: > I think what the package does can be achieved by the following snippet > or with minor tweaks to it. Is my understanding correct? > > (font-lock-add-keywords > 'org-mode `(("\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)" > (0 (progn (compose-region > (match-beginning 1) (match-end 1) > (pcase (length (match-string 1)) > (1 ?\u2219) > (2 ?\u2022) > (3 ?\u25c9) > (_ ?\u25CB))) > nil))))) > --e89a8f3b9dad2d4a8404d0ee507a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable * Currently=A0the bullets get painted with background color on occasion.
* Overlays=A0are eas= y to turn on/off. Same might be true for font-lock, I just haven't figu= red out a way.=A0
* Org-bullets conflict with overlay-heavy modes = (ex. org-columns). This probably won't be the case with font-lock.=A0
* An important point is that in my version e= very character in text translates to a single character on display. Which m= akes it easier to work with headlines.

In any case= , I'm open to the possibility that this=A0approach=A0might lead to a be= tter/shorter solution.

On Sat, Dec 15, 2012 at 9:10 AM, Jambunathan K <kjambunathan@gmail.co= m> wrote:
I think what the package does can be ac= hieved by the following snippet
or with minor tweaks to it. =A0Is my understanding correct?

=A0 =A0 (font-lock-add-keywords
=A0 =A0 =A0'org-mode `(("\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (0 (progn (compose-region
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(match-beginning= 1) (match-end 1)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(pcase (length (= match-string 1))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(1 ?\u2219)<= br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(2 ?\u2022)<= br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(3 ?\u25c9)<= br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(_ ?\u25CB))= )
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nil)))))


--e89a8f3b9dad2d4a8404d0ee507a--