brunoarine / org-similarity

Emacs package that helps org-mode users (re)discover similar documents
GNU General Public License v3.0
88 stars 12 forks source link

Two configurable variables were ignored #34

Closed bramadams closed 9 months ago

bramadams commented 10 months ago

Variables org-similarity-prefix' andorg-similarity-heading' were shadowed by local variables. Removed those declarations.

brunoarine commented 9 months ago

Hello @bramadams, and thank you for the PR. These variables are intentionally overridden when showing results in the side buffer. I didn't want the customization in my org notes "related" section to be reflected in the side buffer, which is really just a temporary buffer for quick checks.

But since you saw need to customize it, I believe others may have the same need. Therefore I suggest creating two global variables (org-similarity-heading-sidebuffer and org-similarity-prefix-sidebuffer), initially set to to tackle this.

bramadams commented 9 months ago

Please replace these lines with the following code:

(let* ((org-similarity-heading org-similarity-heading-sidebuffer)
         (org-similarity-prefix org-similarity-prefix-sidebuffer)

And then define these two new variables in the beginning of the file with the hard-coded values "Similarity results\n" and "" respectively, so we avoid breaking others' workflow.

Thanks for the suggestion, I incorporated it in this new commit.

bramadams commented 9 months ago

Great, thanks!