Note composer (or similar) to embed current file to different note?

(Not sure what tags to use. Suggestions appreciated.)

So far, I’m quite satisfied with behavior of Note Composer in refactoring my notes as I type them, but now I’m looking for an additional functionality which works in reverse of how I normally use it.

My normal use case is when I’m studying something (a sort of ‘input’ mode). I could be watching a video and make a single long note titled by the video, with all the topics the topics covered by the video. Then I refactor it by selecting different topics in the long note and putting them in their own individual atomic note for future reference and linking. This leads to the long note comprising on nothing more than several embed of atomic notes. Fine and good.

But now, I’m trying to use obsidian as a sort of personal dev log for projects (a sort of ‘output’ mode). Here, each log entry is an individual/atomic note in a zettelkasten (Unique note creator) + journal/tweet format. Now I would like to add embed of each atomic entry in a single long note called ‘Project 1’, giving me a linking structure identical to my ‘input mode’, but simply handled in reverse.

Currently, the vanilla way to handle it is to type out my atomic note entry, create a new note titled ‘Project 1’, manually embed the entry. Not very elegant.

The workflow I’m trying to achieve is:

  • Click hotkey
  • Type ‘Project 1’ and hit enter
    • If ‘Project 1’ file exists, then ‘Entry 1’ (currently active note) gets added as an embed at the end (or beginning as per choice?) of ‘Project 1’
    • If ‘Project 1’ file doesn’t exist, it is created and ‘Entry 1’ is embedded into it

Maybe I’m misunderstanding you, but can’t you then just open the “Project 1” for, and use it the same way as your normal case:

  • write the new text
  • extract to new note, leaving an embed link behind

Yes, but that adds friction when it comes to naming the atomic file. My unique notes are always prefixed with YYYY.MM.DD.HH.mm.ss upon creation.

(If I’m not forgetting a potential feature somewhere,) if I were to use the method you mentioned, I would have to:

  • Use my insert current date time template hotkey to paste the datetime in the long note first
  • Type out my new entry within the long note
  • Copy/cut the datetime
  • Select the new entry and hit refactor hotkey
  • Paste the datetime in the popup and then hit enter

I wouldn’t have had this problem if one-line template insertion hotkey worked in popup menu, but I understand why it isn’t allowed so I wouldn’t want that to be changed.

I’m assuming your next question might be “If you didn’t need datetime prefix for study notes, then why do you need them for log notes?”, to which I can only say it’s a mentality thing. When I study or make study notes, I almost never think back to “when did i learn this? lemme check back”. But when it comes to output tasks, i like to see a visual reminder that “this day has been productive in this way”.

I’ve also struggled to come into a journaling habit, so it doubles as a motivation for that too. If I can get the method I mentioned, I’d be able to embed “Project 1 Entry 1” both in “Project 1” and also “Journal Day X summary” very easily. If I also happen to do a bit of Project 2 on the same day, then I can also quickly write “Project 2 Entry 1” and embed it in “Project 2” and “Journal Day X summary”.

There’s also a matter of me using both mobile and desktop, so hotkeys are not always going to be used.

That make sense, and my take on that would be to use Templater with a template like the following:

<%* 
const zettelName = tp.date.now("YYYY.MM.DD.hh.mm.ss")

const zettelFolder = "ForumStuff/f79/f79695"

const selection = tp.file.selection()
if ( selection == "" ) {
  window.alert("No text selected to extract into a zettelkasten note")
  return
}

await tp.file.create_new(selection, 
  zettelFolder + "/" + zettelName, 
  false, // Change to true if you want to open the new file
  app.vault.getAbstractFileByPath("/"))

tR += `![[${ zettelName }]]\n`
_%>

Assign this to a hotkey on the desktop, and either on the mobile draw-down menu or the mobile toolbar on mobile(, or find it using the insert template modal).

