jxq0/org-tidy

general drawer is not hidden even if `org-tidy-general-drawer-flag` has been set

Closed this issue · 2 comments

This is the org buffer:

* a
:PROPERTIES:
:ID:       381d4b7d-d27c-475c-83df-d89f853bf991
:END:
[[id:3f5140fc-be77-4c70-b271-df1e7ae8aeab][b]]

* b
:PROPERTIES:
:ID:       3f5140fc-be77-4c70-b271-df1e7ae8aeab
:END:
:BACKLINKS:
[2023-09-10 Sun 15:44] <- [[id:381d4b7d-d27c-475c-83df-d89f853bf991][a]]
:END:

something

I've set:

(setq org-tidy-general-drawer-flag t)

image

I expected that BACKLINKS drawers would be hidden, but it doesn't.

I try to debug, there is no problem with org-tidy-should-tidy. In the org-tidy-properties-single, I add (message "begin: %s end: %s" ovly-beg ovly-end).

The output is:

begin: 4 end: 71
begin: 123 end: 190
begin: 190 end: 282

They overlap. So:

    (when (and should-tidy
               (not (org-tidy-overlay-exists ovly-beg ovly-end)))

(not (org-tidy-overlay-exists ovly-beg ovly-end)) is nil, that's the cause.

But I don't know how to fix it.

jxq0 commented

@Tokubara Thansk for your feedback. There are two consecutive drawers. I didn't consider this case. I'm trying to fix.

jxq0 commented

@Tokubara Fixed in #9.