alphapapa / org-ql

A searching tool for Org-mode, including custom query languages, commands, saved searches and agenda-like views, etc.
GNU General Public License v3.0
1.35k stars 104 forks source link

Unexpected output when org-ql-completing-read-reverse-paths is nil #341

Open akirak opened 1 year ago

akirak commented 1 year ago

Hello,

After the change at 4c1a4b169f54d37ce541902c0ae5043759ef9d9b, org-ql-completing-read always appends the outline path to the headline, even if org-ql-completing-read-reverse-paths is set to nil.

For example, if you have a headline at level 3 and org-ql-completing-read-reverse-paths is nil, the formatted candidate will be

Level 3 / Level 1 / Level 2

and if you have four levels, it will be

Level 4 / Level 1 / Level 2 / Level 3

The expected output here is

Level 1 / Level 2 / Level 3 / Level 4

and org-ql-completing-read behaved like this before.

alphapapa commented 1 year ago

Hi Akira,

The issue is that in that commit the code was changed to use affixation to show the paths rather than returning the path as the candidate itself. I should probably test it more thoroughly sometime, but I already spent too many hours trying to get the completion working correctly with plain Emacs and Vertico, and it still isn't completely bug-free. It's surprisingly difficult to understand. Anyway, I'll add it to the list. Thanks for reporting.

akirak commented 1 year ago

Yes, I know it's complex. Thank you for making this package. It is already good enough to me, and I will stick with the latest stable version for now.

I wish I could help you with your packages. If you open an account at GitHub Sponsors / Patreon Open Collective / etc., I will make a donation to you. I think some others probably will. That amount may not be sufficient, but there should be a way for people to reward you.

alphapapa commented 9 months ago

Changing this will require some consideration and maybe minor refactoring, so I'm going to defer this until v0.8.

akirak commented 9 months ago

Fine to me, thanks.

alphapapa commented 6 months ago

Well, let's defer that refactoring to 0.9. :) Thanks for your patience.