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

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

Re: is it easy to make line numbering start at 0 too?


From: John Paul Wallington
Subject: Re: is it easy to make line numbering start at 0 too?
Date: Sun, 12 Jan 2003 16:53:58 +0000
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (powerpc-apple-darwin5.5)

seberino@spawar.navy.mil wrote:

> Thanks for the reply! This is a very cool way to do
> the modeline modification.... I originally made column numbering
> on modeline start at 1 this way....
[...]
>   (setq default-mode-line-format
[...]
>            '(:eval (format "%d" (1+ (current-column))))))
>   (add-hook 'post-command-hook (lambda () (force-mode-line-update)))

> This has side effects... it messed up scroll-step behavior... this is
> why I need a new way.

> A problem with hacking Emacs source code is that I can't
> make these changes happen on remote machines that I don't have root
> privileges on.
>
> Plus, it sounds like new Emacs versions may not be compatible
> with changes. 

Hacking decode_mode_spec in xdisp.c as mentioned earlier is much more
straightforward than trying to replicate the same effect in emacs
lisp.  XEmacs has a `column-number-start-at-one' builtin and heeds it.
If there is a genuine demand for the functionality you should propose
it to the Emacs maintainers; as demonstrated it is a simple addition.

It is controversial because presently the column and line number
displays on the modeline reflect `point' which is on a line and
between characters.  The question arises as to why a user wants Emacs
to tell fibs about column/line numbers; what is wrong with column
numbers starting at zero, and line numbers at one?

-- 
John Paul Wallington


reply via email to

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