reddit / emacs

link-hint-preview.el - Preview link contents in a pop-up frame with link-hint

oldjawbone · 2022-06-03 13:15
oldjawbone · 2022-06-03 13:18
Cooked up this set of functions to scratch a small itch. Wondering how it might be improved, extended, etc. I find frame handling (parameters) particularly difficult/confusing, so it took some around fumbling. Any suggestions very welcome :) Repo here: https://github.com/localauthor/link-hint-preview
linwaytin · 2022-06-03 15:06
Looks awesome! Can this be used with `org-roam`?
oldjawbone · 2022-06-03 16:46
In all likelihood yes, but I’m not an org-roamer myself. It couldn’t be too hard to include it as a condition case in the org function, I imagine. If you figure something out let me know!
ExistingProgram3883 · 2022-06-03 17:18
Maybe you want to have a look at https://github.com/jgru/consult-org-roam which offers previewing of backlinks and forward links, u/linwaytin. Link-hint-preview.el looks really cool, u/oldjawbone, I will have a look at it to check whether one could use consult's live previewing instead of the pop-up frame.
agumonkey · 2022-06-03 19:44
you tried using without a new frame ? a temp small preview buffer ? pretty cool idea nonetheless :)
linwaytin · 2022-06-03 20:22
Thank you!
curioushom · 2022-06-04 04:59
This looks really great! I don't want to go full roam or logseq but I like previewing the backlinks and this is an excellent solution. Any chance you'll considering splitting it off into its own repo? I'd like to keep up with updates and maybe hack around a bit myself. Thanks for sharing!
oldjawbone · 2022-06-04 05:03
Not sure what you mean by “temp small preview buffer”. Is there a specific function/feature you’re thinking of?
agumonkey · 2022-06-04 05:49
I can never remember the names but there's the switch-to-buffer-other-window family. Actually I think I had a mode with that.. I'll dig my github to see.
oldjawbone · 2022-06-04 06:27
You might try out zk and zk-index then, as an alternative to org roam, built on emacs internals. https://youtu.be/BixlUK4QTNk https://youtu.be/7qNT87dphiA And yes, I’ll split this off into a dedicated repo. Wanted to gauge interest first, and look for some feedback :) EDIT: repo here - https://github.com/localauthor/link-hint-preview
_viz_ · 2022-06-04 06:28
I'm afk so apologies in advance for the possibly inaccurate answer but I think you're looking for the ehelp library (electric help).
curioushom · 2022-06-04 13:39
Hey thanks for linking zk (and making it). I remember seeing it earlier and watched the demo again. I'm still unsure what path I want to take; I don't want the backlinks "polluting" the file or having the notes comply to a specific format. But I also don't really want an external package. So far I've found using logseq as an read only frontend/viewer a good solution but having link-hint-preview will be great. Looking forward to trying it out, thanks again!