-
Notifications
You must be signed in to change notification settings - Fork 15
Description
In this request the request is for more definition folders. And in this request they want definition notes only to apply to certain notes. I would like to morph the two together for a stream-lined solution.
Scenarios
Scenario 1: I'm working on a project, and all of the relevant information is in one subfolder: Obsidian notes, pdfs, spreadsheet, scans of receipts, etc... EXCEPT, that one file with definitions is in a completely unrelated area. This prevents me from easily zipping up my work and sending it to a colleague, or saving it away. I always need to take that extra step to find and copy in the definitions file.
Scenario 2: The project I'm working on is using the acronym SAFE. Therefore, I put in a definition for what SAFE stands for and what it means. But because definitions are global, every note that talks about being safe is going to have that definition. Similarly, for role-playing games, I have each spell as an atomic note. I would love to tag each of them so that when any other RPG note talks about those spells, I can quickly get the popup to explain about the spell. But one of the spells is named "light". That means every note that mentions how to fix a light, being light weight, or light a campfire, is going to reference that spell.
Scenario 3: Now, not only is the project I'm working using the acronym SAFE, but it's the acronym used in a dog training class I'm taking. Now I need to put multiple, unrelated definitions under the same heading.
Preposal
There is a single definition folder, and all definition notes within it are considered "global"; they work across an entire vault.
Additionally, definition file can exist anywhere in a vault and the plugin indexes the frontmatter looking for a specific property so the notes can be located next to the information that needs those definitions. The property acts as a filter on which notes to apply those definitions. There is already frontmatter, def-type, to say if the note is consolidated or atomic, this second property creates a whitelist of notes of which to apply the definitions. Let's call this new property def-filter.
By default, if a definition note doesn't have the def-filter property, it it's global and acts like a note within the folder in the settings. But if there is a def-filter property, it would have a value explaining what notes would get the pop-up. For simplicity, it would use the same syntax as Obsidian's filter/search commands: file:, path:, tag:, etc.
Solutions
Scenario 1: Since definition files can exist anywhere, I can create a consolidated note in the same folder and give it a new property -- def-filter: "path:project/mongoose". Now, only notes within the /project/mongoose folder (and subfolders) will see these definitions. And when I am done, I can zip up one folder and have everything I need.
Scenario 2: For my role=playing spell notes, I would add def-filter: "tag:game/rpg" so that only my RPG notes, regardless of where I store them will have the definitions.
Scenario 3: Instead of having one heading with two definitions, I can have one definition file with def-filter: "file:dog_training" and one with def-filter: "path:project/mongoose".
Concern
Since the filters can cover a wide area, it is possible that there will be collisions. Like a file in "/project/mongoose that also has the #game/rpg tag. would be trying to use both sets of definitions. And in the case of Scenario 3, where their are identical definitions, the plugin would have to decide between showing both, or one having a priority over the other.