>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> Martin Buchholz <martin(a)xemacs.org> writes:
> xemacs -vanilla
> M-x column-number-mode
> M-x what-cursor-position
>
> The above two disagree on whether beginning-of-line is column 0 or 1.
> Why this inconsistency?
Hrvoje> This has been discussed a few months ago on comp.emacs.xemacs. Some
Hrvoje> thoughts:
Hrvoje> * It is logical for column-number-mode to count columns starting from
Hrvoje> 1, because that is the way lines are counted by line-number-mode.
Hrvoje> It was plain silly in older XEmacsen to press M-< and find yourself
Hrvoje> on "line 1, column 0".
Hrvoje> * what-cursor-position displays column numbers starting from 0 because
Hrvoje> of the long history of doing so, and consistency with
Hrvoje> `current-column' (the latter not being eligible to change because of
Hrvoje> Lisp incompatibility the change would cause). When the
Hrvoje> `column-number-start-at-one' feature was added, it was deemed
"safe"
Hrvoje> to change the relatively new modeline feature and leave the old
Hrvoje> function alone. In a way, I approve of this conservative choice.
Hrvoje> So column-number-mode needs to be consistent with two contradictory
Hrvoje> things, which is impossible.
Hrvoje> I think we should make `what-cursor-position' respect
Hrvoje> `column-number-start-at-one' variable.
Whatever we do, we have to be consistent. The user-visible and
lisp-visible column-numbering have to match. Since (current-column)
can't change, column-number-mode and what-cursor-position have to use
0-based column numbers as well (at least by default). If you add in
Stallmacs-compatibility, the decision is clear.
I vote for simply obsoleting column-number-start-at-one. I would be
willing to accept the compromise of making it default to nil, but even
that would be wrong. If we retain column-number-start-at-one, we
would have to make what-cursor-position respect
column-number-start-at-one, as Hrvoje suggests.
I feel strongly about this. Isn't our current behavior obviously totally
broken? It looks like a bug, so it is a bug.
Martin