From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.help Subject: Re: messages buffer history Date: Fri, 11 Jan 2013 22:55:34 +0800 Message-ID: References: <1357863990170-274949.post@n5.nabble.com> <89D6A56DF5B74F47A8F4AB92089BB5B6@us.oracle.com> <1357870521558-274956.post@n5.nabble.com> <1357893867571-274979.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1357916154 15955 80.91.229.3 (11 Jan 2013 14:55:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2013 14:55:54 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: drain Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 11 15:56:10 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ttg1f-0001qb-T9 for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 15:56:08 +0100 Original-Received: from localhost ([::1]:49977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttg1P-0006uQ-Tl for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 09:55:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttg1F-0006tv-M4 for Help-gnu-emacs@gnu.org; Fri, 11 Jan 2013 09:55:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ttg19-0007mY-LN for Help-gnu-emacs@gnu.org; Fri, 11 Jan 2013 09:55:41 -0500 Original-Received: from mail-qa0-f42.google.com ([209.85.216.42]:34605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttg19-0007mU-HM for Help-gnu-emacs@gnu.org; Fri, 11 Jan 2013 09:55:35 -0500 Original-Received: by mail-qa0-f42.google.com with SMTP id hg5so2605822qab.8 for ; Fri, 11 Jan 2013 06:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XExKMqs4bNhCryerkvjfSy2KQJS5Qx47isqaUR2dmYY=; b=eJ0EqRroVS66s+2f/5G/rnjK263xK4zoRtRlQRFb9dWx1MgM1zso07jfBgluyQ7S51 FHCPyi9mKzExCzEPjQ/CMoxduCqRx/Z8ORB0Y2dut425ezQTlusWvaaagE3rfVXgmNTd T6skEeYHoqnncuYAKpjtCnTmMwsjdbKR+yMhcjbOikSdE7U2vRWysam0xIXs5+MhnKOx LXttt5tqoPcL1lRJakCy88o7KDzzPwdzCcX6XmCbdKClt+lZhoQlZBhh7V5iDNf/6utc XzY0NFhW3jZNGN7g0lSi7k/t7oOXvyccoZl4kzkzwemVg5Z8zflI0fTfuvdtQrNgPyOM sXoQ== Original-Received: by 10.229.176.158 with SMTP id be30mr14574546qcb.113.1357916135076; Fri, 11 Jan 2013 06:55:35 -0800 (PST) Original-Received: by 10.49.87.42 with HTTP; Fri, 11 Jan 2013 06:55:34 -0800 (PST) In-Reply-To: <1357893867571-274979.post@n5.nabble.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.42 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88577 Archived-At: On Fri, Jan 11, 2013 at 4:44 PM, drain 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