I want to write a set of functions that call specific files, not by a specific name, but the newest file (with a certain suffix) in the directory. So far I've got
(defun org_lisp_dir ()
(interactive)
(switch-to-buffer (find-file-noselect "~/org/babeltest/c.org"))
but that doesn't get me the latest .org file. To do this I believe I need to use something like (eshell/ls something)
, but I'm not sure how to use (eshell/ls)
or integrate a complex eshell command into my code. The actual command would be something like ls -Art *.org | tail -n 1
which works just fine in eshell, BTW.