* RE: [External] : Opening next operation in new frame/window
[not found] <87zfrazh6i.fsf@>
@ 2024-06-24 14:37 ` Drew Adams
0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2024-06-24 14:37 UTC (permalink / raw)
To: Björn Bidar, help-gnu-emacs@gnu.org
> I'm using Emacs with a frame focused layout, meaning pop-up-frames and
> frames-only-mode.
>
> I want to open certain modes in a new frame that then contains a new
> window dedicated to that mode so that when I call quit-window, like for
> example in man or elfeed, the window will close and the new frame thous
> too.
>
> I looked into how quit-window works and noticed that it only destroys
> the frame when the window inside it is dedicated.
>
> I like to launch modes such as the before mentioned elfeed or vterm
> from my desktop launcher like any other desktop app such that when I
> close the buffer of those which only contains one window closes.
> Some modes have helper functions to open in a new dedicated window such
> as Gnus (gnus-other-window) or Info (info-other-window) where this is
> easy e.g. as in emacsclient --create-frame --eval '(gnus-other-windwo)'.
>
> Now I wonder is it the right approach to use
> (set-window-dedicated-p) on the newly created window for elfeed to make
> sure quit-window also kills the frame?
> E.g. as in:
> (defun elfeed-other-window ()
> (set-window-dedicated-p (frame-selected-window) t)
> (elfeed))
>
> Similarly I want to do the same in the I use to launch emacs packages:
> ;; Start different emacs packages (like elfeed or mu4e)
> (defhydra hydra-emacs-launcher (:color blue :hint nil)
> "Launch emacs package"
> ("i" circe "Circe - IRC" :column "Apps")
> ("e" elfeed-summary "Elfeed - RSS/Atom Newsreader")
> ("t" transmission "Transmission - Torrent")
> ("g" gnus-other-frame "Gnus - Mail")
> ("m" mastodon "Mastodon.el - Mastodon")
> ("p" proced "proced")
> ("c" quick-calc "calc - Quick calc" :column "Utils")
> ("d" docker "docker")
> ("C" calendar "calendar")
> ("T" world-clock "time - Display world time")
> ("s" hydra-systemctl/body "Systemctl")
> ("j" journalctl "Journalctl")
> ("t" multi-vterm "Vterm" :column "Misc")
> ("b" brain-fm-play "brain.fm - Stream music")
> ("E" elisp-index-search "elisp-index-search")
> ("S" scrot "Screenshot with scrot")
> ("w" woman "woman - Man page viewer"))
>
> Any other approaches welcome. I just want that quit-window
> just deletes the frame if it doesn't contain other-windows.
Sorry, just took a quick look at your question,
so I might not be paying enough attention to it.
I remap `quit-window' to `quit-window-delete'
for interactive use. That's defined here:
https://www.emacswiki.org/emacs/download/misc-cmds.el
(define-key global-map [remap quit-window] 'quit-window-delete)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-24 14:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87zfrazh6i.fsf@>
2024-06-24 14:37 ` [External] : Opening next operation in new frame/window Drew Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).