From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: something like linum.el ought to be added Date: Tue, 11 Sep 2007 16:31:09 -0400 Message-ID: References: <86hcm4rw70.fsf@macs.hw.ac.uk> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1189542965 29293 80.91.229.12 (11 Sep 2007 20:36:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2007 20:36:05 +0000 (UTC) Cc: jbw@macs.hw.ac.uk, emacs-devel@gnu.org To: Markus Triska Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 22:36:03 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 1IVCSf-000124-Ho for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 22:35:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVCSf-0005ec-Jh for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 16:35:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVCOV-0003O1-Kh for emacs-devel@gnu.org; Tue, 11 Sep 2007 16:31:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVCOV-0003Ni-0D for emacs-devel@gnu.org; Tue, 11 Sep 2007 16:31:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVCOU-0003Nf-Su for emacs-devel@gnu.org; Tue, 11 Sep 2007 16:31:34 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVCOU-0005Pb-FF for emacs-devel@gnu.org; Tue, 11 Sep 2007 16:31:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IVCO5-0000it-Qz; Tue, 11 Sep 2007 16:31:09 -0400 In-reply-to: (message from Markus Triska on Mon, 10 Sep 2007 19:34:50 +0200) 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:78596 Archived-At: > Preserving overlays on the other parts of the buffer won't things > speed up Since those overlays can be reused when re-visiting the parts of the buffer they were created for, this can speed things up since it avoids re-creation of overlays and intermediate garbage collection. Someone pointed out that you can use the same set of overlays regardless of the buffer position. Line numbers should also be updated after scrolling, M-x goto-line and many other functions that change the visible portion. That is true. But you can do that by putting a hook onto window-scroll-functions. That plus after-change-functions let you get a call for every event that could make it necessary. Take a look at jit-lock.el and see how it determines when to act and where. linum.el can do it the same way.