В Emacs 23.2 и выше доступен модуль dired-x.el
, и он дает вам доступ к команде, которая делает именно то, что вы хотите. После его загрузки (только (load "dired-x")
, как правило) вы сможете вызвать функцию dired-do-find-marked-files
. Вот его встроенная документация:
(dired-do-find-marked-files &optional NOSELECT)
Find all marked files displaying all of them simultaneously.
With optional NOSELECT just find files but do not select them.
The current window is split across all files marked, as evenly as possible.
Remaining lines go to bottom-most window. The number of files that can be
displayed this way is restricted by the height of the current window and
`window-min-height'.
To keep dired buffer displayed, type C-x 2 first.
To display just marked files, type C-x 1 first.
Таким образом, после загрузки dired-x
, вы можете просто использовать Mxdired-do-find-marked-files
RET, и вы получите именно то, что просит ваш вопрос: все отмеченные файлы будут посещены в хотя вы бы запустили dired-find-file
на всех из них.
Спасибо за это! Небольшая стилистическая точка, но вам не нужно использовать 'let *' в этом случае ('let' достаточно). И действительно, мы могли бы просто упростить эту последнюю форму для '(mapc 'find-file (dired-get-marked-files nil arg))'. – camdez