[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: messages buffer history
From: |
Le Wang |
Subject: |
Re: messages buffer history |
Date: |
Fri, 11 Jan 2013 22:55:34 +0800 |
On Fri, Jan 11, 2013 at 4:44 PM, drain <aeuster@gmail.com> wrote:
>> List of directory returned is in reverse chronological order.
>
> How would I insert the returned list into a buffer?
I think it's time to crack open that Elisp tutorial you're talking about:
(defun session-dirs ()
"return list of directories visited in session"
(delete-dups
(mapcar (lambda (f)
(file-name-directory f))
file-name-history)))
(defun display-session-dirs ()
"show list of session dirs in a buffer"
(interactive)
(pop-to-buffer (get-buffer-create "*session dirs*"))
(erase-buffer)
(insert (mapconcat 'identity (session-dirs) "\n")))
--
Le