[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
FULL-DIRECTORY-P or not.
Without ls-lisp, `insert-directory' apparently does not
do the job (at least as reported by one user -
http://emacs.stackexchange.com/a/21799/105).
(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.)
- Re: A Modest Proposal, (continued)
- Re: A Modest Proposal, Eli Zaretskii, 2016/05/04
- Re: A Modest Proposal, Dmitry Gutov, 2016/05/04
- Re: A Modest Proposal, Eli Zaretskii, 2016/05/04
- Re: A Modest Proposal, Michael Albinus, 2016/05/01
- Re: A Modest Proposal, Stefan Monnier, 2016/05/03
- Re: A Modest Proposal, Andy Moreton, 2016/05/04
- Re: A Modest Proposal, Eli Zaretskii, 2016/05/04
- Re: A Modest Proposal, Andy Moreton, 2016/05/04
- Re: A Modest Proposal, Michael Albinus, 2016/05/05
Re: A Modest Proposal, Eli Zaretskii, 2016/05/01
- RE: A Modest Proposal,
Drew Adams <=
Re: A Modest Proposal, Lars Ingebrigtsen, 2016/05/01
Re: A Modest Proposal, Richard Stallman, 2016/05/01