bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5042: 23.1; linum-mode gives incorrect line numbers with narrowed b


From: Juanma Barranquero
Subject: bug#5042: 23.1; linum-mode gives incorrect line numbers with narrowed buffers
Date: Tue, 1 Dec 2009 01:32:26 +0100

X-Debbugs-CC: markus.triska@gmx.at
quit

On Thu, Nov 26, 2009 at 01:39, Mark Lillibridge <mark.lillibridge@hp.com> wrote:

>    Linum-mode does not work correctly with buffers that have been
> narrowed.  As a simple example, type ^h i.  You will note that the first
> line is assigned line number one.  You can verify that this is wrong
> either by using goto-line

Let's hear Markus' opinion, but IMHO that's not necessarily a bug.
Linum's function is to add line numbers, but these do not have to
correspond to buffer lines. For example, nothing stops you from doing

  (defvar my-num 1000)
  (make-variable-buffer-local 'my-num)

  (setq linum-format (lambda (n) (format "%4d" (+ n my-num))))


    Juanma





reply via email to

[Prev in Thread] Current Thread [Next in Thread]