emacs-devel
[Top][All Lists]
Advanced

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

RE: Key binding M-g should really be goto-lineautolearn=noversion=3.0.2


From: Drew Adams
Subject: RE: Key binding M-g should really be goto-lineautolearn=noversion=3.0.2 autolearn=no version=3.0.2
Date: Fri, 4 Mar 2005 16:49:13 -0800

    > How about making goto-line suggest the number at point
    > as its default argument?

    That seems very convenient!

I haven't yet received RMS's email, but yes, why not?

    I think it may also be convenient if, point is not on a number, use
    the first number on the current line as a default.

    This is because I think it's common to have point sitting at the
    beginning of an error line, and this would save users the effort of
    manually positioning point over the actual line number (the heuristic
    could fail in some cases if for instance a filename contained digits,
    but I think it would often be right).

    BTW, also maybe the prompt in the "use last selected buffer" case
    should mention the buffer name.

FYI - I don't suggest that `goto-line' itself should be changed this way,
but the code I sent for `goto-line-at-point' (which picks up a number in a
buffer to use as goto-line line number in another buffer), in my version,
uses `number-nearest-point' instead of `number-at-point'. That does what you
suggest wrt a number at line start. `number-nearest-point' is defined here:
http://www.emacswiki.org/elisp/thingatpt-plus.el.





reply via email to

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