feat(lib): factor out window handling hook fn into variable by dradetsky · Pull Request #8127 · doomemacs/doomemacs · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

feat(lib): factor out window handling hook fn into variable #8127

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dradetsky
Copy link
Contributor

@dradetsky dradetsky commented Oct 28, 2024

If I disable the popup module and run doom/reload the default hook (presumably designed to work with popup) will close the window it ran in. As a result, I have to fix my window layout after running a reload.

To solve this we:

  1. Split the code that does this out of the one-big-hook that gets called after doom/reload
  2. Put that code into a variable

Then I can get emacs to do what I want by adding the following to my user config

(defun dmr:handle-compile-buffer (_buf status)
  (when (equal status "finished\n")
    (kill-buffer _buf)))

(setq doom-handle-compile-buffer-fn #'dmr:handle-compile-buffer)

  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
  • My commits conform to Doom's git conventions.
  • I am blindly checking these off.

@dradetsky dradetsky requested a review from a team as a code owner October 28, 2024 23:28
@dradetsky dradetsky force-pushed the fix-reload-window-close branch from 707a751 to e561ea5 Compare October 28, 2024 23:31
@hlissner hlissner added is:feature Adds or requests new features, or extends existing ones was:moved Is, was, or will be addressed elsewhere module:core:lib Relevant to Doom core's libraries labels Oct 29, 2024
@hlissner hlissner added this to the modules v24.11 milestone Oct 29, 2024
@hlissner hlissner marked this pull request as draft October 29, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:feature Adds or requests new features, or extends existing ones module:core:lib Relevant to Doom core's libraries was:moved Is, was, or will be addressed elsewhere
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.