From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/71428 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.gnus.general Subject: Re: [gnus git] branch master updated: Make gnus-group-add-icon work Date: Wed, 22 Sep 2010 19:15:06 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1285175715 903 80.91.229.12 (22 Sep 2010 17:15:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 17:15:15 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M19801@lists.math.uh.edu Wed Sep 22 19:15:13 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OySuX-0005Bq-4X for ding-account@gmane.org; Wed, 22 Sep 2010 19:15:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1OySuV-0004AE-1L; Wed, 22 Sep 2010 12:15:11 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OySuT-00049w-Ek for ding@lists.math.uh.edu; Wed, 22 Sep 2010 12:15:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OySuS-0003dG-DX for ding@lists.math.uh.edu; Wed, 22 Sep 2010 12:15:09 -0500 Original-Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OySuR-0003Uz-00 for ; Wed, 22 Sep 2010 19:15:07 +0200 Original-Received: from cigue.easter-eggs.fr (cigue.easter-eggs.fr [10.0.0.33]) by rose.easter-eggs.fr (Postfix) with ESMTPS id BE9F614142 for ; Wed, 22 Sep 2010 19:15:02 +0200 (CEST) Original-Received: from jdanjou by cigue.easter-eggs.fr with local (Exim 4.72) (envelope-from ) id 1OySuR-0000lH-0s for ding@gnus.org; Wed, 22 Sep 2010 19:15:07 +0200 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 22 Sep 2010 18:47:59 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:71428 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Sep 22 2010, Lars Magne Ingebrigtsen wrote: > Hooks are generally for user-enabled stuff. Even the highlight thing > really shouldn't be in that hook. I agree. But it was not empty! This is why I did add it here. :-) OTOH I can look to empty the hook by default. > And it looks like an expensive function. It starts with: > > (save-excursion > (let* ((end (line-end-position)) > ;; now find out where the line starts and leave point there. > (beg (line-beginning-position))) > (save-restriction > (narrow-to-region beg end) > (goto-char beg) > (let ((mystart (text-property-any beg end 'gnus-group-icon t))) > > And this is run once per line, whether you have %E to or not, isn't it? Sure, it is. But I will say early optimization is bad. I don't think is is slowing things down. C'mon! ;-) But, what I would prefer to do, is to build the %E value with the image directly, and then use that propertized string to replace %E in the spec. This would avoid scanning group lines=E2=80=A6 What do you think? PS: You know, I'm new, and I don't think like I'm authorized to move that old code all around, so I'm doing things little by little for now. ;-) =2D-=20 Julien Danjou // =E1=90=B0 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkyaOZoACgkQpGK1HsL+5c1CmwCggDxUwz282rsba06HxWeUeIqj TAAAoJyb5uo99okgAdY+k5hUODI4d6xT =yEm5 -----END PGP SIGNATURE----- --=-=-=--