Hey everyone! I’ve built a new plugin: comefrom.kak.
comefrom.kak is a minimal filetype-agnostic note-linking system that leverages Kakoune and xattr(7). Mix and match any filetypes you want for your notes and reference your notes from anywhere!
This looks pretty cool, as way to have documentation links that work across filetypes in the editor.
Using xattr is pretty cool, but as you note not every filesystem supports them. Would it be possible to build the same kind of UI on top of a directory full of symlinks? For example, if I set $LINKFARM to the directory where I want to keep my links, then:
“add a keyword that points to the current buffer” is ln -s "$kak_buffile" "$LINKFARM/$keyword"
“list available keywords” is ls "$LINKFARM"
“look up the file associated with a keyword” is readlink "$LINKFARM/$keyword"
“retarget a keyword at a new file” is ln -sfn "$kak_buffile" "$LINKFARM/$keyword"
“remove a keyword” is rm "$LINKFARM/$keyword"
It does mean the keyword→file connection is less self-contained, but I think it also makes it easier to diagnose and investigate, and back up with ordinary tools.
Is there some other reason that makes xattr a better solution?
Thanks! I explored symbolic links, but disliked that when you rename a file, the symlink doesn’t follow. So you could create a hard link instead, which could be fine since the idea is to point to documentation.