all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Opening next operation in new frame/window
@ 2024-06-24 11:57 Björn Bidar
  2024-06-30 17:44 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Bidar @ 2024-06-24 11:57 UTC (permalink / raw)
  To: help-gnu-emacs


Hey,

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.


Br,

Björn



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Opening next operation in new frame/window
  2024-06-24 11:57 Opening next operation in new frame/window Björn Bidar
@ 2024-06-30 17:44 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2024-06-30 17:44 UTC (permalink / raw)
  To: Björn Bidar; +Cc: help-gnu-emacs

> Any other approaches welcome. I just want that quit-window
> just deletes the frame if it doesn't contain other-windows.

I recommend to open frames with the prefix 'C-x 5 5'
and then typing a key sequence for your command.
This will open a frame that will be closed with
quit-window.  Example: 'C-x 5 5 M-x proced RET'.
Then type 'q', and the frame will be deleted.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-30 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 11:57 Opening next operation in new frame/window Björn Bidar
2024-06-30 17:44 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.