As proposed in Permanent insert of block, a !! (block-insert) operator would be extremely useful in several circumstances.
The existing ability to link to blocks is terrific functionality that makes it possible to rapidly extract notes from existing sources, without having to creating dozens of independent, “atomic” notes.
The block-insert operator would extend that capability, making it possible to outline a document with a series of block links, and then compose the document by inserting the blocks they point to.
I’m working on an article now that describes a process for creating publications from Obsidian. The gist of is creating an outline using headings, nested bullets and links to blocks. The next step is to expand those links, replacing them with the text they point to.
Since the ! operator doesn’t do a true transclusion (and since true transclusion is a very difficult thing to automate, what with the need to properly manage heading levels and list indents) the only realistic alternative is to copy the block the link points to, insert it in place of the link, and do the manual massaging necessary to get an ersatz “transclusion”.
(Replacing the text can also be beneficial, since it preserves the original block, isolating it from changes that would make the revised block inappropriate in the current context. But there is also a loss of functionality. In the ideal world, the replacement would be accompanied by an invisible link to the original block. Lots of ways to use such a link, once it exists, but that (admittedly impractical) bit of wishful thinking needs to be set aside for the time being.)
The !! “insert block” operator would provide an easy mechanism to convert an outline composed of links to a “document note” that is ready for export.
That operator could be copied, then pasted in front of each link in turn, pausing only long enough to “massage” the last block-insert into shape before moving to the next one.
The operation is carried out manually at the moment by opening the link, copying the block it points to, and pasting it as a replacement for the link.
This just occurred to me. If I can find it as an existing request I’ll come back and link to it here.
When inserting a block, it would also be very handy to add a source attibution. Each reference to a book, of course, needs a page number. So those need to be in the block. But the title of the book, or a link to an article or lecture, is an attribute of the entire reference document.
That reference could be encoded as metadata in the “reference document”. Every block inserted from the reference would then be followed by the attribution, on a subsequent line. (The metadata attribute could be called “attribution” or maybe “source”.)
Personal notes wouldn’t have an attribution attribute, of course. So nothing happens in that case, but a block inserted from a note containing extracts from a book might wind up looking something like this:
"…inserted text… (p. 302)
- The Best Book Ever, by Yours Truly
- I always start reference fragments with a quotation mark, to distinguish them from notes I’ve added. Styles may differ, in that regard, but something of the kind is a useful practice.
- “(p. 302)” is included in the block
- The referenced document contains an “attribution” field in the metadata that reads, “Book, by Author”. The attribution is then automatically added–ideally in a format dictated by the user (in this case: new line, indent, hyphen, space, attribution (pretty standard, so it’s a reasonable default, and customizability can be deferred).