help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: viewing random list of files in dired


From: Drew Adams
Subject: RE: viewing random list of files in dired
Date: Sun, 18 Jan 2009 09:48:29 -0800

> > Function `dired' will accept a list of file names as its first
> > argument. That is the key here. This is all you need, to open Dired
> > using a list `file-names':
> >
> > (dired (cons (generate-new-buffer-name "My Dired")
> >              (nreverse (mapcar (lambda (file)
> >                                  (if (file-name-absolute-p file)
> >                                      (expand-file-name file)
> >                                    file))
> >                                file-names))))
> 
> Sorry to butt in right at the end here... but is something more that I
> would need to do for your example to work?
> 
> Just evaluating it give me "Symbol's value as variable is 
> void: file-names"

Just set `file-names' to a list of files. E.g.:
(setq file-names '("some-file-in-def-dir.el" "/some/abs/file/foo.el"))

No matter how the list of file names is created, it should work.

(FWIW, in Icicles you can create a list of files (in any directories) by
choosing them interactively.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]