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

From: Mark Lillibridge <[email-masked]>
Date: Sat, 23 Jan 2010 15:28:21 -0800

Ok, I have pulled the source code from the CVS repository and I'm
starting to work on the new feature/bug fix.

    We are creating a new variable that determines whether or not to
restart numbering lines at the start of a restriction.  I suggest
calling this "restart-numbering-restriction" with possible values t and
nil (=false).  Is this naming convention/description okay?

    Second, this should clearly be a customizable variable, thus created
with defcustom in some group.  The question is, which group?  Some quick
browsing with M-x customize suggests the reasonable possibilities are:

   emacs > convenience > Linum
     "Show line numbers in the left margin."

   emacs > editing > editing basics group
     "most basic editing facilities."

The first group here really seems to only be for Linum features, which
this is not.  It does look like a reasonable place a a user might
search/discover this option.  I'm not sure if I can declare a variable
in that group without actually requiring Linum to be loaded first.

What do people think?
- Mark

(defcustum restart-numbering-restriction nil
    "How should the lines of a restriction be numbered?  Normally, they receive the same line numbers as if no restriction existed (e.g., if the first line of the restriction is line number 10 of the file then it receives line number 10.  If this variable is true, the lines of the restriction are instead numbered from 1."
    :group ???
    :type  '(boolean))