Now you can open the file you want to insert the embed into, i.e. “Project 1”, type out the text you want, select it and trigger the template. It’ll then create a new file with the selected content, and replace the selection with the embed link.

This is just a base setup, and you could of course extend the content of the new file with other stuff like a predefined frontmatter, and so on. You’ll also need to adjust the zettelFolder to match your setup.

Hopefully, this should get you going on a way to enlightenment and easy workflows! :smiley:

Um, is there really no way to have a simple “Add embed to” function? If I’m seeing this right, your suggestion keeps me working in my ‘input workflow’ rather than my ‘output workflow’. My brain is basically working like this.

“Aight, I’m done with this task. Lemme just note it down in my journal.”

  • Hit unique note hotkey → creates a note titled “11112233445566 [+anything i want]”
  • Notes down stuff I did in a short note (physical analogy: small page snippet like a card)

“Okay, but this task is part of Project 1 that I’m working on. I’ll just embed this in it.”

  • Hit “Add embed to” hotkey → triggers popup text field command (similar to Note Composer popup)
  • Type “Project 1” and hit enter
  • “![[11112233445566 [+anything i want]]]” gets appended to “Project 1” file without actually opening the file itself.

“Now I’d like this to be part of my today’s productivity summary sheet.”

  • Hit “Add embed to” hotkey → triggers popup text field command
  • Type “Day X summary” and hit enter
  • “![[11112233445566 [+anything i want]]]” appended to “Day X summary” without opening it

“Hmm, but this task was significant enough milestone that I’d like to remember it in a special note.”

  • Hit “Add embed to” hotkey → triggers popup text field command
  • Type “Big things I managed to figure out” and hit enter
  • “![[11112233445566 [+anything i want]]]” appended to “Big things I managed to figure out”

… Like so. I suppose you could say it’s a ‘reverse linking’ workflow rather than regular linking. Instead of “telling this to link to that (which is what typing [[that note]] in ‘this note’ does)”, I’m “telling that to link to this (without opening ‘that note’)”.

If I were to follow your templater suggestion, I face two problems. The first is that it makes the above mentioned workflow tedious since I’d have to open the latter two large notes and embed the zettel note manually anyway.

The second is that it kind of disrupts my journaling workflow. I don’t want to write new thoughts in an prepopulated note because it disrupts my thought process. Instead, I would like a fresh clean ‘page’ to vomit it out. It’s like trying to blow air in an already gas filled container vs a vacuum container. I ‘could’ blow air (thoughts) into the bottle since air is compressible, but the back-pressure is an undesirable hindrance.

A third (minor) problem is that the datetime generated by templater would be the datetime ‘after’ i’m done writing, rather than ‘as i start to write’. Can cause problems with chronology in some cases.

Besides, I think it can be pretty useful even beyond my workflow if a ‘reverse linking’ option was added for some situations.

1 Like

Your mindset/workflow concept makes a great deal of sense!

I think you can explore Obsidian plugins like Advanced New File or Hotkeys++ to streamline the process. Using a hotkey, create a new note titled Project 1 and embed the current note (Entry 1) automatically.

And you can customize the hotkey to append the embed at the end or beginning of Project 1 based on your preference. This approach enhances efficiency and eliminates manual steps, making your workflow smoother and more elegant.

Could you elaborate? The Advanced New File plugin looks like it only serves to create fresh new notes (in a desired folder structure) and nothing else. My aforementioned workflow explanation assumes that ‘Project 1’, ‘Day X summary’ and ‘Big things I managed to figure out’ can also be preexisting notes with old data/text. If it really is only a new file creator, then I don’t see it helping very much. Plus, appending a note to the beginning or end to an empty note would basically mean the same thing, no? i.e. Since it’s empty there’s nothing to there to put ‘before’ or ‘after’.

I also checked Hotkey++ and I don’t see any option to add embeds anywhere (only toggle embed of internal links). Plus, there doesn’t seem to be an option for custom hotkeys either, unless I’m missing something.