Aaron Zeng <[email protected]> writes:

Consider the following simple org file:

* TODO keep this :keep: * TODO drop this :drop:

After M-x org-todo-list, press "\ - drop RET" to filter out the "drop" tag. Now, pressing N multiple times results in an error on the last invocation and moves point to the end of the line. The expected behavior is to keep point on the last agenda item and not error.

From the debugger, I found that goto-char was being called with a nil argument because next-single-property-change returned nil and its results was passed directly to goto-char. Perhaps it just needs a check like org-agenda-previous-item has.

Confirmed.

When we filter items out of the agenda, they are actually still there. We just make them invisible by adding the text property "invisible".

This bug actually also exist with `org-agenda-previous-item'. When there is an invisible item as the first item then `org-agenda-previous-item' can move to the previous line when it should stay on the item!

The issue is that the code looks for the next (or previous) occurrence of the text-property 'org-marker' but doesn't consider if that occurrence is actually visible or not.

If you'd like to try making a patch that would be huge help: https://orgmode.org/worg/org-contribute.html

Otherwise, it'll get fixed when a developer has some free time.

Thank you for bringing this to our attention! Reports like this help make Org better :)

Reply via email to