Open bryanrinders opened 3 months ago
From: bryanrinders @.***> Date: Sun, 16 Jun 2024 09:12:03 -0700
[... 54 lines elided]
The problem then is when trying to update the
denote-files
dblock in the parent file. It will not properly remove all the old contents before inserting the new contents.The issue is with the function
org-prepare-dblock
. To remove the contents of the dblock it will simply search for the first#+end
, starting the search at the#+begin denote-files
, and delete everything in between. However the first#+end
in this example is not end of the correct dblock and hence not the entire contents of thedenote-files
dblock is deleted
I am not sure there is something we can do about it in Denote. We would have to refactor the relevant parts in Org, though this sort of work is not trivial.
If there is a solution to this, I am happy to have it in Denote.
-- Protesilaos Stavrou https://protesilaos.com
Actually, can you try the key binding C-c C-x C-u
? It seems to work on my end.
Actually, can you try the key binding
C-c C-x C-u
? It seems to work on my end.
I tried this and I still end up with linked file
twice in the dblock. I am not sure how this works for you. And just to be clear this also happens when not loading my init file, with emacs -q
.
I think that key worked on my end. At any rate, this is an Org issue. We will need to check if there is a workaround for it. Perhaps if the outer BEGIN
and END
are given a unique identity?
Hi,
I think the issue is best explained with an example. Let say I have three files:
A normal file:
A file with a dynamic block with
denote-links
:and a file with a dynamic block
denote-files
The problem then is when trying to update the
denote-files
dblock in the parent file. It will not properly remove all the old contents before inserting the new contents.The issue is with the function
org-prepare-dblock
. To remove the contents of the dblock it will simply search for the first#+end
, starting the search at the#+begin denote-files
, and delete everything in between. However the first#+end
in this example is not end of the correct dblock and hence not the entire contents of thedenote-files
dblock is deleted