Feature request: backlinks

Since this doesn’t yet exist as a major discussion here, I wanted to make a thread for the single feature I most want to see after the Panda editor is merged back into Bear: rich, native backlinks support.

I know this is a much-hyped trend, but having switched to mostly using Roam a year ago, I find it really important for organizing my personal notes. It’s not just hype. For example, my own workflow has switched entirely to the style of keeping most notes within a single dated note for the day, but linking them to the relevant topics and relying on backlinks to find them. It’s an extremely natural and effective way to keep day to day notes.

I sorely miss the basic polish of Bear, though, and want to return to it. But while Bear’s wiki link functionality has grown in great ways in recent years, the lack of ability to easily see backlinks (with context) still limits it.

This could be via a footer or header automatically rendered into the note view (like Roam, and Andy Matuschak’s backlink tool which he uses with Bear), or it could potentially be a floating inspector window that a user can call up which always shows the backlinks to the currently-selected note. I imagine this would be an optional feature, which some could choose to turn off.

I actually hoped to build a simple floating inspector view myself, directly reading from the Bear database, but the total lack of AppleScript support in Bear meant there was no way to poll the app for the currently-selected note ID. (Which raises a related tangent: I also wish Bear had at least basic AppleScript support for better automation on macOS. Just being able to get the note ID / URL of the note in the current active window would let me build something basic myself until a native backlink feature hopefully eventually makes it in.)

3 Likes

I second these great suggestions. I use links a lot in Bear and from other apps (for example OmniFocus and Calendar) to Bear.

As a workaround to getting the current note in Bear within an Applescript, you can use something like

tell application "Bear" to activate
tell application "System Events"
	tell its application process "Bear"
		tell its menu bar 1
			tell its menu "Note"
				click menu item "Copy Link to Note" -- or "Copy Note’s Identifier"
			end tell
		end tell
	end tell
end tell
delay 0.2 -- sometimes the clipboard needs a 1/5 of second to register
set theNoteLink to the clipboard