From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Girard Subject: Re: [ANN] org-icons.el Date: Wed, 24 Jun 2009 12:23:28 +0200 Message-ID: <51b0095d0906240323t4a2c8616m7c4b27802163f06c@mail.gmail.com> References: <51b0095d0906231238u62ed3107v79dd6f72a284d81b@mail.gmail.com> <64bfe3d50906231554n43790a74p739bc0e7ff426b14@mail.gmail.com> <87my7yeeai.fsf@bzg.ath.cx> <64bfe3d50906231616l4ad64907sa49daa8f826d0248@mail.gmail.com> <51b0095d0906240241v57fb7191u90ed1d87d0585c69@mail.gmail.com> <41C49548-6364-4A9A-86D3-3E70DD5E245D@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0648882192==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJPdc-00063Q-GK for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 06:23:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJPdb-00062O-C5 for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 06:23:32 -0400 Received: from [199.232.76.173] (port=52920 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJPdb-00062L-5t for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 06:23:31 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:12141) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJPda-0004FC-HR for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 06:23:30 -0400 Received: by fg-out-1718.google.com with SMTP id l26so194119fgb.7 for ; Wed, 24 Jun 2009 03:23:29 -0700 (PDT) In-Reply-To: <41C49548-6364-4A9A-86D3-3E70DD5E245D@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik , emacs-orgmode@gnu.org --===============0648882192== Content-Type: multipart/alternative; boundary=000e0cd25cea97e0cc046d157f89 --000e0cd25cea97e0cc046d157f89 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/6/24 Carsten Dominik > > On Jun 24, 2009, at 11:41 AM, Nicolas Girard wrote: > > 2009/6/24 Carsten Dominik >> Could you guys please first explain the >> >> >> ;; This part is buggy (sorry) >> >> comment in the patch? >> >> Err... this just reflects my current lack of expressiveness in elisp... >> don't make me blush :-/ >> > > I am not complaining, no need to blush. > > The patch looks good. It does not add any hooks though, it > moves some of the font-lock functionality into special functions > that will then be overwritten by the org-icons package. Actually I tried to mimic the already existing code, e.g. org-font-lock-add-priority-faces. > A bit of > a brute force approach, but it may actually be the right thing > for this purpose. I'm unsure it's the best approach either. I'm wondering that all these (while (re-search-forward)) could slow things down. I'm not sure I fully understand the font-locking code, but it seems like it performs several -- possibly many -- regexp searches on one part of the buffer, alternatively adding or removing text properties, right ? I'm just wondering, could this be rewritten as one or several state machines, that would trigger text properties addition/removal only once for a given part of the buffer ? > > > I think I can easily apply the patch - I even like the fact that > it cleans up the font locking a bit and moves stuff into functions. > > But if this patch is preliminary, keep working on it and give me > a more complete version when done. Well, thanks for your support ! By the way, you didn't give your opinion on using icons yourself. Please confess us, are you a text-only addicted kind of guy, or a flashy, glossy icons amateur...? Nicolas --000e0cd25cea97e0cc046d157f89 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2009/6/24 Carsten Dominik <carsten.dominik@gmail.com>

On Jun 24, 2009, at 11:41 AM, Nicolas Girard wrote:

2009/6/24 Carsten Dominik <carsten.dominik@gmail.com>
Could you guys please first explain the


=A0;; This part is buggy (sorry)

comment in the patch?

Err... this just reflects my current lack of expressiveness in elisp... don= 't make me blush :-/

I am not complaining, no need to blush.

The patch looks good. =A0It does not add any hooks though, it
moves some of the font-lock functionality into special functions
that will then be overwritten by the org-icons package. =A0

Actually I tried to mimic the already existing code, e.g. org-f= ont-lock-add-priority-faces.

=A0
A bit of
a brute force approach, but it may actually be the right thing
for this purpose.

I'm unsure it's the be= st approach either. I'm wondering that all these (while (re-search-forw= ard)) could slow things down.

I'm not sure I fully understand the font-locking code, but it seems like it performs several -- possibly many -- regexp searches on one part of the buffer, alternatively adding or removing text properties, right ?

I'm just wondering, could this be rewritten as one or several state machines, that would trigger text properties addition/removal only once for a given part of the buffer ?
=A0


I think I can easily apply the patch - I even like the fact that
it cleans up the font locking a bit and moves stuff into functions.

But if this patch is preliminary, keep working on it and give me
a more complete version when done.

Well, thanks = for your support !
By the way, you didn't give your opinion on using icons yourself. Please confess us, are you a text-only addicted kind of guy, or a flashy, glossy icons amateur...?
=A0

Nicolas
--000e0cd25cea97e0cc046d157f89-- --===============0648882192== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0648882192==--