[Top][All Lists]

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

RE: A Modest Proposal

From: Drew Adams
Subject: RE: A Modest Proposal
Date: Sun, 1 May 2016 08:46:35 -0800 (GMT-08:00)

> > For example, `ls-lisp.el' advises `insert-directory' so that
> > it uses `ls-lisp--insert-directory', and that lets you do
> > things like insert "/foo/*", meaning insert all of the files
> > (and subdirs) in directory foo, that is, its contents and not
> > just a single line for the directory.  Without using ls-lisp,
> > trying to do that results in:
> >
> >  insert-directory: Reading directory: no such file or
> >                    directory, /foo/*
> Not for me, it doesn't; not if I set the 3rd arg non-nil, as the doc
> string says I should.

That's true - if you set the 3rd arg, FULL-DIRECTORY-P non-nil.

In fact, my use case was accepting arbitrary file and dir names,
including glob patterns, at a `read-file-name' prompt, and adding
the indicated files and dirs to an existing Dired buffer.

So I wanted the code to automatically interpret the input
"/foo/*" as the contents of dir foo and just "/foo" (or "/foo/")
as a single listing line for the directory.  No indication
needed by the user for each input as to whether to use

Without ls-lisp, `insert-directory' apparently does not
do the job (at least as reported by one user -

(My function that does this is `diredp-dired-union-1'.
Passing it, as arg EXTRA, a list of files and dirs, where
each could be a glob pattern, adds those to a Dired buffer.)

reply via email to

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