Digital resources in the Social Sciences and Humanities OpenEdition Our platforms OpenEdition Books OpenEdition Journals Hypotheses Calenda Libraries OpenEdition Freemium Follow us

Unmentioned Links, Chronological

One key aspect of Personal Knowledge Management (PKM) in a system based on markdown files is to link those files together. When using Obsidian and many other tools, you can create links to other notes by putting their titles in double square brackets, just like in our Note Lab logo. This link points to the note with that given filename (minus the suffix .md).

I’m not always linking my notes

In Obsidian, these links can be visualised utilising the Graph View, which is a powerful way to see the connections between your notes. If you’re like me, you tend to write a somewhat extensive note every once in a while. Every so often, I simply sit down and write my thoughts into a note in my Obsidian vault. This might be after a meeting, during a conference or in the evening as part of my shutdown routine to ’empty my brain’. This kind of note making is not particularly structured, as I just want to get some thoughts into my PKM, without knowing how (or even if) I want to come to those thoughts at a later time.
These notes have no connections to other notes most of the time. When I come across a concept or a topic whereof I’m sure to dig deeper on later, I might create a so-called placeholder link: Put a word (or a longer expression) into double square brackets and continue writing. Clicking this link, creates a note with the given title. Before that action, the link points nowhere, hence these links are also called “empty links.”

What are unlinked mentions?

Obsidian has a feature, which allows you to create links in other notes without leaving the note, you’re currently editing. To do so, the exact phrase being the title of your currently opened note has to appear somewhere else in your vault, and it’s just a click in Obsidian to make this expression a link. Let’s put this to an example:

I have a note on “learning theories” in my vault. It contains some information on that topic and just quietly sits there, waiting for me to add any thoughts. While I’m in my writing thing as mentioned above, I might jot down some thoughts on teaching and learning, mentioning that “other learning theories might apply to a certain kind of teaching style.”
When navigating to my “learning theories” note, I can fire up the right sidebar of Obsidian and see the “unlinked mentions”. Here, Obsidian scans my vault for the exact title of a note and offers to make any appearance of that phrase (or word) in other notes a link. I just have to click the button next to it.

This comes in very handy for my kind of workflow because I do not want to think about linking when writing down my notes. Asking myself “do I have a note on this yet” every time I write down something disturbs the flow of writing.

Why not just link everything?

I could go through the results presented by Obsidian when showing all unlinked mentions and make every single appearance a link. But I don’t want that. This might be too many links and will clutter the connections in my Graph View. I want to link my notes intentionally, and the UI of unlinked mentions simply gives me a more or less useful list of all possible links. Additionally, the list is sorted alphabetically. If you have mentioned the thing you’re in the note about many times throughout your vault, it might be challenging to identify the note, you actually want to link.

As I’m heavily relying on daily notes, my brain is wired to connect certain information to certain dates—or perhaps the causality of these facts is the other way round. Anyway; wouldn’t it be great, if I could see when each mention was created? For me, it certainly would!

Thankfully, I found a way to accomplish that! Please clear the stage for: The Dataview plugin.

Finding unlinked mentions with Dataview

If you are familiar with the Dataview plugin, you may ask yourself how to scan all your notes for text that is not in a property or a Dataview field. It is possible to add JavaScript to a Dataview query, though. That’s what I did. To do so, you have to allow JavaScript queries to be executed in the Dataview plugin (there’s a checkbox in the settings of the plugin).

I wanted to find all mentions of the title of a given note throughout my vault and wanted to know when it was mentioned the first time. So I asked GPT4 to come up with some code that gives me just that: A Dataview table consisting of two columns. The first displays the links to notes where the unlinked mention is to be found, the second column displays the date of creation of the respective note. In my vault, this “cdate” is contained in a property called “erstellt” (which translates to “created”). I put this date into double square brackets as well, so I can easily jump to my daily note from that day. The whole table is sorted by date (the second column) to present a chronological view on every unlinked mention.
Additionally, I created a template for this Dataview block. This way, every time I add this template to a note, it invokes a scan for the title of that note in my vault.

Here’s the full template:

### Where "{{title}}" is mentioned:
```dataviewjs
const currentFileName = dv.current().file.name.replace(/\.md$/, ''); // Get current file name without the .md extension
const files = app.vault.getMarkdownFiles(); // Fetch all Markdown files

// List for storing the files that mention the current file name and their creation date
let mentioningFiles = [];

// Asynchronously iterate through all files and search for mentions
(async () => {
    for (const file of files) {
        let content = await app.vault.read(file);
        // Check if the file name (case-insensitive) is mentioned in the content, but do not consider the current file itself
        if (file.name !== dv.current().file.name && content.toLowerCase().includes(currentFileName.toLowerCase())) {
            // Extract the file's creation date
            let creationDate = window.moment(file.stat.ctime).format("YYYY-DD-MM");
            mentioningFiles.push({file, creationDate});
        }
    }

    // Configure column titles to use the current file name (without .md)
    const columnTitle = `${currentFileName} is mentioned in`;

    // Output results in a table
    if (mentioningFiles.length > 0) {
        dv.table(
            [columnTitle, "Created on"],
            mentioningFiles.map( ({file, creationDate}) => [
                `[[${file.basename}]]`, 
                [[${creationDate}]]
            ])
        );
    } else {
        dv.paragraph("No mentions found.");
    }
})();```

To be honest, I can’t code. I would not be able to write that kind of stuff on my own. That means also, I can neither track down errors in this code nor am I able to find maybe a more efficient way. But: Having and AI, that helps me to solve my (admittedly first-world) problems, helps me to make even more use (and sense) of my PKM in Obsidian. If you’re interested in the details of the conversation I had with the AI assistant, you can download the chat here (zip file including a markdown file).

Hopefully, this post does help your PKM to thrive as well, or at least, serves as inspiration for what is possible. If you have questions (or suggestions on how to optimize this code), feel free to use the comments below!

David Lohner
David Lohner
Mastodon: https://higher-edu.social/@davidlohner

OpenEdition schlägt Ihnen vor, diesen Beitrag wie folgt zu zitieren:
David Lohner (4. April 2024). Unmentioned Links, Chronological. Note Lab. Abgerufen am 16. Juni 2026 von https://doi.org/10.58079/126hm


Das könnte dich auch interessieren …

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.