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.)


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

Also Bear provides a URL scheme for this: bear://x-callback-url/open-note?selected=yes. You’d need to work with another tool on top of this if you were trying to automate a process using the currently selected note, but you can already get at it.

Great call — I missed the selected=yes option!

The basic request for built-in backlink aggregation obviously still holds, but the ability to build a hand-rolled solution on top of Bear’s automation is now more feasible, at least on Mac.

Yes, yes and more test to backlinks please :slight_smile: !

+1 to backlinks

I trust the Bear design team to make the right decisions, but in my opinion listing these in the information panel would be ideal as it would be unobtrusive yet easily accessible.