this post was submitted on 18 Oct 2023
1 points (100.0% liked)

Emacs

310 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I'd like magit-status to open full frame, ie a single window. When I hit q to exit, I'd like my previous window configuration to be restored.

What's the best way to do this? Setting the follow var causes it to open full frame, but removes all windows except for one upon exit:

 (setq magit-display-buffer-function
  #'magit-display-buffer-fullframe-status-v1)

I can get to my previous window layout with winner-undo, but I'd like q to do the right thing in this case.

Any thoughts?

you are viewing a single comment's thread
view the rest of the comments
[–] 7890yuiop@alien.top 1 points 11 months ago

I think you need to define your requirements in more detail. What if you call magit-status while using Magit? Does that change what the "previous window configuration" should be? (I suspect it does, in which case it's not going to be "the previous window configuration" that you want). If I'm correct, you should clarify exactly which window configuration you want to restore, and when (in which specific circumstances) that should be captured.