Skip to content

Make denote-region delete the text in source note and leave a link to the target file #649

@siainbuletin

Description

@siainbuletin

Hi Prot,

As kind of a counterpart to denote-org #16 that I just opened, I was thinking about an enhancement for the denote-region command. I think it should have an option to also remove the text from the source file after it has been moved to the target file.

Besides often merging notes, I also split content apart from one note to other more "atomic" notes. The denote-region command currently functions like copying and pasting. Perhaps the other option would be something like denote-region-cut (or something more aptly titled), which would remove the text from the source file. As a bonus, it would be nice if it could leave a denote link to the target file in the source file. It's kind of the inverse of my-denote-region-get-source-reference. Instead of adding a link to the source from which denote-region was called, leave a link in the source file.

Perhaps to make my request easier to understand.

File A:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices, 
erat ut condimentum ultricies, dui dolor facilisis odio, ut efficitur purus 
turpis pellentesque dolor. [[[Quisque aliquet elit placerat sapien accumsan, 
sed fringilla ex fermentum. Nam enim odio, iaculis at nisl eu, tempus lobortis
justo. Aenean sit amet fermentum ex, nec finibus eros. Curabitur id mattis libero.]]]

The text in the [[[square brackets]]] is moved to File B, which after invoking the hypothetical denote-region-cut looks like this:

Quisque aliquet elit placerat sapien accumsan, sed fringilla ex fermentum. Nam
enim odio, iaculis at nisl eu, tempus lobortis justo. Aenean sit amet fermentum
ex, nec finibus eros. Curabitur id mattis libero.

And File A now looks like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices, erat
ut condimentum ultricies, dui dolor facilisis odio, ut efficitur purus turpis
pellentesque dolor. [[denote:20251119T133849][File B]]

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions