Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic block backlinks to this-heading-only doesn't work? #428

Open
novakwh opened this issue Sep 6, 2024 · 10 comments
Open

Dynamic block backlinks to this-heading-only doesn't work? #428

novakwh opened this issue Sep 6, 2024 · 10 comments

Comments

@novakwh
Copy link

novakwh commented Sep 6, 2024

Hello, when I include :this-heading-only t into the denote-org-extras-dblock-insert-backlinks section, it continues to list all backlinks, not only those notes with a link to the heading in which the block is located. Am I doing something wrong?

#+BEGIN: denote-backlinks :sort-by-component nil :reverse-sort nil :id-only nil :this-heading-only t

#+END:

I have confirmed that one note is linked correctly to the org-heading (using denote-org-extras-backlinks-for-heading) and none of the other notes are linked to anything but the note itself. But they all show up inside this block.

Thanks for your help!

@protesilaos
Copy link
Owner

Hello @novakwh! Can you please produce two files that exhibit the problem? I cannot reproduce it on my end.

Also, please make sure you are on the latest version of Denote.

@novakwh
Copy link
Author

novakwh commented Sep 11, 2024

Embarrassingly, this was totally my fault for not checking, and after updating the package everything works as expected. I will close and say thank you for this amazing package, which has been such a blessing and so useful in my life.

@novakwh novakwh closed this as completed Sep 11, 2024
@protesilaos
Copy link
Owner

protesilaos commented Sep 11, 2024 via email

@novakwh
Copy link
Author

novakwh commented Sep 13, 2024

Hello Prot, re-opening this just because there is something else weird going on with :this-heading-only and I hope you can help. Now, it works fine when I have :this-heading-only marked as t in the dynamic org block backlinks, except that the files listed within the block are no longer displayed in the renamed buffer format.

In other words, instead of displaying the file's title in friendly format from the #+title property (like "This Is a File Name"), the link is displayed in the Denote filename shorthand (like "this-is-a-file-name"). Remove :this-heading-only and you see "This Is a File Name" but put it back in and you see "this-is-a-file-name".

Any help appreciated!

@novakwh novakwh reopened this Sep 13, 2024
@protesilaos
Copy link
Owner

protesilaos commented Sep 16, 2024 via email

@protesilaos
Copy link
Owner

Screenshot of the file I just tested.

Screenshot_2024-09-16_10-26-13

@novakwh
Copy link
Author

novakwh commented Sep 16, 2024

Hi Prot,

Ok, this is really weird! When I create a sample file along the lines of your screenshot, it works fine. But in my actual journal file, it doesn't work. See both attached screenshots -- the first, a sample where everything works correctly no matter if this-heading-only is t or not; the second, taken from one of my journal notes where the backlinks don't display correctly when this-heading-only is t.

The only difference I can see between these two files is that the journal file was created by a Denote template (it is created with the command denote-journal-extras-new-or-existing-entry). I manually created the sample file as an exact duplicate of the journal file and everything works fine. But the file that is inserted as a journal template doesn't work.

working-backlinks
not-working-backlinks

@protesilaos
Copy link
Owner

Could this be related to issue 439 which is about how symblinks change the value of the title we get out of the file?

If you are using symlinks, then this would be the case. Otherwise, something else is going on.

@novakwh
Copy link
Author

novakwh commented Oct 1, 2024

Hi Prot, sorry for delay, I was away. I just tried to read through issue 439; it seems (and correct me if I'm wrong) that the issue there occurs when the notes folder is within a symbolic linked folder.

However, my notes folder is in a folder that is in my home folder, and there are no symbolic links in the path. Also, the title of the note file itself doesn't change; it shows up correctly "prettified" as a backlink in a denote file that is created manually, but shows up as the slug if the denote file is created with denote-journal-extras-new-or-existing-entry.

@protesilaos
Copy link
Owner

protesilaos commented Oct 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants