|
|
|
|
@ -419,6 +419,23 @@ |
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "<f15>") 'flash-hline) |
|
|
|
|
#+END_SRC |
|
|
|
|
* Tidy-up |
|
|
|
|
** Save emacs-session files in appropriate directory |
|
|
|
|
Save session files to the ~sessions~ directory so that they do not litter |
|
|
|
|
the ~.emacs.d~ base directory. |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(defun emacs-session-filename (session-id) |
|
|
|
|
"Construct a filename to save the session in based on SESSION-ID. |
|
|
|
|
If the directory ~/.emacs.d exists, we make a filename in there, otherwise |
|
|
|
|
a file in the home directory." |
|
|
|
|
(let ((basename (concat "sessions/session." session-id)) |
|
|
|
|
(emacs-dir user-emacs-directory)) |
|
|
|
|
(expand-file-name (if (file-directory-p emacs-dir) |
|
|
|
|
(concat emacs-dir basename) |
|
|
|
|
(concat "~/.emacs-" basename))))) |
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Leftovers |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
;; * include other files |
|
|
|
|
@ -450,17 +467,6 @@ |
|
|
|
|
(require 'expand-region) |
|
|
|
|
(global-set-key (kbd "C-=") 'er/expand-region) |
|
|
|
|
|
|
|
|
|
;; * construct emacs-session so with session-id |
|
|
|
|
(defun emacs-session-filename (session-id) |
|
|
|
|
"Construct a filename to save the session in based on SESSION-ID. |
|
|
|
|
If the directory ~/.emacs.d exists, we make a filename in there, otherwise |
|
|
|
|
a file in the home directory." |
|
|
|
|
(let ((basename (concat "sessions/session." session-id)) |
|
|
|
|
(emacs-dir user-emacs-directory)) |
|
|
|
|
(expand-file-name (if (file-directory-p emacs-dir) |
|
|
|
|
(concat emacs-dir basename) |
|
|
|
|
(concat "~/.emacs-" basename))))) |
|
|
|
|
|
|
|
|
|
;; * Time stamps |
|
|
|
|
;; write |
|
|
|
|
;; Time-stamp: <> |
|
|
|
|
|