From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.help Subject: Re: Make highlight-symbol.el perfect? Date: Thu, 11 Apr 2013 13:01:03 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bacc400e3b35b04da199183 X-Trace: ger.gmane.org 1365703308 9172 80.91.229.3 (11 Apr 2013 18:01:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 18:01:48 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 20:01:51 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQLok-0000Eu-Uj for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 20:01:51 +0200 Original-Received: from localhost ([::1]:49763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQLok-0005YC-KS for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 14:01:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQLo3-0004pb-C5 for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 14:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQLo0-00019b-L3 for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 14:01:07 -0400 Original-Received: from mail-pb0-f45.google.com ([209.85.160.45]:39626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQLo0-00018Y-7p for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 14:01:04 -0400 Original-Received: by mail-pb0-f45.google.com with SMTP id ro12so979894pbb.32 for ; Thu, 11 Apr 2013 11:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=GKA/yzOG7UxorjRFtFTkxQ7qhJyQ8GhFEDQZYXhobgQ=; b=bj4cDOP68ZAU65h2CfwOiV1bqRFgua3+zi3nA3QDAb04WkWVNihrosNFcHywY4VBrD fHCyMV4P03iXgKUMFJRDrExjF8kl+g63ybsg2z2EsktBdPldZk3wVhRVvyJ4FF+ipH3p ZSsCaM8Bnd8TmXScLPBibKa6Z4HQRPBjm0Td98s8BAHBXtsA2kE/fCQ+kRzZmnM7m1p5 9F0hKjguQwmi26uZMGITFqeT+xrdU7knUomyotAwuJ8zW2MZCa3xbPyQ0UEtV80jgnfr tIOrhMlcAwWC8hTXwpcrg9FoOY3E7CHGHOoU1auYbgA1SJZDW1aSsJgCUP8we2+7rAXZ 0vQw== X-Received: by 10.66.154.164 with SMTP id vp4mr11088328pab.89.1365703263496; Thu, 11 Apr 2013 11:01:03 -0700 (PDT) Original-Received: by 10.70.24.197 with HTTP; Thu, 11 Apr 2013 11:01:03 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.45 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90106 Archived-At: --047d7bacc400e3b35b04da199183 Content-Type: text/plain; charset=ISO-8859-1 Isn't that what overlays would do? How is text-property planes better? -Steven On Thu, Apr 11, 2013 at 10:45 AM, Stefan Monnier wrote: > > face on matched regions of the buffer. It should just add overlays. The > > code should get simpler, including removing the overlays when you > > un-highlight matches, because that's just `(mapcat #'delete-overlay > > existing-overlays)`. > > Better would be to add "text-property planes". So font-lock could > add&remove its `face' property and highlight-symbol could add&remove its > own `face' property without conflict. > > I think this would make a nice GSoC project. > > > Stefan > > > --047d7bacc400e3b35b04da199183 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Isn't that what overlays would do? How is text-propert= y planes better?

-Steven


On Thu, Apr 11, 2013 at 10:45 AM,= Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> face on matched regio= ns of the buffer. It should just add overlays. The
> code should get simpler, including removing the overlays when you
> un-highlight matches, because that's just `(mapcat #'delete-ov= erlay
> existing-overlays)`.

Better would be to add "text-property planes". =A0So font-l= ock could
add&remove its `face' property and highlight-symbol could add&r= emove its
own `face' property without conflict.

I think this would make a nice GSoC project.


=A0 =A0 =A0 =A0 Stefan



--047d7bacc400e3b35b04da199183--