I am wondering if there is a plugin or shortcut/code (possibly using dataview) that I’m not aware of that will allow the user to produce a list of all paragraphs that contain a specific internal link or tag?
For example, I want to have a note that contains everything I have read or written about #accountability or [[accountability]]. At the moment, I have created a note called ‘Accountability’ and then every time I come across something to do with the topic of accountability I embed an internal link to the specific para - i.e. ![[link^para]]. The Accountability note is then a central location for everything about the topic. I don’t want a list of other notes but to embed specific paragraphs because often a literature note may be relevant to many topics, not just accountability.
Ideally, as I tag or link to accountability content the Accountability note automatically updates. Basically, like my current system, without the need to manually add an internal link to a specific para each time I come across relevant content. But, instead, the accountability note is updated based on a specific tag or internal link.
Alternatively, is there a shortcut way to quickly link to a specific para without having to find the specific para by scrolling through text or typing part of the para after typing ^.
hi @aarontimo, i think what u need can be achieved with obsidian query function. but to add useful feature like showing in rendered markdown and controlling some other elements, you can try to use Query Control plugin for that (but u need to install using BRAT)
```query
block: ([[Ipsum]]) OR #ACMECorp
title: My Search on Ipsum and ACMECorp
collapsed: false
context: true
hideTitle: false
renderMarkdown: true
```
I’m not too fluent with query syntax (using it occassionally), but this should work. block: ( [[market accountability]] -#MoC ) OR #market_accountability
here are as far as i know how to use query syntax
( [[link]] -#tag1) OR #tag2 will find all notes with [[link]] that doesn’t have #tag1 and then include all notes that have #tag2 (that may still have #tag1 in the same note as #tag2)
( [[link]] OR #tag2 ) -#tag1 will find all notes that has either [[link]] or [[#tag2]] and then remove from that list any notes that have #tag1
which should be similar to ( [[link]] -#tag1 ) OR ( #tag2 -#tag1)
don’t use the AND operator. i don’t know how it works but it seems to make the variable being excluded for all notes. perhaps mod or others can shed some light
Unsure if I’m late to the party and have fully found what you want, but I do something similar with a template.
I have created a template that I use when needed inside MOCs that basically takes the title and adds a dataview search based on the title
LIST
FROM "Creation" AND !outgoing([[]])
WHERE any(contains(file.tags, replace(replace("interests/{{Title}}","🍱- ",""), " MOC", "")),contains(file.tags, replace(replace("concept/{{Title}}","🍱- ",""), " MOC", "")))
SORT Created desc
Let me explain it briefly.
Block Analysis
LIST
It creates a LIST
FROM
For anything inside my Creation folder
That is NOT already in this file (that way I can avoid links that are already tracked in this file)
WHERE
It looks for any file that contains either
#interests/topic
#concept/topic
Note: Since my MOCs files all have the following name - Title MOC (Example of my mocs: [[- Distractions MOC]], [[- Dopamine MOC]],…) I wrote a small function to remove the bits that surround the key words.
- Title MOC → - Title MOC → Title
SORT
Order with most recently created first
Wrap-up
I have that code repeated 4 times, to search in my 4 main folders:
My digital Garden
My To-Read List (Anti-Library)
My Library (Processed stuff)
My Brain Dump (Items I tagged but have not even curated)
For searching tags it’s better to use tag:MoC instead of #MoC. It’s faster because it searches the tag index, it avoids false positives (#MoC will match anything that starts with it, like #moccasins), and it matches tags in YAML metadata.
(I may have more later but this is all I have the bandwidth for now.)