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



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to