Make missing directories automatically

master
trémeur 2 years ago
parent e6a79ce0a8
commit 8f34521e56

@ -142,6 +142,17 @@ Its 2022.
(setq python-shell-interpreter "python3")
#+END_SRC
Make new directories automatically (from [[https://emacsredux.com/blog/2022/06/12/auto-create-missing-directories/][Emacs Redux]]).
#+BEGIN_SRC emacs-lisp
(defun er-auto-create-missing-dirs ()
(let ((target-dir (file-name-directory buffer-file-name)))
(unless (file-exists-p target-dir)
(make-directory target-dir t))))
(add-to-list 'find-file-not-found-functions #'er-auto-create-missing-dirs)
#+END_SRC
** OS-specific stuff
On Linux, I have to tell Emacs to use Chrome for web links.

Loading…
Cancel
Save