alphapapa / alphapapa/org-ql

Issue with org-ql-search and narrowed org subtree

オープン
#135 コメント 9 件 リアクション 0 件 担当者 1 名 @alphapapa が担当を希望しています GitHub で見る
bug enhancement priority:A
主要言語
Emacs Lisp
スター
1.6k
フォーク
120
PR マージ指標
30日以内にマージされた PR はありません

説明

First of all: Thank you very much for this package (and `org-super-agenda`). They're great and a lot of effort seems to have gone into them.

I'm not sure if this behavior is expected or if I am understanding this package wrong.

### Context:

- Emacs: 27.0.91 (9.0)
- org-ql version: org-ql-20200713.309
- org-super-agenda version: org-super-agenda-20200310.1337

### Setup:

I did this in `emacs --execute '(setq user-emacs-directory "/tmp/emacs.d")' -Q`:

```emacs
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

(package-refresh-contents)
(package-install 'org-ql)

(setq org-directory "/tmp/org")
```

These are the contents of `/tmp/org/test.org`:

```org-mode
* Test 1 (Deadline today - Schedule 2 days ago)
SCHEDULED: <2020-08-07 Fri> DEADLINE: <2020-08-09 Sun>

* Test 2 (Deadline futute - Hidden) :hide:
DEADLINE: <2020-08-10 Mon>

* Test 3 (Deadline future - Not scheduled)
DEADLINE: <2020-08-10 Mon>
```

### Reproducing this issue:

1. Run:

```emacs
(org-ql-search '("/tmp/org/test.org")
'(not (tags-local "hide"))
:super-groups `((:name "Today"
:deadline today)))
```

You will see something like this (this is correct and expected):

2020_08_09_13-24-20

2. Go into `/tmp/org/test.org` and run `org-narrow-to-subtree` on any of the three subtrees. Then, re-run the `org-ql-search` run in step 1 above. You will see something like this:

2020_08_09_13-25-32

This seems both wrong (the "Today" group is gone) and somehow dependent on the narrowing.

### Stuff I've tried:

1. I've verified that `:narrow t` does the right thing (what it says it does). But, in this case: `:narrow` is nil and so it shouldn't matter.

2. I've verified that `:narrow` is being used properly. Running `org-ql-select` (like shown below) works fine, with or without narrowing. It returns the two items it should.

```emacs
(org-ql-select '("/tmp/test.org")
'(not (tags-local "hide"))
:action 'element-with-markers)
```

So, it looks like it's something around https://github.com/alphapapa/org-super-agenda/blob/dd0d104c269fab9ebe5af7009bc1dd2a3a8f3c12/org-super-agenda.el#L749 but I'm not sure. Can you help?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。