emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tobias Kniep <org_tk@kistbein.de>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
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)	[thread overview]
Message-ID: <553909075.107867.1659545848921@webmail.strato.de> (raw)

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	other threads:[~2022-08-03 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 16:57 Tobias Kniep [this message]
2022-08-03 22:28 ` [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/)] Ihor Radchenko
2022-08-04  4:51   ` Tobias Kniep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553909075.107867.1659545848921@webmail.strato.de \
    --to=org_tk@kistbein.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).