Diary-style sexps interfere with unrelated queries
- 主要語言
- Emacs Lisp
- 星號
- 1.6k
- 分支
- 120
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### OS/platform
GNU/Linux
### Emacs version and provenance
30.2, Arch package manager
### Emacs command
emacsclient
### Org version and provenance
main @ 1328e518d, straight package manager
### org-ql package version and provenance
main @ 4b8330a, straight package manager
### Actions taken
When a task is scheduled using a diary-style expression, unrelated queries can throw errors in `org-time-string-to-absolute`. For example, this query works:
```org
* TODO Task
SCHEDULED: <2026-01-08 Thu>
[[org-ql-search:todo?super-groups=((:auto-todo))][org-ql-search: todo]]
```
but this one doesn’t:
```org
* TODO Task
SCHEDULED: <%%(diary-float t 3 2) 12:00-14:00>
[[org-ql-search:todo?super-groups=((:auto-todo))][org-ql-search: todo]]
```
### Observed results
The link in the first buffer works, but the link in the second fails with an error in in `org-time-string-to-absolute`.
### Expected results
The link should work in both buffers. I understand from [issue #262](https://github.com/alphapapa/org-ql/issues/262) that diary-style sexps are generally not supported (and [issue #343](https://github.com/alphapapa/org-ql/issues/343)), but their presence shouldn’t interfere with time-independent queries like `todo`.
### Backtrace
```elisp
Debugger entered--Lisp error: (error "Bad timestamp ‘<%%(diary-float t 3 2) 12:00-14:00>’\nError was: (Not an Org time string: <%%(diary-float t 3 2) 12:00-14:00>)")
error("Bad timestamp `%s'%s\nError was: %s" "<%%(diary-float t 3 2) 12:00-14:00>" "" ("Not an Org time string: <%%(diary-float t 3 2) 12:00-14:00>"))
org-time-string-to-absolute("<%%(diary-float t 3 2) 12:00-14:00>")
org-ql-view--add-scheduled-face((headline (:standard-properties [1 1 13 132 132 0 (:title) nil nil nil nil 60 130 1 # nil nil nil] :pre-blank 0 :raw-value "Task" :title (#("Task" 0 4 (:parent #1))) :level 1 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :footnote-section-p nil :archivedp nil :commentedp nil :org-marker # :org-hd-marker # :scheduled (timestamp (:standard-properties [24 nil nil nil 59 0 nil nil nil nil nil nil nil nil nil nil nil nil] :type diary :range-type timerange :raw-value "<%%(diary-float t 3 2) 12:00-14:00>" :year-start nil :month-start nil :day-start nil :hour-start 12 :minute-start 0 :year-end nil :month-end nil :day-end nil :hour-end 14 :minute-end 0 :diary-sexp "(diary-float t 3 2)")))))
org-ql-view--add-faces((headline (:standard-properties [1 1 13 132 132 0 (:title) nil nil nil nil 60 130 1 # nil nil nil] :pre-blank 0 :raw-value "Task" :title (#("Task" 0 4 (:parent #1))) :level 1 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :footnote-section-p nil :archivedp nil :commentedp nil :org-marker # :org-hd-marker # :scheduled (timestamp (:standard-properties [24 nil nil nil 59 0 nil nil nil nil nil nil nil nil nil nil nil nil] :type diary :range-type timerange :raw-value "<%%(diary-float t 3 2) 12:00-14:00>" :year-start nil :month-start nil :day-start nil :hour-start 12 :minute-start 0 :year-end nil :month-end nil :day-end nil :hour-end 14 :minute-end 0 :diary-sexp "(diary-float t 3 2)")))))
org-ql-view--format-element((headline (:standard-properties [1 1 13 132 132 0 (:title) nil nil nil nil 60 130 1 # nil nil nil] :pre-blank 0 :raw-value "Task" :title (#("Task" 0 4 (:parent #1))) :level 1 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :footnote-section-p nil :archivedp nil :commentedp nil :org-marker # :org-hd-marker # :scheduled (timestamp (:standard-properties [24 nil nil nil 59 0 nil nil nil nil nil nil nil nil nil nil nil nil] :type diary :range-type timerange :raw-value "<%%(diary-float t 3 2) 12:00-14:00>" :year-start nil :month-start nil :day-start nil :hour-start 12 :minute-start 0 :year-end nil :month-end nil :day-end nil :hour-end 14 :minute-end 0 :diary-sexp "(diary-float t 3 2)")))))
-map(org-ql-view--format-element ((headline (:standard-properties [1 1 13 132 132 0 (:title) nil nil nil nil 60 130 1 # nil nil nil] :pre-blank 0 :raw-value "Task" :title (#("Task" 0 4 (:parent #3))) :level 1 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :footnote-section-p nil :archivedp nil :commentedp nil :org-marker # :org-hd-marker # :scheduled (timestamp (:standard-properties [24 nil nil nil 59 0 nil nil nil nil nil nil nil nil nil nil nil nil] :type diary :range-type timerange :raw-value "<%%(diary-float t 3 2) 12:00-14:00>" :year-start nil :month-start nil :day-start nil :hour-start 12 :minute-start 0 :year-end nil :month-end nil :day-end nil :hour-end 14 :minute-end 0 :diary-sexp "(diary-float t 3 2)"))))))
org-ql-search(# "todo" :sort nil :super-groups ((:auto-todo)) :title nil)
org-ql-view--link-follow("todo?super-groups=((:auto-todo))" nil)
org-link-open((link (:standard-properties [60 nil 110 129 131 0 nil nil nil nil nil nil nil nil # nil nil (paragraph (:standard-properties [60 60 60 132 132 0 nil property-drawer element t nil nil nil nil # nil nil (section ...)]))] :type "org-ql-search" :type-explicit-p t :path "todo?super-groups=((:auto-todo))" :format bracket :raw-link "org-ql-search:todo?super-groups=((:auto-todo))" :application nil :search-option nil)) nil)
#(nil)
org--mouse-open-at-point(# nil)
apply(org--mouse-open-at-point # nil)
org-open-at-point(nil)
funcall-interactively(org-open-at-point nil)
command-execute(org-open-at-point)
```
### Etc.
_No response_
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。