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

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

Re: Column-number-mode ordinality question


From: Cecil Westerhof
Subject: Re: Column-number-mode ordinality question
Date: Tue, 04 May 2010 15:44:36 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Smith_RS <rsmithpv@gmail.com> writes:

> I know that historically RMS was against this, but is there any way in
> 23.1 to change the behavior of column-number-mode so that it begins
> with 1 and not 0?
>
> Under Linux I can just change the code in xdisp.c, but I'm doing more
> work with Windows these days.

I have some code that I use to display things different:

Attachment: laatste-fetch-gnus.png
Description: My modified modeline

I have here combined line number and column number. (Saves modeline
estate.) I work with the default starting with 0, but it is easy to
change the code. (The blessing of OSS.) I use:
    (defun buffer-position (&optional do-yank)
      (let ((ret-val (format "%d,%d" (line-number-at-pos) (current-column))))
        (buffer-count-exit do-yank (interactive-p) ret-val nil)))
but this could be changed to:
    (defun buffer-position (&optional do-yank)
      (let ((ret-val (format "%d,%d" (line-number-at-pos) (1+ 
(current-column)))))
        (buffer-count-exit do-yank (interactive-p) ret-val nil)))

Let me know if you are interested. I did post it in the past, but it
will be better to have the latest version.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

reply via email to

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