Skip to content

When multiple sorters are specified, something mutates the sorter list after first successful run #136

@natrys

Description

@natrys

Setup

Emacs: GNU Emacs 28.0.50
Org-mode: 9.3
org-ql: org-ql-20200713.309
org-super-agenda version: org-super-agenda-20200310.1337

Issue

Hello, I am really grateful for this package (and org-super-agenda) and it helped me a lot in the last ~2 years (as I can't really make sense of built-in agenda).

The issue I am facing is that when multiple sorters are specified (such as with :sort '(deadline priority date)), it works perfectly in the first run, but then org-ql-view-sort gets weirdly mutated (to just the first sorter it seems (e.g. '(deadline)).

This means subsequent refresh with r, g doesn't produce the same view again.

Reproduction

(setq my-sorting-functions '(deadline priority date))

(org-ql-search "~/empty.org"
  '(todo)
  :super-groups nil
  :sort my-sorting-functions)

(print my-sorting-functions) ;; ==> Now it is changed to '(deadline) so is `org-ql-view-sort` in the buffer

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions