all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <mark.lillibridge@hp.com>
Cc: 5042@emacsbugs.donarmstrong.com, 5042@debbugs.gnu.org,
	markus.triska@gmx.at, lekktu@gmail.com
Subject: bug#5042: 23.1; linum-mode gives incorrect line numbers with  narrowed buffers
Date: Wed, 23 Dec 2009 13:01:10 -0800	[thread overview]
Message-ID: <36E5CB5C587B4E33B6A9F0A213862385@us.oracle.com> (raw)
In-Reply-To: <200912232049.nBNKnLKS025189@mailhub-pa1.hpl.hp.com>

> Drew wrote:
> >  > > there should be an explicit option to switch between the modes.
> >  
> >  Yes, an option makes sense.
> >  
> >  And it can happen that the same person wants both behaviors at
> >  different times.  For that, why not let `C-u linum-mode' use, in
> >  effect, the opposite of the option value?
> 
> That might be a good idea.  Would an absolute override be better
> than a toggle?  E.g., a positive prefix uses absolute and a negative
> prefix uses relative to start of restriction.

I don't think so. Given the option's value, there already is a default behavior,
which makes one of your cases unnecessary. IOW, there is no override for one of
the two possibilities - the default behavior already corresponds to the
requested one.

If a given user prefers, in general, to use absolute numbering or relative
numbering, then s?he would set the option to reflect that. Then s?he need only
use `C-u' for the minority of times when s?he wants the alternative behavior.

FWIW, I do this kind of thing in some of my own code. Given the ability to
customize the default behavior, I see no reason for also being able to specify
the _default_ behavior explicitly via a particular prefix arg.

If, on the other hand, you were anticipating non-interactive use, then I'd say
that in that case all that's needed is to let-bind the variable (option) to give
it the value you want currently.







  reply	other threads:[~2009-12-23 21:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26  0:39 bug#5042: 23.1; linum-mode gives incorrect line numbers with narrowed buffers Mark Lillibridge
2009-12-01  0:32 ` Juanma Barranquero
2009-12-10  5:34   ` Mark Lillibridge
2009-12-10 11:41     ` Juanma Barranquero
2009-12-21  6:59       ` Mark Lillibridge
2009-12-21 10:37         ` Juanma Barranquero
2009-12-21 15:50           ` Drew Adams
2009-12-23 20:49             ` Mark Lillibridge
2009-12-23 21:01               ` Drew Adams [this message]
2009-12-23 21:44                 ` Mark Lillibridge
2009-12-24  3:49             ` Stefan Monnier
2009-12-29  7:02               ` Kevin Rodgers
2010-01-07  5:38           ` Mark Lillibridge
2010-01-07 23:30             ` Markus Triska
2010-01-10  1:32               ` Mark Lillibridge
2010-01-10  1:56                 ` Juanma Barranquero
2010-01-16 22:08                   ` Mark Lillibridge
2010-01-16 23:03                     ` Juanma Barranquero
2010-01-23 23:28                       ` Mark Lillibridge
2010-01-24  0:07                         ` Drew Adams
2010-02-03  5:01                           ` Mark Lillibridge
2010-01-24  9:21                         ` Juanma Barranquero
2010-01-10  2:05                 ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36E5CB5C587B4E33B6A9F0A213862385@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=5042@debbugs.gnu.org \
    --cc=5042@emacsbugs.donarmstrong.com \
    --cc=lekktu@gmail.com \
    --cc=mark.lillibridge@hp.com \
    --cc=markus.triska@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.