3

I am trying to delete extraneous files and directories generated during the export of a latex file from orgmode. I followed the instructions in a similarly named stackexchange post to delete extra files generated by the compilation step:

Cleanup org-mode export intermediary file

The code was:

(setq org-latex-logfiles-extensions (quote ("lof" "lot" "tex~" "aux" "idx" "log" "out" "toc" "nav" "synctex.gz" "el" "w18" "snm" "vrb" "dvi" "fdb_latexmk" "blg" "brf" "fls" "entoc" "ps" "spl" "bbl")))

This worked as expected for me. However, I have a couple of directories generated during the compile step that are not getting deleted. The directories are "auto" and "_minted_[org-filename]". When I say org-filename I mean the name of the org file is included in the intermediate directory name. So if a file is named forexport.org the directory would be "_minted-forexport".

The "auto" directory contains "el" files and the minted directories are empty.

Can anyone suggest how to delete the actual directories and any files in them? Is there an amendment I can make to the code above, or do I need something separate.

krishnab
  • 519
  • 5
  • 17
  • You need something separate: setting `org-latex-logfiles-extenstions` (also check `org-latex-remove-logfiles`: these two work together) *only* cleans **files** that match one of the extensions. I usually write a makefile to do whatever cleanup I want to do and invoke it from a shell buffer. Most, if not all, of the makefile is boilerplate, so I just have a template that I copy to wherever I need it. Not everything has to be in emacs. – NickD Dec 27 '17 at 16:05

0 Answers0