all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jpw@shootybangbang.com (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	[thread overview]
Message-ID: <m2u1gefgwp.fsf@coco.shootybangbang.com> (raw)
In-Reply-To: <20030109131745.A31056@spawar.navy.mil> (seberino@spawar.navy.mil's message of "Thu, 9 Jan 2003 13:17:45 -0800")

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

  parent reply	other threads:[~2003-01-12 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-08  1:57 is it easy to make line numbering start at 0 too? Christian Seberino
2003-01-09 12:02 ` John Paul Wallington
     [not found]   ` <20030109131745.A31056@spawar.navy.mil>
2003-01-12 16:53     ` John Paul Wallington [this message]
2003-01-10 23:19 ` Rikard Bosnjakovic
2003-01-10 23:50 ` Benjamin Lewis
2003-01-11  0:10 ` Henrik Enberg

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=m2u1gefgwp.fsf@coco.shootybangbang.com \
    --to=jpw@shootybangbang.com \
    /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.