Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • This seems like a useful approach, but I need to use 'quit-window' to get the desired behaviour (see my update to the question). So the solution would need a way to find the window based on 'buf', so that (quit-window ...) can be used instead of (delete-windows-on buf). Commented Feb 22, 2020 at 19:45
  • You'll be wanting get-buffer-window or get-buffer-window-list then. Commented Feb 22, 2020 at 23:12