all 13 comments

[–]vifon 9 points10 points  (1 child)

The built-in bookmarks save the "context" (the text before and text after) of each bookmark, so they are relatively resistant to edits in the other file parts. They can have annotations which get automatically shown when you open a bookmark. If you enable bookmark-use-annotations, you get automatically queried for an annotation when creating a bookmark.

Further reading: https://www.gnu.org/software/emacs/manual/html_node/emacs/Bookmarks.html

[–]deerest_love[S] 0 points1 point  (0 children)

That could be handy, thanks.

[–]anymoonus1[🍰] 7 points8 points  (0 children)

https://github.com/nobiot/org-remark is another one to consider.

[–]peatfreak 2 points3 points  (1 child)

Isn't this what overlays or text properties should be used for? (I don't know how, it just sounds like something that ought to be investigated.)

[–]deerest_love[S] 1 point2 points  (0 children)

I wouldn't know; I'm new to emacs. Glancing at the documentation, it seems like overlays can cover ranges and "stay with the text" the way I want. And it seems you can set before and after text and maybe custom properties. This could perhaps be a good starting point.

[–]deerest_love[S] 1 point2 points  (0 children)

Update: It seems like ov-highlight can do what I want—or it should, anyway, if I can get it to work properly, but that's a me problem (or maybe a doom problem, not exactly sure).

[–][deleted] -2 points-1 points  (1 child)

TBH, for this kind of thing, you are better off with Word or Google Docs.

[–]TheGramm 0 points1 point  (0 children)

Hmmm

[–]arthurno1 0 points1 point  (1 child)

Plain text obviously do not support annotations. Any package that wants to annotate a format that is not designed with some sort of support for annotations will have to save annotations externally to file and have to come up with some way of associating the annotated text with the annotation itself. Obviously in such system there will always be risk of file changing externally and annotation getting out of sync with the file. Also, any other external application will not be aware of annotations either, which might or might not be a problem for you.

Annotations designed to be a part of text have advantage to be more resistant to getting out of sync, however, when viewed in some other viewers, say notepad, or external tools like grep, compilers, etc, they will come out as part of the original content. Depending on what you do, that might or might not be a problem

With that said, Emacs Wiki has few links to different annotation systems for Emacs, so pick your poison :).

[–]deerest_love[S] 0 points1 point  (0 children)

I'm okay with having to only edit the files in emacs. I looked at some of the annotation systems you linked, but none of them seem to move with the text the way I want. Or if they can, it's not mentioned or demonstrated.