From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Patch: goto-address -vs- font-lock-mode Date: Wed, 04 Jul 2007 19:37:21 -0600 Message-ID: References: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183600679 18504 80.91.229.12 (5 Jul 2007 01:57:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2007 01:57:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 05 03:57:58 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6GbV-0007cj-Nl for ged-emacs-devel@m.gmane.org; Thu, 05 Jul 2007 03:57:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6GbV-0006qN-4s for ged-emacs-devel@m.gmane.org; Wed, 04 Jul 2007 21:57:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6GbQ-0006jy-HL for emacs-devel@gnu.org; Wed, 04 Jul 2007 21:57:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6GbP-0006ii-MH for emacs-devel@gnu.org; Wed, 04 Jul 2007 21:57:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6GbP-0006id-JP for emacs-devel@gnu.org; Wed, 04 Jul 2007 21:57:51 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6GbN-0000SP-J7; Wed, 04 Jul 2007 21:57:49 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l651vgDk011494; Wed, 4 Jul 2007 21:57:42 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l651vg9w018503; Wed, 4 Jul 2007 21:57:42 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l651vdep011508; Wed, 4 Jul 2007 21:57:41 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 05B9A378C42; Wed, 4 Jul 2007 19:37:21 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Richard Stallman's message of "Wed\, 04 Jul 2007 21\:29\:59 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74328 Archived-At: >>>>> "rms" == Richard Stallman writes: > This patch adds a new minor mode that acts like `goto-address'. > Unlike goto-address, it uses font-lock to add properties to text in > the buffer. This means that changes to the buffer which add URLs or > email address will automatically be detected. rms> Would it be more appropriate to use overlays for this? rms> You wouldn't want to copy those properties ever, and it is better rms> if adding them does not modify the buffer. rms> Is it feasible to use the font-lock mechanism to add overlays? I don't know. I don't really know that much about font-lock -- I just used it since it was an easy way to get the effect I wanted. I saw some code on the Emacs wiki that handles updating overlays in response to modifications to the buffer. Maybe this would be a good candidate for inclusion in Emacs itself. I can email you the code and/or the author's contact info if that would help. Also, Lennart told me off-list that there is some code in nXhtml to handle some cases related to this. I haven't looked at this code (or the overlay updating code for that matter) yet. Tom