[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Temporary notes in Emacs buffers?

From: Drew Adams
Subject: RE: Temporary notes in Emacs buffers?
Date: Thu, 2 Jan 2020 23:06:35 -0800 (PST)

[Sending my reply again, as the HTML reply
made no distinction (that I can see in my
email client) between what you wrote and
what I replied.] 

> This broaches the question of what is being annotated,
> the file as a container (e.g. inode) or its contents

If we're still talking about bookmarks, then
either one can be the target.  To get to the
content you first get to the container.  But
there's no requirement that you target any
of the content.  A bookmark can act in any
way you like on a file, as container, without
having anything to do with the content.
A bookmark's handler is just a function.

> 1. What happens when one moves the file?
> 2. What happens when one copies the file?
> 3. What if after the copy one deletes the original?
> My sense is that this thread is most concerned
> with use case number 1.
> An approach not yet mentioned is including some
> form of UUID as a file local variable.  In such
> a setting notes indirect through a persistent
> UUID-to-path map.  A file handler recognizes
> relevant operations on UUID annotated and
> updates the map.  This might also include
> updating the new copy's UUID to preserve
> uniqueness.

If Emacs gives you a way to get to a file
by an UUID that doesn't change when you
move the file, then you could use that in
a bookmark. That might, indeed, be a good
answer. I don't know that Emacs provides
such a way (how?). (You can get the inode
of a file, but can you find a file, given
its inode?)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]