reddit / emacs

Debugging an emacs package with edebug

trae · 2022-10-18 22:25
Hello everyone, Trying to fix bugs in a package that's gone a bit stale so I'm trying to figure out how to use edebug. Edebug manual is pretty dense and a couple of weeks between debugging sessions I forget how to run it. In the spirit of "learning in public" here's a quick screen cast: https://www.youtube.com/watch?v=560QrNt-a_w This should really be accompanied by a blog post, and it's kinda there in my notes. Would love some feedback.
slackorama · 2022-10-26 16:52
Thanks for sharing this. Very handy as edebug has been a bit of a mystery to me. More importantly, can you share details about your set up? Really like the box that pops up in the center of your screen.
trae · 2022-10-26 17:45
Glad you liked it. Are you talking about the M-x list in the middle of the screen? That's [vertico-posframe](https://github.com/tumashu/vertico-posframe). There's a similar for most major completion frameworks on [melpa](https://melpa.org/#/?q=posframe).
slackorama · 2022-10-26 19:35
Yes, that. Thanks for the pointer.
republic_of_mao · 2022-10-28 05:56
Nice demo. I've been using \`debug-on-entry' but your way looks better. Which repo/commit of org-noter are you fixing up? I'm using [github.com](https://github.com):cbpnk/org-noter-core.git \[5a95262\] (\~135 commits behind!). Maybe I'll dive back into that code -- I was dreaming of getting the head of that repo working and then finding a way to open pdfs into org-noter directly from a \`dired' buffer.
trae · 2022-10-31 14:17
Nice, it looks like we're forked off the same repo. Here's my fork: https://github.com/dmitrym0/org-noter-plus-djvu My fork is at the point where I can create notes, sync reading positions. Someone's put a lot of work to decouple `org-noter` functionality from the backing format, kudos to them. Opening a pdf and starting an org-noter session works. I don't see why it wouldn't work from dired, but I don't know how it works.
republic_of_mao · 2022-11-24 05:49
Looks like you put some work into the x-y precise note feature. I'll need to get past that bug at \[a7ff66c\] to try out your code. Which version of emacs are your running? I'm at 28.2, but I was under the impression that some of the development uses code that's ahead of what I have right now.
trae · 2022-11-24 16:11
> Looks like you put some work into the x-y precise note feature. That's correct, it's working well, at least for PDFs. > a7ff66c Not familiar with the code, but I imagine this where you can't open arbitrary notes files, and everything just goes `notes.org`? It's on my "list", but so far I've been able to work around it by creating a `NOTER_DOCUMENT` property, and invoking from that document. I'm on 28.2 as well. I don't know what the upstreams authors used but I'd be surprised if it mattered..