[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One vs many directories
From: |
Dr. Arne Babenhauserheide |
Subject: |
Re: One vs many directories |
Date: |
Tue, 24 Nov 2020 19:47:51 +0100 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
Jean Louis <bugs@gnu.support> writes:
> Some people maybe access multiple Org files through Agenda, me I
> don't. Some items are "non existent" and I do not know how to ask
> agenda to refresh itself.
Simply press the letter g.
For my own setup I run code in a hook to update the agenda whenever I
change a TODO state, clock in or clock out, but that has performance
problems when I do it while the Agenda is shown.
(defvar todo-modified-from-agenda nil "Indicates whether org-mode todo
state changes were triggered from the agenda. Check this to avoid trying to
propagate the change back into the agenda")
;; continuously update agenda view, from
http://thomasf.github.io/solarized-css/test/org-hacks.html
(defun kiwon/org-agenda-redo-in-other-window ()
"Call org-agenda-redo function even in the non-agenda buffer."
(interactive)
(when (not (and (boundp 'todo-modified-from-agenda)
todo-modified-from-agenda)) ; org-state non-nil means we’re coming from the
org-after-todo-state-change-hook, which would throw when changing todo states
from agenda due to a circular action
(let ((agenda-window (get-buffer-window (or (and (boundp
'org-agenda-buffer-name) org-agenda-buffer-name) "plan.org") t)))
(when agenda-window
(with-selected-window agenda-window
(org-agenda-redo))))))
;; advice agenda todo to avoid redo, thanks to
http://nullprogram.com/blog/2013/01/22/
(defadvice org-agenda-todo (before org-agenda-disable-redo activate)
(setq todo-modified-from-agenda t))
(defadvice org-agenda-todo (after org-agenda-enable-redo activate)
(setq todo-modified-from-agenda nil))
(add-hook 'org-clock-in-hook 'kiwon/org-agenda-redo-in-other-window)
(add-hook 'org-clock-out-hook 'kiwon/org-agenda-redo-in-other-window)
(add-hook 'org-after-todo-state-change-hook
'kiwon/org-agenda-redo-in-other-window)
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
signature.asc
Description: PGP signature
- Re: One vs many directories, (continued)
- org-sbe to automate some source block executions, Jean Louis, 2020/11/25
- Re: org-sbe to automate some source block executions, Ihor Radchenko, 2020/11/25
- Re: org-sbe to automate some source block executions, Jean Louis, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/25
- Re: One vs many directories, Eric S Fraga, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/25
- Re: One vs many directories, Ihor Radchenko, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/25
- Re: One vs many directories,
Dr. Arne Babenhauserheide <=
- Re: One vs many directories, Jean Louis, 2020/11/24
- Re: One vs many directories, Dr. Arne Babenhauserheide, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/25
- Re: One vs many directories, Ihor Radchenko, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/26
- Re: One vs many directories, Ihor Radchenko, 2020/11/26
- Re: One vs many directories, Ihor Radchenko, 2020/11/25
- Re: One vs many directories, Ihor Radchenko, 2020/11/25
- Re: One vs many directories, Jean Louis, 2020/11/26
- Re: One vs many directories, Ihor Radchenko, 2020/11/29