aaronbieber / dotfiles

The skeleton of my wonderful *NIX home folders and scripts.
309 stars 46 forks source link

Support for in-buffer tags? #9

Open rieje opened 6 years ago

rieje commented 6 years ago

I've been using your tag function that smartly manages tags. I was wondering if it's possible to add support to hide in-buffer tags. For example, I have specific tags I only want referenced in a particular file so I define it like #+TAGS: dogs but in other org files, dog is still an option for tagging because the tag function looks at the global tags completion table.

aaronbieber commented 6 years ago

There would be a way to exclude the current buffer's tags from the list (see air--org-select-tag, which merges org-get-buffer-tags with org-global-tags-completion-table), but I don't think it would be possible—or at the least, straightfoward—to get a list of tags that are defined in particular ways.

As far as I know, Org treats all tags essentially the same way when it comes to the global table(s). You would need to dig into how Org traverses the agenda files and parses the tags and build a way to skip the ones that are defined in "options" rather than used in headlines (or whatever you want).

Don't get me wrong, what you're asking for is possible, I just don't know how I would do it without more research, and I treat all tags essentially the same.