From: Tim Ruffing <crypto@timruffing.de>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Don't reset `org-todo-keywords-for-agenda' when org-agenda-multi
Date: Fri, 10 Mar 2023 13:08:35 +0100 [thread overview]
Message-ID: <efda9a8bfd65fe74915885ffe02bfae1da5f7bca.camel@timruffing.de> (raw)
In-Reply-To: <871qlwzv2k.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Attached with TINYCHECK.
Unfortunately I don't have the time to write a test right now because
I'll be traveling from tomorrow on. (You'd to wait for at least 6
weeks..)
Here's a sketch for a test case:
* Show an agenda with that has org-agenda-multi
* In the agenda buffer, assert that org-todo-keywords-for-agenda and
(org-done-keywords-for-agenda) are not nil.
Best,
Tim
On Fri, 2023-03-10 at 11:48 +0000, Ihor Radchenko wrote:
> Tim Ruffing <crypto@timruffing.de> writes:
>
> > * org-agenda.el (org-prepare-agenda): Don't reset
> > `org-todo-keywords-for-agenda' when org-agenda-multi.
> >
> > Fixes a bug with TODO keywords that came to light in org-modern,
> > see https://github.com/minad/org-modern/issues/26.
> >
> > This is very similar to cd2d138883a55cad48394a3f473da8b973a99a5e,
> > which fixed the same for `org-done-keywords-for-agenda` (to fix
> > a similar styling issue).
>
> Thanks for the patch!
> Unfortunately, it does not apply.
> Could you re-send the patch as attachment?
>
> In addition, may you add TINYCHANGE cookie to the commit message if
> you
> don't have FSF assignment done (see
> https://orgmode.org/worg/org-contribute.html#first-patch)? And, if
> you
> can, write a test.
>
[-- Attachment #2: 0001-Don-t-reset-org-todo-keywords-for-agenda-when-org-ag.patch --]
[-- Type: text/x-patch, Size: 1651 bytes --]
From ec83e58d54345696b80d559145e480c2af07db6c Mon Sep 17 00:00:00 2001
From: Tim Ruffing <crypto@timruffing.de>
Date: Thu, 9 Mar 2023 13:38:28 +0100
Subject: [PATCH] Don't reset `org-todo-keywords-for-agenda' when
org-agenda-multi
* org-agenda.el (org-prepare-agenda): Don't reset
`org-todo-keywords-for-agenda' when org-agenda-multi.
Fixes a bug with TODO keywords that came to light in org-modern,
see https://github.com/minad/org-modern/issues/26.
This is very similar to cd2d138883a55cad48394a3f473da8b973a99a5e,
which fixed the same for `org-done-keywords-for-agenda` (to fix
a similar styling issue).
TINYCHANGE
---
lisp/org-agenda.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 7e54121dc..8e3cc693a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3956,7 +3956,6 @@ FILTER-ALIST is an alist of filters we need to apply when
(message "Sticky Agenda buffer, use `r' to refresh")
(or org-agenda-multi (org-agenda-fit-window-to-buffer))
(throw 'exit "Sticky Agenda buffer, use `r' to refresh"))
- (setq org-todo-keywords-for-agenda nil)
(if org-agenda-multi
(progn
(setq buffer-read-only nil)
@@ -3969,6 +3968,7 @@ FILTER-ALIST is an alist of filters we need to apply when
(make-string (window-max-chars-per-line) org-agenda-block-separator))
"\n"))
(narrow-to-region (point) (point-max)))
+ (setq org-todo-keywords-for-agenda nil)
(setq org-done-keywords-for-agenda nil)
;; Setting any org variables that are in org-agenda-local-vars
;; list need to be done after the prepare call
--
2.39.2
next prev parent reply other threads:[~2023-03-10 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 12:46 [PATCH] Don't reset `org-todo-keywords-for-agenda' when org-agenda-multi Tim Ruffing
2023-03-10 11:48 ` Ihor Radchenko
2023-03-10 12:08 ` Tim Ruffing [this message]
2023-03-10 12:32 ` Max Nikulin
2023-03-10 14:16 ` Tim Ruffing
2023-03-11 10:22 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=efda9a8bfd65fe74915885ffe02bfae1da5f7bca.camel@timruffing.de \
--to=crypto@timruffing.de \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.