Compare commits
2 Commits
2407f4196f
...
aa0a7e9791
Author | SHA1 | Date |
---|---|---|
Daniel - | aa0a7e9791 | |
Daniel - | 712a314923 |
18
init.el
18
init.el
|
@ -897,7 +897,8 @@
|
|||
:bind (:map org-agenda-mode-map
|
||||
("i" . org-agenda-clock-in)
|
||||
("v" . hydra-org-agenda-view/body)
|
||||
([remap org-clock-goto] . db/org-clock-goto-first-open-checkbox))
|
||||
([remap org-clock-goto] . db/org-clock-goto-first-open-checkbox)
|
||||
([remap org-agenda-redo-all] . org-agenda-redo))
|
||||
:init (setq org-agenda-include-diary t
|
||||
org-agenda-span 1
|
||||
org-agenda-insert-diary-strategy 'top-level
|
||||
|
@ -1071,12 +1072,15 @@
|
|||
(add-hook 'org-agenda-finalize-hook #'db/org-agenda-insert-active-filters)
|
||||
(add-hook 'org-agenda-filter-hook #'org-agenda-redo-all)
|
||||
|
||||
(define-advice org-agenda-redo-all (:around (old-func &rest r) goto-top-and-execute)
|
||||
"Avoid recentering the Org agenda buffer after redo by moving
|
||||
point to the beginning of buffer first."
|
||||
(save-mark-and-excursion
|
||||
(goto-char (point-min))
|
||||
(apply old-func r)))))
|
||||
(define-advice org-agenda-redo (:around
|
||||
(actual-agenda-redo &rest r)
|
||||
inhibit-recentering)
|
||||
"Try to avoid recentering the window when redoing the Org agenda buffer."
|
||||
(let ((old-recenter (symbol-function 'recenter)))
|
||||
(fset 'recenter 'identity)
|
||||
(unwind-protect
|
||||
(apply actual-agenda-redo r)
|
||||
(fset 'recenter old-recenter))))))
|
||||
|
||||
;; Capturing
|
||||
|
||||
|
|
Loading…
Reference in New Issue