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

kill window on capture abort #184

Closed
wants to merge 2 commits into from
Closed

kill window on capture abort #184

wants to merge 2 commits into from

Conversation

QiangF
Copy link

@QiangF QiangF commented Oct 3, 2024

The window layout should be restored.

@ahyatt
Copy link
Owner

ahyatt commented Oct 3, 2024

Thank you for your contribution! I'm curious why this is needed, though - with 789cb6d, we no longer open the notes in a different window - so theoretically we shouldn't need to kill the window. For example, if the user has two windows, and opens notes in one of them, I think it'd be a mistake to kill that window when quiting out of the notes buffer. What do you think?

@QiangF
Copy link
Author

QiangF commented Oct 3, 2024

For example, if the user has two windows, and opens notes in one of them, I think it'd be a mistake to kill that window when quiting out of the notes buffer. What do you think?

I agree that it is a user preference issue. But since the note buffer is temporary, it maybe better to be shown in a popup, not shown in the current window. I use Shackle to manage popup windows, shackle unfortunately can not delete the window after use.

I have my improved shackle here https://github.com/QiangF/shackle

@QiangF
Copy link
Author

QiangF commented Oct 3, 2024

Comment for my last commit:

  1. currently the whole note (tag and note abstract) are highlighted with hl-line face, which is quite distracting, highlight the current line using hl-line-mode is enough.
  2. when there are too many items in an ekg notes buffer, add more tags to further filter the result is an useful functionality, the tags in effect is removed from the complete read list.

@QiangF
Copy link
Author

QiangF commented Oct 3, 2024

I am not good at git. Please feel free to close or modified the pull request as you see fit.

@qingshuizheng
Copy link
Contributor

  1. highlighted with hl-line face, which is quite distracting

Quite agree on this. I'd like to disable it by default.

@QiangF
Copy link
Author

QiangF commented Oct 4, 2024

I find I can put window closing in kill-buffer-hook, I have added that support https://github.com/QiangF/shackle

@ahyatt
Copy link
Owner

ahyatt commented Oct 4, 2024

Without hl-line-mode, though, how do you know what the current note is? There needs to be some visual indication.

As far as the behavior of creating windows or not (and then killing them on quitting out), perhaps the behavior can be configured. Let me see if there's some standard practice that I might be missing here.

@QiangF
Copy link
Author

QiangF commented Oct 4, 2024

Without hl-line-mode, though, how do you know what the current note is? There needs to be some visual indication.

You are right. I find it is less unpleasing when I limit the amount of the previewed note content in ekg-display-note-template. I think this pull request could be closed now. Just don't forget to make the buffer name more consistent, use "*EKG " instead of "*ekg ".

@QiangF QiangF closed this Oct 4, 2024
@ahyatt
Copy link
Owner

ahyatt commented Oct 5, 2024

Thank you for bringing up these points, though - I appreciate the pull request. I'm not sure what the best solution is yet, but I'll continue to think about 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

Successfully merging this pull request may close these issues.

3 participants