Skip to content

Commit

Permalink
tweak(builtin): make use of +ignore-root to exclude x-win sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 9, 2024
1 parent 4e619ae commit b677fd6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions core/me-builtin.el
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,15 @@ or file path may exist now."
(set-auto-mode)))))

;; Advice `emacs-session-filename' to ensure creating "session.ID" files in a sub-directory
(advice-add
#'emacs-session-filename :filter-return
(defun +emacs-session-filename--in-subdir-a (session-filename)
"Put the SESSION-FILENAME in the \"x-win/\" sub-directory."
(concat (+directory-ensure minemacs-local-dir "x-win/")
(file-name-nondirectory session-filename)))))
(let ((x-win-dir (+directory-ensure minemacs-local-dir "x-win/")))
(advice-add
#'emacs-session-filename :filter-return
(defun +emacs-session-filename--in-subdir-a (session-filename)
"Put the SESSION-FILENAME in the \"x-win/\" sub-directory."
(concat x-win-dir (file-name-nondirectory session-filename))))

;; Don't show session files in recentf list and so on
(+ignore-root x-win-dir)))

(use-package minibuffer
:custom
Expand Down

0 comments on commit b677fd6

Please sign in to comment.