[Emacs] Add function to remove junk files in conlanging org project

This commit is contained in:
Lucien Cartier-Tilet 2022-03-06 22:16:46 +01:00
parent d5cf97d888
commit 84e3c91c51
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -5148,6 +5148,26 @@ The project is then defined like so:
"conlang-phundrak-com-pdf")) "conlang-phundrak-com-pdf"))
#+END_SRC #+END_SRC
This project leaves a lot of junk files here and there. This is why I
have this command to remove them easily.
#+begin_src emacs-lisp
(defun phundrak/clean-conlanging-directory ()
"Clean my conlanging directory from junk files."
(interactive)
(let ((files (directory-files-recursively phundrak//projects-conlanging-source
(rx (* print)
"."
(or "glo"
"html"
"ist"
"tex"
"pdf")))))
(mapc (lambda (file) (delete-file file))
(cl-remove-if (lambda (str)
(string-match-p (regexp-quote "headers.tex") str))
files))))
#+end_src
*** Org-ref and Bibtex configuration *** Org-ref and Bibtex configuration
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Packages-Configuration-Org-mode-org-ref-1h586cd085j0 :CUSTOM_ID: Packages-Configuration-Org-mode-org-ref-1h586cd085j0