add 'scratch on left' function ; enhance culinary org file to be dedicated workspace/new window setup
This commit is contained in:
parent
13c10fcd8c
commit
ef2e7efe5f
|
@ -96,7 +96,7 @@
|
||||||
(setq fit-window-to-buffer-horizontally t)
|
(setq fit-window-to-buffer-horizontally t)
|
||||||
(setq window-resize-pixelwise t)
|
(setq window-resize-pixelwise t)
|
||||||
|
|
||||||
"Display `default-directory' in side window on left, hiding details."
|
"Display `default-directory' in side window on right, hiding details."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((buffer (scratch 'text-mode)))
|
(let ((buffer (scratch 'text-mode)))
|
||||||
(display-buffer-in-side-window
|
(display-buffer-in-side-window
|
||||||
|
@ -107,6 +107,28 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; open text-mode scratch in left side window
|
||||||
|
(defun kmn/scratch-text-on-left ()
|
||||||
|
(defvar parameters
|
||||||
|
'(window-parameters . ((no-other-window . t)
|
||||||
|
(no-delete-other-windows . t))))
|
||||||
|
|
||||||
|
(setq fit-window-to-buffer-horizontally t)
|
||||||
|
(setq window-resize-pixelwise t)
|
||||||
|
|
||||||
|
"Display `default-directory' in side window on left, hiding details."
|
||||||
|
(interactive)
|
||||||
|
(let ((buffer (scratch 'text-mode)))
|
||||||
|
(display-buffer-in-side-window
|
||||||
|
buffer `((side . left) (slot . -1)
|
||||||
|
(window-width . fit-window-to-buffer)
|
||||||
|
, parameters)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; open text-mode scratch in right side window
|
; open text-mode scratch in right side window
|
||||||
(defun kmn/scratch-prompt-on-right ()
|
(defun kmn/scratch-prompt-on-right ()
|
||||||
|
|
|
@ -156,6 +156,23 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; org-mode workspace for culinary work that doesnt use the agenda
|
||||||
|
(when (not kmn/is-dayjob)
|
||||||
|
(defun kmn/workspace-org-culinary ()
|
||||||
|
(interactive)
|
||||||
|
(kmn/possibly-create-frame)
|
||||||
|
; start with fresh frame
|
||||||
|
(delete-other-windows)
|
||||||
|
; setup scratch on right
|
||||||
|
(kmn/scratch-text-on-left)
|
||||||
|
(goto-char 0)
|
||||||
|
; Open main files used as 'gateway' to everything else
|
||||||
|
(find-file "~/org/culinary/_culinary.org")
|
||||||
|
(goto-char 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; empty code workspace
|
; empty code workspace
|
||||||
(defun kmn/workspace-code-empty (&optional dir_path)
|
(defun kmn/workspace-code-empty (&optional dir_path)
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
(global-set-key (kbd "C-c d p")
|
(global-set-key (kbd "C-c d p")
|
||||||
(lambda () (interactive) (find-file "~/org/photography/_photography.org"))
|
(lambda () (interactive) (find-file "~/org/photography/_photography.org"))
|
||||||
)
|
)
|
||||||
(global-set-key (kbd "C-c d r")
|
(global-set-key (kbd "C-c d r") 'kmn/workspace-org-culinary)
|
||||||
(lambda () (interactive) (find-file "~/org/culinary/_culinary.org"))
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(when kmn/is-dayjob
|
(when kmn/is-dayjob
|
||||||
(global-set-key (kbd "C-c d t")
|
(global-set-key (kbd "C-c d t")
|
||||||
|
|
Reference in a new issue