emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Clocktable hides agenda buffer due to window manipulation in org-s


From: Tobias Kniep
Subject: [BUG] Clocktable hides agenda buffer due to window manipulation in org-string-width [9.6 (9.6-??-e9da29b6f @ /Users/tok/.emacs.d/.local/straight/build-28.1/org/)]
Date: Wed, 3 Aug 2022 18:57:28 +0200 (CEST)

Observation:
When activating clocktable mode in agenda view 
(e.g. by pressing "R"), the current window switches to a previous
buffer and thus hides the agenda. I can manually switch back to the
agenda buffer and the clocktable is displayed. However, any
redrawing of the agenda (e.g. when moving to another day) causes
this issue to repeat, making dealing with the clocktable in the
agenda quite cumbersome.

Analysis:
I'm not an Emacs hacker so please forgive my basis analysis. But I
think that I have tracked the issue down to the way
org-string-width uses a temporary buffer to determine text width.
The way I understand this is that the call to set-window-buffer 
switches the current window (while still showing the agenda
buffer) to the temp buffer for pixel measurement. After the
with-temp-buffer block ends, the temp buffer gets killed
and the window switches back to another buffer. However,
instead of switch to the agenda buffer (which was visible before)
it switches to the previous buffer (the one I had open when
calling the agenda).

The behaviour is new and I think it might be related to this 
change which was introduced recently:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/lisp/org-macs.el?id=d048c153dd67a118eaa21f04a7faef2800bba03a

Best
Tobias



reply via email to

[Prev in Thread] Current Thread [Next in Thread]