Emacs Howto

使用 dired. 先 mark 几个文件,然后按 A. 搜索会在第一个匹配处 停下,继续搜索按 M-,

在 dired, mark, 然后 Q.

使用 ibuffer. 先 mark 几个 buffer, 然后按 O.

使用 ibuffer. 先 mark 几个 buffer, 然后按 Q.

C-x =

在 dired 中 mark 上文件之后, C-u F.

使用 Sam's 提供的 sams-apply-macro-on-region 函数:

(defun sams-apply-macro-on-region (start end command) ;[Jesper]
  "Evaluate a given function (or the last defined macro) on region.
I.e. it will continue until the point is position
outside the region.

This function is much like the function apply-macro-to-region-lines,
which is shipped with Emacs. It has one difference though. It
executes the macros until point is below the end of the region."
  (interactive "r\naCommand name (default:last keyboard macro).")
  (goto-char end)
  (let ((mark (point-marker)))
    (goto-char start)
    (while (< (point) (marker-position mark))
    (if (not (fboundp command))
        (call-last-kbd-macro)
      (command-execute command)))))