From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: RE: something like linum.el ought to be added Date: Mon, 17 Sep 2007 13:12:36 +0800 Message-ID: <63F95800EDD046419F17688AAFD41CCF01DE55D0@rnd-ex01.rnd.gdnt.local> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1190006108 18741 80.91.229.12 (17 Sep 2007 05:15:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2007 05:15:08 +0000 (UTC) Cc: lekktu@gmail.com, markus.triska@gmx.at, emacs-devel@gnu.org To: , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 17 07:15:06 2007 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 1IX8wn-0002Yh-6Q for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2007 07:15:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IX8wl-0003gR-Ko for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2007 01:14:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IX8wf-0003e2-RZ for emacs-devel@gnu.org; Mon, 17 Sep 2007 01:14:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IX8wd-0003bb-RV for emacs-devel@gnu.org; Mon, 17 Sep 2007 01:14:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IX8wd-0003bP-I6 for emacs-devel@gnu.org; Mon, 17 Sep 2007 01:14:51 -0400 Original-Received: from email.gdnt.com.cn ([202.104.30.38]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IX8wW-0000dB-V3; Mon, 17 Sep 2007 01:14:45 -0400 Original-Received: from sd-ef-01.cnshn.gdnt.local ([202.38.41.132]) by email.gdnt.com.cn with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Sep 2007 13:16:29 +0800 Original-Received: from sd-ex-01.cnshn.gdnt.local ([202.38.38.8]) by sd-ef-01.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Sep 2007 00:16:49 -0500 Original-Received: from rnd-ex01.rnd.gdnt.local ([202.38.32.250]) by sd-ex-01.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Sep 2007 13:16:48 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: something like linum.el ought to be added Thread-Index: Acf437QBv1QGSg+BQQWywdgHMaiG7AACZNIQ X-OriginalArrivalTime: 17 Sep 2007 05:16:48.0638 (UTC) FILETIME=[F2B539E0:01C7F8E9] X-TM-AS-Product-Ver: SMEX-7.0.0.1345-3.6.1039-15232.002 X-TM-AS-Result: No--4.417300-8.000000-31 X-Detected-Kernel: Windows 2000 SP4, XP SP1+ 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:79082 Archived-At: sometimes we can use outline- or hs- and others functions to hide a lot = of lines. it seems linum mode create/move overlays for every line = between window-start and window-end. So even the line is already hide, = linum still create/move overlay for it. If there are many line hiden = within the window, it will consume a lot of memory, also impact the = performance/efficience of the linum mode. Is it possible to avoid the = create linum overly for the invisible line?=20 -----Original Message----- From: emacs-devel-bounces+brianjiang=3Dgdnt.com.cn@gnu.org = [mailto:emacs-devel-bounces+brianjiang=3Dgdnt.com.cn@gnu.org] On Behalf = Of Richard Stallman Sent: 2007=C4=EA9=D4=C217=C8=D5 11:59 To: Stefan Monnier Cc: lekktu@gmail.com; markus.triska@gmx.at; emacs-devel@gnu.org Subject: Re: something like linum.el ought to be added > I think that means we need to add a suitable hook which redisplay = can > call to inform Lisp code that visibility changes may have altered = the > position of the bottom of the window. OTOH, using jit-lock would make this unnecessary. jit-lock implements a specific functionality, fontification, and nothing = else. I thought that the hooks used by jit-lock ought to be sufficient for = linum as well. But it turns out they are not, because the code to run = Vfontification_functions checks specifically for the `fontified' = property. We could add another similar hook, or a more general mechanism to = implement similar hooks for various uses. But I think that is the wrong = way to go, because it depends on putting text properties on the text, to = indicate which parts have been processed. (Fontified, in the case of = jit-lock.) We don't want linum to put on text properties to say where it has put = the line numbers. So I think my idea of using the same hooks jit-lock = uses was a mistake. We seem to have another solution, which I suggested and Markus Triska = implemened.=20 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel