emacsomancer / org-daily-reflection

Reflect on your org-roam daily entries, comparing N org-roam dailies at M intervals (years, months, fortnights, weeks, days).
GNU General Public License v3.0
19 stars 1 forks source link

Command to quit the reflection #1

Open meedstrom opened 2 months ago

meedstrom commented 2 months ago

I'm thinking a quit could

  1. restore the state of the windows from before, and
  2. attempt to kill the buffers that were opened.

It's not that I'm in the habit of "cleaning" my buffer lists, I spent some years with C-x k unbound. It's just that I'd like to hook something like (lambda () (text-scale-decrease 1)) for this particular purpose, and then I want to kill those buffers when I'm done because it'd be weird later on to run across these buffers with the small text.

What do you think?

emacsomancer commented 2 months ago

I've been planning (1), and it should be pretty easy to implement as I've already got a window config restore operation that's used for the splitting function itself (in case it can't actually manage to split the frame properly). I hadn't thought about (2), but it's a good idea, and probably wouldn't be very hard either: make a list of buffers that were opened in the process of reflecting (maybe check to see that they weren't open before?) and kill them if they weren't modified.