Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to quit the reflection #1

Open
meedstrom opened this issue Sep 6, 2024 · 2 comments
Open

Command to quit the reflection #1

meedstrom opened this issue Sep 6, 2024 · 2 comments

Comments

@meedstrom
Copy link

meedstrom commented Sep 6, 2024

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
Copy link
Owner

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.

emacsomancer added a commit that referenced this issue Feb 28, 2025
- keeps a list of dailies that org-daily-reflection opened in
  `org-daily-reflection-close-unmodified-newly-opened-buffers`
- new command  `org-daily-reflection-close-reflection-newly-opened`,
  which closes all dailies opened by org-daily-reflection that have not
  been modified
- `org-daily-reflection-close-reflection-newly-opened` function is also
  run (closing all unmodified buffers opened by org-daily-reflection) when
  calling the command `org-daily-reflection-restore-prior-windows` when
  the new setting `org-daily-reflection-close-unmodified-newly-opened-buffers`
  is set to a non-nil value (nil by default)
  (note: `org-daily-reflection-layout-toggle` does not close
  org-daily-reflection opened buffers because it wouldn't make sense in the case
  you want to toggle. use command `org-daily-reflection-restore-prior-windows`
  with the `org-daily-reflection-close-unmodified-newly-opened-buffers` set to
  `t` instead if you really want to close such buffers.)

[addresses #1 ]
@emacsomancer
Copy link
Owner

does 1a028f0 resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants