suvayu ali <fatkasuvayu+li...@gmail.com> wrote: > Hi Nick, > > On Mon, Aug 8, 2011 at 10:37 PM, Nick Dokos <nicholas.do...@hp.com> wrote: > >> > As far as I know, emacs accepts any wildcard that is valid in the shell. > >> > Since all your files are in ~/org, I would say try "~/org/*.org". The > >> > '~/org/' limits it to files within your org directory and the '*.org'[1] > >> > limits it to all files with a .org extension. > > > > Not true - if you want wildcards expanded, you have to do it yourself. > > E.g. C-h f file-expand-wildcards > > I should have been more precise. I meant to say in the context of the > current function or other functions which _accept_ wildcards as valid > arguments. Of course internally they use file-expand-wildcards, easily > verified by looking at the source of find-file. :) >
No, you were precise enough, but I was too careless to see it (and of course *knew* that find-file does not expand wildcards, even though the last time I looked at the code or its doc was probably 20 years ago: I have an inherent bias to assume that things don't change after I learn about them :-) ). You are right about find-file and friends re wildcards. I don't know why this does not work: $ emacs --batch --eval '(progn (find-file-read-only "~/lib/org/*.org" t) (org-batch-agenda "t"))' 2>/dev/null Global list of TODO items of type: ALL Available with `N r': (0)ALL and nothing after it, but when I evaluate (org-batch-agenda "t") in the running emacs, I get everything. Nick