Open
Description
Hello,
I know that this has been discussed before, but it looks like org-ql
is not compatible with the org-modern
package. For some reason, org-agenda-custom-commands
using org-ql-block
doesn't have the right styling for TODO keywords, although the styling for the tags is correct.
I join here a screenshot of the problem and a reproducer.
(require 'package)
(require 'use-package)
;; Add MELPA for packages
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Make sure we install updated org from the repositories
(assq-delete-all 'org package--builtins)
(assq-delete-all 'org package--builtin-versions)
(use-package org-ql
:ensure t)
(use-package org
:custom
;; Tell Org where to find all my stuff
(org-directory "~/dev/org")
(org-agenda-files '("~/dev/todos/test.org"))
;; My main custom agenda view
(org-agenda-custom-commands
'(("c" "Primary agenda view"
(
(org-ql-block '(and
(todo "TODO")
(tags "inbox")))
(tags-todo "inbox"
((org-agenda-prefix-format " %?-12t% s")
(org-agenda-overriding-header "Inbox"))))))))
(use-package org-modern
;;:hook ((org-mode . org-modern-mode)
;; (org-agenda-finalize . org-modern-agenda))
:ensure t
:config
(global-org-modern-mode)
:custom
(org-modern-star 'replace)
;; Set manually to match leuven-theme
(org-modern-todo-faces
`(("TODO" :background "#DBEDFF" :foreground "#333333")
("NEXT" :background "#FFC8C8" :foreground "#333333")
("HOLD" :background "#F6FECD" :foreground "#333333")
("DONE" :background "#D5F1CF" :foreground "#333333"))))
```
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
JulienMalka commentedon Dec 4, 2024
Not knowing exactly who is in a better position to address this, I've opened a sister issue here minad/org-modern#245
alphapapa commentedon Dec 5, 2024
The issue is probably one of having the appropriate text property on the line. You can see in #455 where I recently removed text properties from the to-do keyword because it was sometimes picking up other properties from the buffer applied by other modes, which caused incorrect appearance in org-ql-view buffers. So basically, what needs to be done is:
C-u C-x =
on the lines in the agenda, comparing the ones that appear as desired and the ones that don't.org-ql-view--format-element
to set that property and value accordingly.It should be a relatively simple fix. If you have time to investigate step 1, that would help. My time to work on Emacs stuff lately has been limited.
minad commentedon Dec 5, 2024
The properties are
org-not-done-regexp
andorg-todo-regexp
. These regexps are used by the Org agenda. See https://github.com/minad/org-modern/blob/87df4997da28cb9335dc4f0224e9bcedb595e425/org-modern.el#L902-L903. Org-modern had an old bug, back then when it didn't use these properties. It tried to use some buffer local variables, but Ihor explained that this quite obviously cannot work if the agenda is aggregated from multiple files with different keywords.JulienMalka commentedon Dec 5, 2024
Yes I can confirm that those two properties are indeed not present with
org-ql
.