add additional workspaces for persp-mode auto save, manual invocaton

This commit is contained in:
KemoNine 2023-04-08 13:27:42 -04:00
parent 2b6e9edc6d
commit c05bd7c9ce
1 changed files with 35 additions and 0 deletions

View File

@ -1,6 +1,26 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; various workspaces used day to day
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; load most recent auto save
(defun kmn/workspace-load-auto ()
(interactive)
(persp-load-state-from-file "persp-auto-save")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; save the current workspace to `latest` filename
(defun kmn/workspace-save-latest ()
(interactive)
(persp-save-state-to-file "latest")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; load `latest` file name to current workspace
(defun kmn/workspace-load-latest ()
(interactive)
(persp-load-state-from-file "latest")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; org-mode workspace
(defun kmn/workspace-org ()
@ -18,4 +38,19 @@
(find-file "~/org/health/health_mike.org")
; put agenda in top side window (works around org-mode limitations
(kmn/org-agenda-on-top)
(next-multiframe-window)
(goto-char 0)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; empty code workspace
(defun kmn/workspace-code-empty ()
(interactive)
(delete-other-windows)
; start with scratch buffer active
(switch-to-buffer (get-buffer "*scratch*"))
; default scratch buffer has 2 comments @ top of file, jump past them
(with-no-warnings (goto-line 3))
; show dired at `~` in left side window
(kmn/dired-default-directory-on-left)
)