feature/popup: tweak org rules + add org-capture rule
This commit is contained in:
parent
7ca2e1593e
commit
395af731d9
1 changed files with 5 additions and 5 deletions
|
@ -145,11 +145,12 @@ the command buffer."
|
||||||
|
|
||||||
;; `org'
|
;; `org'
|
||||||
(after! org
|
(after! org
|
||||||
(set! :popup "^\\*Org \\(?:Links\\|Export Dispatcher\\|Select\\)"
|
(set! :popup "^\\*\\(?:Agenda Com\\|Org \\(?:Links\\|Export Dispatcher\\|Select\\)\\)"
|
||||||
'((slot . -1) (size . +popup-shrink-to-fit))
|
'((slot . -1) (size . +popup-shrink-to-fit))
|
||||||
'((select)))
|
'((transient)))
|
||||||
(set! :popup "^\\*Org Agenda" '((slot . -1) (size . 20)))
|
(set! :popup "^\\*Org Agenda" '((size . 20)) '((select . t) (transient)))
|
||||||
(set! :popup "^\\*Org Src" '((size . 0.3)) '((quit) (select . t)))
|
(set! :popup "^\\*Org Src" '((size . 0.3)) '((quit) (select . t)))
|
||||||
|
(set! :popup "^CAPTURE.*\\.org$" '((size . 0.2)) '((quit) (select . t)))
|
||||||
|
|
||||||
;; Org has a scorched-earth window management system I'm not fond of. i.e. it
|
;; Org has a scorched-earth window management system I'm not fond of. i.e. it
|
||||||
;; kills all windows and monopolizes the frame. No thanks. We can do better
|
;; kills all windows and monopolizes the frame. No thanks. We can do better
|
||||||
|
@ -164,7 +165,7 @@ the command buffer."
|
||||||
(advice-add #'org-capture-place-template :around #'+popup*suppress-delete-other-windows)
|
(advice-add #'org-capture-place-template :around #'+popup*suppress-delete-other-windows)
|
||||||
(advice-add #'org-export--dispatch-ui :around #'+popup*suppress-delete-other-windows)
|
(advice-add #'org-export--dispatch-ui :around #'+popup*suppress-delete-other-windows)
|
||||||
|
|
||||||
(defun +popup*org-src-pop-to-buffer (orig-fn buffer _context)
|
(defun +popup*org-src-pop-to-buffer (orig-fn buffer context)
|
||||||
"Hand off the src-block window to the popup system by using `display-buffer'
|
"Hand off the src-block window to the popup system by using `display-buffer'
|
||||||
instead of switch-to-buffer-*."
|
instead of switch-to-buffer-*."
|
||||||
(if +popup-mode
|
(if +popup-mode
|
||||||
|
@ -189,7 +190,6 @@ instead of switch-to-buffer-*."
|
||||||
;; `org-agenda'
|
;; `org-agenda'
|
||||||
(setq org-agenda-window-setup 'other-window
|
(setq org-agenda-window-setup 'other-window
|
||||||
org-agenda-restore-windows-after-quit nil)
|
org-agenda-restore-windows-after-quit nil)
|
||||||
(add-hook 'org-agenda-finalize-hook #'org-fit-window-to-buffer)
|
|
||||||
;; Don't monopolize frame!
|
;; Don't monopolize frame!
|
||||||
(advice-add #'org-agenda :around #'+popup*suppress-delete-other-windows))
|
(advice-add #'org-agenda :around #'+popup*suppress-delete-other-windows))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue