From: Drew Adams <drew.adams@oracle.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: RE: Temporary notes in Emacs buffers?
Date: Tue, 31 Dec 2019 22:25:37 -0800 (PST) [thread overview]
Message-ID: <73dc0d0e-f208-4169-a70d-f2f17994a4f4@default> (raw)
In-Reply-To: <87a777ydnh.fsf@web.de>
> > Bookmarks are pretty flexible. You can use
> > them in lots of different ways.
>
> Yeah - probably. What I dislike I think: if I move a file to a
> different location, the relation to the notes is lost, and I have to
> manually relocate the file. That might be annoying. That's why my
> favorite approach would be to save the data in the file itself or at
> least in its directory instead of a central place. Or is there a
> solution for that problem using bookmarks, too?
If you move the destination of a bookmark (the
file or the positions in it) then, when you try
to jump to it:
* If the file is available, but the contexts for
the recorded positions within it can't be
found, then an attempt is made to relocate -
searching for the recorded contexts (text
before & after the positions.
If that's not successful, because the file has
changed too much, then you're prompted to
relocate the positions.
* If the general location (e.g. file) has moved,
then you're prompted to relocate it.
You can also manually relocate a bookmark's
target any time, of course.
But normally, if the file has not moved, when
you jump to a bookmark the target positions are
automatically updated (well, it's optional):
The recorded positions are used as a starting
point, and then the recorded contexts are found.
If those have moved then the new location is
recorded.
---
There are advantages to saving annotations (e.g.
bookmarks) in a separate file from their targets.
And there are advantages of saving them in the
same file.
An annotation is a kind of metadata - a note
about the file content or a location. There
are pros and cons for storing metadata and data
together. This isn't special to file annotations.
---
You can have any number of bookmark files, and
they can be stored anywhere. You can, as you
mention, store a file of bookmarks in the same
directory as the file or files that they target.
So you can, if you like, easily move both at
the same time, e.g. to another directory.
However, yes, the target file names recorded in
the bookmarks are absolute names. So you would
want to define a command that not only moves the
bookmark file and its targeted files, together,
to the same new directory, but also updates the
recorded file names in the bookmarks, to reflect
the new target directory. That wouldn't be hard.
You can also have bookmark lists composed of
bookmark lists. And mappings between bookmark
files and bookmark lists need not be 1:1. You
can have a bookmark file for a book you're
writing, and bookmark lists for each of its
chapters. Or separate bookmark files for the
chapters.
And you can bookmark a bookmark list, e.g.,
switch to a different chapter just by jumping
to a bookmark-list bookmark.
The only requirement is that a bookmark file
be separate from the files targeted by its
bookmarks. Why? Because, like a directory,
a bookmark file is a list of a bunch of files
and their metadata.
next prev parent reply other threads:[~2020-01-01 6:25 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-27 10:19 Temporary notes in Emacs buffers? Marcin Borkowski
2019-12-27 10:43 ` Mpho Jele
2019-12-27 11:51 ` tomas
2020-01-01 21:48 ` Marcin Borkowski
2019-12-27 15:54 ` Drew Adams
2020-01-02 17:49 ` Marcin Borkowski
2020-01-05 2:37 ` Michael Heerdegen
2020-01-05 17:54 ` Drew Adams
2020-01-06 5:18 ` Jean-Christophe Helary
2020-01-06 15:12 ` Drew Adams
2020-01-09 1:03 ` Michael Heerdegen
2020-01-09 23:35 ` arthur miller
2020-01-10 4:58 ` Michael Heerdegen
2020-01-10 9:30 ` Robert Pluim
2020-01-10 10:01 ` Michael Heerdegen
2020-01-10 17:04 ` Drew Adams
2020-01-10 9:10 ` Unknown
2019-12-27 17:48 ` Sharon Kimble
2020-01-01 1:42 ` Michael Heerdegen
2020-01-01 4:45 ` Drew Adams
2020-01-01 5:00 ` Michael Heerdegen
2020-01-01 6:25 ` Drew Adams [this message]
2020-01-01 20:34 ` John Yates
2020-01-01 21:19 ` Drew Adams
2020-01-01 21:47 ` Marcin Borkowski
2020-01-02 1:25 ` Michael Heerdegen
2020-01-02 3:16 ` Drew Adams
2020-01-02 3:45 ` Michael Heerdegen
2020-01-02 5:30 ` Drew Adams
2020-01-02 15:41 ` Drew Adams
2020-01-03 1:07 ` Michael Heerdegen
2020-01-03 3:35 ` John Yates
2020-01-03 6:38 ` Drew Adams
2020-01-03 7:06 ` Drew Adams
2020-01-04 6:39 ` Michael Heerdegen
2020-01-04 16:04 ` Drew Adams
2020-01-06 14:18 ` John Yates
2020-01-06 14:34 ` tomas
2020-01-06 15:19 ` John Yates
2020-01-06 15:31 ` tomas
2020-01-06 16:28 ` arthur miller
2020-01-03 7:00 ` Drew Adams
2020-01-03 13:31 ` arthur miller
2020-01-05 2:18 ` Michael Heerdegen
2020-01-11 7:36 ` Michael Heerdegen
2020-01-11 10:00 ` Jean-Christophe Helary
2020-01-11 11:38 ` Michael Heerdegen
2020-01-11 16:00 ` Drew Adams
2020-01-11 23:46 ` John Yates
2020-01-12 2:47 ` Drew Adams
2020-01-12 7:31 ` Michael Heerdegen
2020-01-12 16:37 ` Drew Adams
2020-01-14 7:08 ` Michael Heerdegen
2020-01-14 17:32 ` Drew Adams
2020-01-15 23:10 ` Drew Adams
2020-01-02 17:48 ` Marcin Borkowski
2020-01-02 17:48 ` Marcin Borkowski
2020-01-09 3:57 ` Michael Heerdegen
2020-01-15 18:43 ` Marcin Borkowski
2020-01-20 12:40 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73dc0d0e-f208-4169-a70d-f2f17994a4f4@default \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).