From: Tomas Zellerin <tomas@zellerin.cz>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Org agenda misbehaves in a side window [9.5 (9.5-g0a86ad @ /home/zellerin/.emacs.d/elpa/org-9.5/)]
Date: Fri, 06 Jan 2023 19:48:57 +0100 [thread overview]
Message-ID: <87cz7rsdly.fsf@zellerin.cz> (raw)
In-Reply-To: <87fscniuhf.fsf@localhost> (Ihor Radchenko's message of "Fri, 06 Jan 2023 14:54:36 +0000")
Ihor Radchenko <yantar92@posteo.net> writes:
>> The reason seems that org-agenda-get-restriction-and-command calls
>> delete-other-window; however, this is not something user observes and
>> expects as effect of those commands.
>
> Sure, but what can we do in order to both fix this and also not break
> the existing behaviour?
The simplest solution seems to bind (ignore-window-parameters t) inside
the save-window-excursion in `org-agenda-get-restriction-and-command`,
see below. But I do not know what all can be broken, or whether
something cleaner is possible.
Best regards,
Tomas
--- /tmp/org-agenda.orig 2023-01-06 19:43:03.528884719 +0100
+++ /tmp/org-agenda.el 2023-01-06 19:41:23.493330904 +0100
@@ -3112,13 +3112,14 @@
c entry key type match prefixes rmheader header-end custom1 desc
line lines left right n n1)
(save-window-excursion
- (delete-other-windows)
- (org-switch-to-buffer-other-window " *Agenda Commands*")
- (erase-buffer)
- (insert (eval-when-compile
- (let ((header
- (copy-sequence
- "Press key for an agenda command:
+ (let ((ignore-window-parameters t))
+ (delete-other-windows)
+ (org-switch-to-buffer-other-window " *Agenda Commands*")
+ (erase-buffer)
+ (insert (eval-when-compile
+ (let ((header
+ (copy-sequence
+ "Press key for an agenda command:
-------------------------------- < Buffer, subtree/region restriction
a Agenda for current week or day > Remove restriction
t List of all TODO entries e Export agenda views
@@ -3128,14 +3129,14 @@
? Find :FLAGGED: entries C Configure custom agenda commands
* Toggle sticky agenda views # List stuck projects (!=configure)
"))
- (start 0))
- (while (string-match
- "\\(^\\| \\|(\\)\\(\\S-\\)\\( \\|=\\)"
- header start)
- (setq start (match-end 0))
- (add-text-properties (match-beginning 2) (match-end 2)
- '(face bold) header))
- header)))
+ (start 0))
+ (while (string-match
+ "\\(^\\| \\|(\\)\\(\\S-\\)\\( \\|=\\)"
+ header start)
+ (setq start (match-end 0))
+ (add-text-properties (match-beginning 2) (match-end 2)
+ '(face bold) header))
+ header))))
(setq header-end (point-marker))
(while t
(setq custom1 custom)
next prev parent reply other threads:[~2023-01-06 18:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 13:42 [BUG] Org agenda misbehaves in a side window [9.5 (9.5-g0a86ad @ /home/zellerin/.emacs.d/elpa/org-9.5/)] Tomas Zellerin
2023-01-06 14:54 ` Ihor Radchenko
2023-01-06 18:48 ` Tomas Zellerin [this message]
2023-01-07 20:11 ` Jean Louis
2024-04-07 10:41 ` Ihor Radchenko
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=87cz7rsdly.fsf@zellerin.cz \
--to=tomas@zellerin.cz \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@posteo.net \
/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).