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: Mon, 10 Sep 2007 12:53:19 -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 1189446624 22441 80.91.229.12 (10 Sep 2007 17:50:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2007 17:50:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Joe Wells , Markus Triska Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 03:50:10 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 1IUu30-0000Ke-8l for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 02:56:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUmYc-0007ZR-LF for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2007 12:56:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IUmWA-0005AC-D3 for emacs-devel@gnu.org; Mon, 10 Sep 2007 12:53:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IUmW9-000598-Kn for emacs-devel@gnu.org; Mon, 10 Sep 2007 12:53:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUmW9-00058o-E4 for emacs-devel@gnu.org; Mon, 10 Sep 2007 12:53:45 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IUmW9-00075e-4J for emacs-devel@gnu.org; Mon, 10 Sep 2007 12:53:45 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IUmVj-0004eb-ND; Mon, 10 Sep 2007 12:53:19 -0400 In-reply-to: <86hcm4rw70.fsf@macs.hw.ac.uk> (message from Joe Wells on Sun, 09 Sep 2007 11:04:51 +0100) 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:78469 Archived-At: The linum.el file can be found at: http://stud4.tuwien.ac.at/~e0225855/linum/linum.html It looks interesting. Is it efficient enough? It reassigns overlays to all the visible lines after every command, and that might be painfully slow. It might as well delete ALL the overlays it has made, rather than just those for the visible lines. Preserving overlays on the other parts of the buffer won't things speed up, and could waste a lot of space and maybe also cause slowdown by having so many overlays. It would be much better if it worked from after-change-functions, and reassigned overlays only for the lines that really need it. Anyone want to work on that? ? The line number should be put in its own face; linum.el puts it in the face default. ? The line number should be put in the display margins. This would allow better display of long lines that wrap around. The code in linum.el appears to be making some attempt to do this, but doesn't seem to actually use the margins. I agree those are good ideas.