Archived
1
0
Fork 0

Compare commits

..

No commits in common. "a72c1eff633154b2cbfed53489499ea8abd64005" and "ae4c4426cfa15cb67081876a2f439e7b7d95e2f1" have entirely different histories.

2 changed files with 13 additions and 50 deletions

View file

@ -3,7 +3,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; open org agenda in top side window ; open org agenda in top side window
; BUGGED AND UNUSED, agenda does NOT work properly in side windows
(defun kmn/org-agenda-on-top () (defun kmn/org-agenda-on-top ()
(defvar parameters (defvar parameters
'(window-parameters . ((no-other-window . t) '(window-parameters . ((no-other-window . t)
@ -21,7 +20,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; open dired with default directory in left side window ; open dired with default directory in left side window
(defun kmn/dired-directory-on-left (&optional dir_path) (defun kmn/dired-default-directory-on-left ()
(defvar parameters (defvar parameters
'(window-parameters . ((no-other-window . t) '(window-parameters . ((no-other-window . t)
(no-delete-other-windows . t)))) (no-delete-other-windows . t))))
@ -31,7 +30,7 @@
"Display `default-directory' in side window on left, hiding details." "Display `default-directory' in side window on left, hiding details."
(interactive) (interactive)
(let ((buffer (dired-noselect (or dir_path (setq dir_path default-directory))))) (let ((buffer (dired-noselect default-directory)))
(with-current-buffer buffer (dired-hide-details-mode t)) (with-current-buffer buffer (dired-hide-details-mode t))
(display-buffer-in-side-window (display-buffer-in-side-window
buffer `((side . left) (slot . -1) buffer `((side . left) (slot . -1)
@ -41,16 +40,6 @@
) )
) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; show scratch buffer
(defun kmn/show-buffer-scratch ()
(interactive)
; 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))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; quick reference notes as a pop up window ; quick reference notes as a pop up window
(defun kmn/popwin-quick-ref () (defun kmn/popwin-quick-ref ()
@ -91,15 +80,8 @@ position between last non-whitespace and `end-of-line'."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; function to kill all non special, non active buffers ; function to kill all non special, non active buffers
(defun kmn/kill-other-buffers () (defun kmn/kill-other-buffers ()
"Kill all buffers but the current one. Don't mess with special buffers. Kill dired buffers" "Kill all buffers but the current one. Don't mess with special buffers."
(interactive) (interactive)
; dired buffer cleanup
(mapc
(lambda (buffer)
(when (eq 'dired-mode (buffer-local-value 'major-mode buffer))
(kill-buffer buffer)))
(buffer-list))
; non special buffer cleanup
(dolist (buffer (buffer-list)) (dolist (buffer (buffer-list))
(unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer))) (unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer)))
(kill-buffer buffer)))) (kill-buffer buffer))))

View file

@ -25,13 +25,10 @@
; org-mode workspace ; org-mode workspace
(defun kmn/workspace-org () (defun kmn/workspace-org ()
(interactive) (interactive)
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
; front load org-agenda so it doesnt reshuffle the frame layout on us ; front load org-agenda so it doesnt reshuffle the frame layout on us
(org-agenda nil "r") (org-agenda nil "r")
(split-window-below) ; start with fresh frame
(next-multiframe-window) (delete-other-windows)
; show kmn's slipbox ; show kmn's slipbox
(find-file "~/org/orgzly/_slipbox.org") (find-file "~/org/orgzly/_slipbox.org")
; split window for additional file to show ; split window for additional file to show
@ -39,37 +36,21 @@
(next-multiframe-window) (next-multiframe-window)
; show kmn health notes/data tracker ; show kmn health notes/data tracker
(find-file "~/org/health/health_mike.org") (find-file "~/org/health/health_mike.org")
; switch to top of agenda window so most useful window is focused ; put agenda in top side window (works around org-mode limitations
(kmn/org-agenda-on-top)
(next-multiframe-window) (next-multiframe-window)
(goto-char 0) (goto-char 0)
) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; empty code workspace ; empty code workspace
(defun kmn/workspace-code-empty (&optional dir_path) (defun kmn/workspace-code-empty ()
(interactive) (interactive)
(delete-other-windows) (delete-other-windows)
(kmn/kill-other-buffers) ; start with scratch buffer active
(kmn/show-buffer-scratch) (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 ; show dired at `~` in left side window
(kmn/dired-directory-on-left dir_path) (kmn/dired-default-directory-on-left)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; emacs config development
(defun kmn/workspace-code-emacs-config()
(interactive)
(kmn/workspace-code-empty "~/.emacs.d.profiles")
(find-file "~/.emacs.d.profiles/org/init.el")
(find-file "~/.emacs.d.profiles/code/init.el")
(find-file "~/.emacs.d.profiles/common/_global.el")
(find-file "~/.emacs.d.profiles/common/generic_functions.el")
(find-file "~/.emacs.d.profiles/common/workspaces.el")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; hugo development
(defun kmn/workspace-code-generic()
(interactive)
(kmn/workspace-code-empty "~/src")
) )