, @Stefan, : , ? -
, , DIRNAME dired (a) Dired buffer, (b) ( ), Dired /dirs. IOW:
M-: (dired (cons DIRED-BUFNAME YOUR-LIST-OF-RECENT-DIRECTORIES))
:
M-: (dired '("My Dired Buffer" "/a/recent/dir/" "/another/recent1/" "/another/"))
Dired +, , arg dired.
, , Dired . :
(defun dired-recent (buffer)
"Open Dired in BUFFER, showing the recently used directories."
(interactive "BDired buffer name: ")
(let ((dirs (delete-dups
(mapcar (lambda (f/d)
(if (file-directory-p f/d)
f/d
(file-name-directory f/d)))
recentf-list))))
(dired (cons (generate-new-buffer-name buffer) dirs))))
. , vanilla Emacs i , , default-directory Dired buffer. , , .
, dired+.el. Dired + , cons dired.
Dired + , .
UPDATE
Dired +. : diredp-dired-recent-dirs diredp-dired-recent-dirs-other-window.
2
, . arg . arg dirs. arg ls. doc s tring diredp-dired-recent-dirs:
Open Dired in BUFFER, showing recently used directories.
You are prompted for BUFFER.
No prefix arg or a plain prefix arg (`C-u', `C-u C-u', etc.) means
list all of the recently used directories.
With a prefix arg:
* If 0, `-', or plain (`C-u') then you are prompted for the `ls'
switches to use.
* If not plain (`C-u') then:
* If >= 0 then the directories to include are read, one by one.
* If < 0 then the directories to exclude are read, one by one.
When entering directories to include or exclude, use `C-g' to end.
Finally, I added bindings for the commands: C-x R(the same window) and C-x 4 R(another window), where R- Shift + R.