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-line autolearn=noversion=3.0.2


From: Kevin Rodgers
Subject: Re: Key binding M-g should really be goto-line autolearn=noversion=3.0.2 autolearn=no version=3.0.2
Date: Thu, 03 Mar 2005 14:18:00 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Drew Adams wrote:
Looking at the code for compilation-minor-mode (as I'm inexperienced with
it), I see no connection with what I suggested. That mode appears to work
only in buffers that can be parsed to work with next-error etc.

What I suggested was a simple command to pick up a numeral from any buffer,
regardless of what the numeral might mean in that buffer. It would be
rudimentary, but would do at least what people are doing with `goto-line',
without requiring them to key in the line number. A minor suggestion -
that's all.

Is this what you have in mind?

(defun goto-line-at-point (&optional buffer)
  "Go to the line whose number is given at point, counting like \
\\[goto-line].
With a prefix arg, prompt for a BUFFER and select it before moving."
  (interactive (list (if current-prefix-arg
                         (read-buffer "Goto buffer: "
                                      (other-buffer (current-buffer) t)
                                      t))))
  (when buffer
    (pop-to-buffer buffer))
  (goto-line (number-at-point)))

If so, maybe a mouse- version would be useful, too.

--
Kevin Rodgers





reply via email to

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