Chắc chắn linum-modelà một lựa chọn tốt. Nếu bạn không luôn muốn xem số dòng, như tôi, bạn có thể sử dụng thủ thuật này từ xuất sắc .emacs.d!? Blog.
Điều này tạm thời cho phép linum-modekhi bạn chạy goto-line.
Đây là mã từ blog của anh ấy:
(global-set-key [remap goto-line] 'goto-line-with-feedback)
(defun goto-line-with-feedback () "Show line numbers temporarily, while prompting for the line number input" (interactive) (unwind-protect
(progn
(linum-mode 1)
(goto-line (read-number "Goto line: ")))
(linum-mode -1)))