(find-file "*.org" t)
.
And do that in directory "~/git/LeoUfimtsev.github.io/org/"
, if you want the Org files from that directory only.
E.g.:
(let ((default-directory "~/git/LeoUfimtsev.github.io/org/"))
(find-file "*.org" t))
The result of this is the same as if you had used C-x C-f *.org
in that directory: All of the Org files in the default directory will be opened (visited in a buffer).
I think maybe you were misreading the doc of find-file
, in this sense: I think you were misreading the description of parameter WILDCARDS
to be a string of wildcards. Instead, it is a Boolean value that says whether to interpret parameter FILENAME
as a glob pattern (i.e., as containing wildcards). Here is that part of the doc string:
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
expand wildcards (if any) and visit multiple files. You can
suppress wildcard expansion by setting `find-file-wildcards' to nil.
WILDCARDS
is only tested to see whether it is non-nil. Expansion of wildcards occurs for FILENAME
. So if you pass a FILENAME
of *.org
and you pass a non-nil value as the second argument (WILDCARDS
) then the glob pattern *.org
is expanded.