[REQUEST] Rename notes from plug-ins
It currently seems like it's not possible to re-name an existing note, do I have that right?
If I were to try to take an identifier and then make a note with that identifier (with anything after that), it seems like The Archive will increment the ID, creating a new note.
If I'm wrong, can someone point me in the right direction to do this?
Post edited by ctietze on
Howdy, Stranger!
Comments
I think you are correct that a new note with its own identifier will be created. The way I address that is by linking [[ ]] the prior note within the new note. This creates a chain of notes, even if there have been unrelated intervening notes. And I give each note a descriptive header that can give an additional connection between related notes. I apologize if this does not address the issue you are raising.
I appreciate you chiming in here, I'm glad it's not just me!
In my case, your solution wouldn't work. I was trying to make a plugin that I could use for a note when I notice that I never gave it the [ID] [Name].md format that I tend to use. If I'm rushing or creating a lot of notes or get distracted, sometimes I'll end up with just [ID].md.
Not terrible, because I can search, link, etc... but I wanted to make a plugin I'd bind to a hotkey that would just grab the first H1 header and make that the [Name] component of the file name.
You are right. We can not rename or delete any files, but that may change in the future. You can modify the de.zettelkasten.extract_note.thearchiveplugin by highlighting the whole note with the incomplete filename. (⌘A) The plugin prompts you for a new name, and you can quickly recreate the note with a correctly formatted name. Manually delete the old.
The timestamp would be off, but maybe that doesn't matter.
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
kestrelcreek.com
Renaming isn't possible at the moment, only creation.
Here's some background:
Because if you create too much, the worst thing that happens is you need to clean up after yourself. But accidentally renaming all notes with the same filename can effectively remove all notes via overwriting.
Trashing files can be undone from the file system. Renaming can't.
The Archive would need to have a robust bulk renaming undo support, restoring contents it knows were there before. The inverse of "Rename
A
toB
" isn't "RenameB
toA
": if you overwrite an existing note, you still end up with 1 note less. The inverse is "RestoreA
and restoreB
to their prior state". Then do this for every rename operation, of which there could be many in a plug-in, to support undoing renaming many notes to the same file in sequence (A→Z, B→Z, C→Z, D→Z etc.)Possible but takes time to write
So this is shelved for an upcoming feature update with a higher danger level in plug-ins.
Author at Zettelkasten.de • https://christiantietze.de/
Thanks @ctietze , I had figured it was for safety reasons, I appreciate the explanation.
When I'm back I may still make a version of this that does the "rename", updates links, and then tags the old one in such a way that I could review them and remove them ¯_(ツ)_/¯