unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: help-gnu-emacs@gnu.org
Subject: Opening next operation in new frame/window
Date: Mon, 24 Jun 2024 14:57:57 +0300	[thread overview]
Message-ID: <12698.0820366711$1719230335@news.gmane.org> (raw)


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



             reply	other threads:[~2024-06-24 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 11:57 Björn Bidar [this message]
2024-06-30 17:44 ` Opening next operation in new frame/window Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='12698.0820366711$1719230335@news.gmane.org' \
    --to=bjorn.bidar@thaodan.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).