GNU bug report logs -
#9917
24.0.90; Make `goto-line' consistent with the line number from the minibuffer
Previous Next
Full log
View this message in rfc822 format
> > For `goto-line':
> >
> > Let a negative prefix arg use line numbering wrt the
> > restriction (region), and let a positive prefix arg use
> > line numbering wrt the buffer (widened).
> >
> > Likewise for a number read at the prompt: negative for
> > restriction numbering, positive for full-buffer numbering.
>
> A negative line number usually means counting from the end of
> the buffer.
Dunno what "usually" means here. It certainly does not mean that for
`goto-line'. Currently, using a negative prefix arg seems to just move to line
1.
We can define what a negative arg means for `goto-line' to be anything we want.
Consistency is all well and good, especially when there are other, supporting,
good reasons to keep it up. But it sometimes happens that "usually" gets
"established" more or less by accident/default, no better alternative having
occurred to the designer at the time.
Other suggestions welcome. I think it would be good to be able to quickly say
whether you want numbering relative to the restriction or the whole buffer.
Of course another possibility is to simply have a separate command for that.
The only reason to use the same command and, say, a prefix arg, would be to save
keys (and user memory). A separate `goto-line-in-restriction' is a reasonable
solution, IMO.
This bug report was last modified 4 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.