diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2021-04-25 02:14:52 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2021-04-25 02:14:52 (GMT) |
| commit | abdcacaa537af703462790de2ebef9ad1b8f1e56 (patch) | |
| tree | 3bfba4bfda6cb901229b911786598a03031b8388 /init.el | |
| parent | 3b46746a3c3c56a046919300bcb435994f5baccd (diff) | |
| download | dotemacs-abdcacaa537af703462790de2ebef9ad1b8f1e56.zip dotemacs-abdcacaa537af703462790de2ebef9ad1b8f1e56.tar.gz dotemacs-abdcacaa537af703462790de2ebef9ad1b8f1e56.tar.bz2 | |
Handle simultaneous emacs invocations if init files are on NFS
Diffstat (limited to 'init.el')
| -rw-r--r-- | init.el | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -2,9 +2,20 @@ ;; Remember the initialization directory (setq ravi/init-dir (file-name-directory (or load-file-name (buffer-file-name)))) +(setq ravi/init-dir-is-local + (let* ((df (executable-find "df")) + (ret (call-process df nil nil nil "-l" (or load-file-name (buffer-file-name))))) + (eql ret 0))) (defun ravi/emacs-file (filename) - (expand-file-name filename ravi/init-dir) - ) + (expand-file-name filename ravi/init-dir)) +(setq ravi/past-directory + (ravi/emacs-file (if ravi/init-dir-is-local + "past" + (format "past-%s" (system-name))))) +(unless (file-accessible-directory-p ravi/past-directory) + (make-directory ravi/past-directory)) +(defun ravi/past-file (filename) + (expand-file-name filename ravi/past-directory)) ;; Initialize some customizations early on to avoid flicker (when window-system |
