user15677
user15677

Reputation: 41

emacs package for working with tagged regions?

I'd like to be able to apply tags to regions of code and text and to be able to use these to narrow visibility to navigate - ideally across multiple files. So for example if I was researching C16th European history I could tag insert and and zoom around around cromwellish stuff quickly, limit my searches to cromwellish regions, etc. It's important that tags pairs shouldn't have to be "well-formed" because I might want to start an region inside of a but end first. And, obviously, I'd to be able to list all my tags, and to search or narrow on combinations of them.

I can't find anything like this. Org-mode comes closest, but its tags are headline based, which makes stopping one tag while continuing other painful - plus I need headlines as headlines, and I'd like to be able to tag code this way too.

Is there anything like this? Or any toolkit that would be a good start to write this?

Upvotes: 0

Views: 80

Answers (1)

Drew
Drew

Reputation: 30699

Library Bookmark+ provides what you are asking for, I think. It enhances standard Emacs bookmarking in several ways, including some that respond to your request.

You can bookmark locations of all sorts, and the recorded bookmark information can include the region limits/context. (If the region is active when you set the bookmark then the region info is recorded.)

When you jump to the bookmark, the region is re-activated (if the region was recorded). If the content of the destination file (or whatever) has been modified since the bookmark was last updated, so that the text around the recorded region has changed, the bookmark and region are automatically relocated (assuming that the new destination and limits are recognizable and thus locatable).

Bookmark+ also lets you tag any bookmark (or file), in multiple ways. Tags are arbitrary, free-form strings (but you can also optionally associate arbitrary Lisp values with them.)

And you can list all tags, search and narrow on tag combinations (unions, intersections, etc.). Tags are one of the most important Bookmark+ features.

Library Icicles provides additional enhancements regarding the use of Bookmark+ bookmarks and tags.

Upvotes: 1

Related Questions