From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
To: help-gnu-emacs@gnu.org
Subject: Re: When do you prefer frames instead of windows?
Date: Mon, 24 Nov 2014 23:12:45 +0100 [thread overview]
Message-ID: <877fykgsde.fsf@vsl28t2g.ww011> (raw)
In-Reply-To: <cdh5cbFjsg7U1@mid.individual.net> (Raffaele Ricciardi's message of "Mon, 24 Nov 2014 17:40:42 +0100")
Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
> The usefulness of frames is evident for buffers that update their
> content according to the current buffer (like Speedbar and
> ECB). Besides this kind of use, when do you prefer frames instead of
> windows?
To preserve sane window layouts despite a multitude of major modes.
For example: Barry Margolin pointed out that he prefers 4 ansi terminals
in a "shell frame". I like to have a "file manager" frame with two
dired buffers side by side. Gnus literally "demands" his own frame in
its default mode of operation!
Here's an illustration of my frame setup which is based on Alan
Mackenzie work, so that I'm able to open frames with predefined window
layouts according to various tasks or - if a task frame already exists,
just switch to it.
;; ======================================================================
;; `frames' based on Alan Mackenzie's setup
(set-frame-name "Work")
(modify-frame-parameters (selected-frame) '((acm-no . 2)))
(find-file "~/org/blog/dddlll.org")
(defun assign-acm-no (frame)
"FRAME is a (typically newly created) frame. Give it an acm-no
frame-parameter if there is one free (in the range 0..11).
Return that number or nil."
(let ((assigned (make-bool-vector 12 nil)) (f (frame-list)) n)
(while f
(if (setq n (frame-parameter (car f) 'acm-no))
(aset assigned n t))
(setq f (cdr f)))
(setq n 0)
(while (and (< n 12) (aref assigned n))
(setq n (1+ n)))
(if (= n 12)
nil
(modify-frame-parameters frame `((acm-no . ,n)))
n)))
;(add-hook 'after-make-frame-functions 'assign-acm-no)
(defun find-acm-no-frame (n)
"Return the frame with parameter (acm-no . N), or nil."
(let ((f (frame-list)))
(while (and f (not (eq (frame-parameter (car f) 'acm-no) n)))
(setq f (cdr f)))
(car f)))
(defun focus-frame-acm-no (n)
"Select the frame with acm-no frame-parameter N, or do nothing."
(let ((frame (find-acm-no-frame n)))
(when frame (select-frame-set-input-focus frame))
(framep frame)))
;; frame 2, 3, ...
(defun focus-or-make-named-frame ( no)
"bla"
(unless (focus-frame-acm-no no)
(let ((frame (make-frame-command)))
(select-frame-set-input-focus frame)
(cond
((= no 1)
(modify-frame-parameters frame '((acm-no . 1)))
(set-frame-name "F1 Informations, info, eww")
(unless (get-buffer "*info*")
(info))
)
((= no 2)
(modify-frame-parameters frame '((acm-no . 2)))
(set-frame-name "F2 Work")
)
((= no 3)
(modify-frame-parameters frame '((acm-no . 3)))
(set-frame-name "F3 Communications Gnus, BBDB")
(unless (get-buffer "*Group*")
(gnus-unplugged))
)
((= no 4)
(modify-frame-parameters frame '((acm-no . 4)))
(set-frame-name "F4 OS terminal, shell")
(split-window-horizontally)
(unless (get-buffer "*terminal*")
(term "/bin/bash"))
)
((= no 5)
(modify-frame-parameters frame '((acm-no . 5)))
(set-frame-name "Time Management and Planning")
(unless (get-buffer "*Calendar*")
(calendar))
)
((= no 6)
(modify-frame-parameters frame '((acm-no . 6)))
(set-frame-name "Programming and Configuration")
(unless (get-buffer "init.el")
(find-file "~/.emacs.d/init.el"))
)
((= no 7)
(modify-frame-parameters frame '((acm-no . 7)))
(set-frame-name "Dired File Manipulations")
(dired "~"))
((= no 8)
(modify-frame-parameters frame '((acm-no . 8)))
(set-frame-name "Helper Frame"))
((= no 9)
(modify-frame-parameters frame '((acm-no . 9)))
(set-frame-name "ERC"))
((= no 10)
(modify-frame-parameters frame '((acm-no . 9)))
(set-frame-name "Image Dired"))
))))
(global-set-key [f1] (lambda () "Switch to frame 1" (interactive) (focus-or-make-named-frame 1)))
(global-set-key [f2] (lambda () "Switch to frame 2" (interactive) (focus-or-make-named-frame 2)))
(global-set-key [f3] (lambda () "Switch to frame 3" (interactive) (focus-or-make-named-frame 3)))
(global-set-key [f4] (lambda () "Switch to frame 4" (interactive) (focus-or-make-named-frame 4)))
(global-set-key [f5] (lambda () "Switch to frame 5" (interactive) (focus-or-make-named-frame 5)))
(global-set-key [f6] (lambda () "Switch to frame 6" (interactive) (focus-or-make-named-frame 6)))
(global-set-key [f7] (lambda () "Switch to frame 7" (interactive) (focus-or-make-named-frame 7)))
(global-set-key [f8] (lambda () "Switch to frame 8" (interactive) (focus-or-make-named-frame 8)))
(global-set-key [f9] (lambda () "Switch to frame 9" (interactive) (focus-or-make-named-frame 9)))
(global-set-key [f10] (lambda () "Switch to frame 10" (interactive) (focus-or-make-named-frame 10)))
;; F11 is toggle full-screen
;; (global-set-key [f12] (lambda () "Switch to frame 12" (interactive) (focus-or-make-named-frame 12)))
Dieter
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
next prev parent reply other threads:[~2014-11-24 22:12 UTC|newest]
Thread overview: 205+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 16:40 When do you prefer frames instead of windows? Raffaele Ricciardi
2014-11-24 17:20 ` Drew Adams
2014-11-25 8:03 ` Gian Uberto Lauri
2014-11-25 15:46 ` Drew Adams
2014-11-25 15:54 ` Gian Uberto Lauri
2014-11-25 8:33 ` When do you prefer windows instead of frames? Was: " H. Dieter Wilhelm
2014-11-25 15:46 ` Drew Adams
2014-11-25 18:40 ` MBR
2014-11-25 18:52 ` Drew Adams
2014-11-26 2:31 ` Yuri Khan
2014-12-19 16:08 ` Jude DaShiell
2014-11-25 8:52 ` Rainer M Krug
2014-11-24 19:10 ` MBR
2014-11-24 19:14 ` Drew Adams
2014-11-24 22:12 ` H. Dieter Wilhelm [this message]
[not found] ` <mailman.14497.1416867184.1147.help-gnu-emacs@gnu.org>
2014-11-25 0:59 ` Barry Margolin
2014-11-25 1:29 ` Robert Thorpe
2014-11-25 4:21 ` Drew Adams
2014-11-25 8:54 ` Rainer M Krug
2014-11-25 15:47 ` Drew Adams
2014-11-25 1:45 ` Yuri Khan
2014-11-25 9:27 ` Ralf Fassel
2014-11-25 15:47 ` Drew Adams
[not found] ` <mailman.14554.1416930453.1147.help-gnu-emacs@gnu.org>
2014-11-25 15:57 ` Ralf Fassel
2014-11-25 16:57 ` Drew Adams
[not found] ` <mailman.14564.1416934703.1147.help-gnu-emacs@gnu.org>
2014-11-25 17:16 ` Ralf Fassel
2014-11-25 18:09 ` Drew Adams
2014-11-25 22:08 ` Subhan Michael Tindall
2014-11-25 22:22 ` Drew Adams
[not found] ` <mailman.14600.1416953316.1147.help-gnu-emacs@gnu.org>
2014-11-26 9:34 ` Joost Kremers
2014-11-25 22:02 ` Subhan Michael Tindall
2014-11-26 5:02 ` Yuri Khan
[not found] ` <mailman.14479.1416849631.1147.help-gnu-emacs@gnu.org>
2014-11-24 17:47 ` Barry Margolin
2014-11-24 18:06 ` Jai Dayal
2014-11-25 17:32 ` Joost Kremers
[not found] ` <<slrnm79f8k.a37.joost.m.kremers@j.kremers4.news.arnhem.chello.nl>
2014-11-25 18:09 ` Drew Adams
2014-11-25 22:28 ` Bob Proulx
2014-11-25 22:54 ` Drew Adams
2014-11-26 8:12 ` Alan Schmitt
2014-11-26 13:42 ` H. Dieter Wilhelm
2014-11-28 13:51 ` Tom Davey
2014-11-28 15:39 ` Drew Adams
2014-11-26 16:37 ` Ken Goldman
2014-11-27 21:02 ` Chris F.A. Johnson
-- strict thread matches above, loose matches on Subject: below --
2020-11-01 16:08 bounds-of-thing-at-point for paragraphs Christopher Dimech
2020-11-01 18:22 ` Jean Louis
2020-11-01 18:34 ` Christopher Dimech
2020-11-01 18:45 ` Drew Adams
2020-11-01 18:52 ` Jean Louis
2020-11-01 19:00 ` Drew Adams
2020-11-01 20:07 ` Christopher Dimech
2020-11-01 22:06 ` Drew Adams
2020-11-01 22:36 ` Christopher Dimech
2020-11-01 22:47 ` Jean Louis
2020-11-01 22:52 ` Drew Adams
2020-11-01 23:14 ` Christopher Dimech
2020-11-02 1:07 ` Drew Adams
2020-11-02 4:09 ` Robert Thorpe
2020-11-02 15:41 ` Drew Adams
2020-11-03 6:00 ` Corwin Brust
2020-11-03 6:40 ` Stefan Kangas
2020-11-03 7:41 ` Corwin Brust
2020-11-03 16:07 ` Drew Adams
2020-11-06 23:45 ` Corwin Brust
2020-11-07 1:26 ` Stefan Kangas
2020-11-02 6:07 ` finder-commentary Jean Louis
2020-11-02 15:48 ` finder-commentary Drew Adams
2020-11-02 16:02 ` finder-commentary Drew Adams
2020-11-02 16:58 ` finder-commentary Jean Louis
2020-11-02 17:27 ` finder-commentary Drew Adams
2020-11-01 22:49 ` RE: RE: bounds-of-thing-at-point for paragraphs Jean Louis
2020-11-01 22:51 ` Drew Adams
2020-11-01 23:10 ` Christopher Dimech
2020-11-02 1:05 ` Drew Adams
2020-11-01 20:36 ` Jean Louis
2020-11-01 21:32 ` Michael Heerdegen
2020-11-01 21:43 ` Jean Louis
2020-11-01 21:43 ` Jean Louis
2020-11-01 19:27 ` Eli Zaretskii
2020-11-01 19:51 ` Christopher Dimech
2020-11-01 20:00 ` Eli Zaretskii
2020-11-01 20:09 ` Christopher Dimech
2020-11-01 20:13 ` Eli Zaretskii
2020-11-01 20:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 20:31 ` Christopher Dimech
2020-11-01 22:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-11-01 21:46 ` Drew Adams
2020-11-01 20:23 ` Michael Heerdegen
2020-11-01 20:29 ` Christopher Dimech
2020-11-01 22:10 ` Drew Adams
2020-11-01 21:01 ` Stefan Monnier
2020-11-01 18:45 ` Jean Louis
2020-11-01 18:51 ` Drew Adams
[not found] <mailman.5042.1543777897.1284.help-gnu-emacs@gnu.org>
2018-12-04 9:04 ` using setq to create lists based on other lists Barry Margolin
2018-12-04 13:56 ` Stefan Monnier
2018-12-05 1:07 ` Robert Thorpe
2018-12-05 2:32 ` Drew Adams
2018-12-05 6:45 ` Jean-Christophe Helary
2018-12-05 8:00 ` Marcin Borkowski
2018-12-05 8:11 ` Jean-Christophe Helary
2018-12-05 14:57 ` Drew Adams
[not found] ` <mailman.5218.1544021892.1284.help-gnu-emacs@gnu.org>
2018-12-05 16:59 ` Barry Margolin
[not found] ` <mailman.5186.1543978155.1284.help-gnu-emacs@gnu.org>
2018-12-05 16:50 ` Barry Margolin
[not found] ` <mailman.5145.1543931778.1284.help-gnu-emacs@gnu.org>
2018-12-05 16:47 ` Barry Margolin
[not found] <mailman.7307.1515801433.27995.help-gnu-emacs@gnu.org>
2018-01-13 0:43 ` info-find-source Emanuel Berg
2018-01-13 3:43 ` info-find-source Robert Thorpe
2018-01-13 5:23 ` info-find-source Marcin Borkowski
2018-01-13 16:31 ` info-find-source Drew Adams
2018-01-14 7:03 ` info-find-source Marcin Borkowski
2018-01-16 23:10 ` info-find-source Drew Adams
2018-01-13 15:50 ` info-find-source Drew Adams
[not found] ` <mailman.7314.1515821013.27995.help-gnu-emacs@gnu.org>
2018-01-14 2:57 ` info-find-source Emanuel Berg
2018-01-14 7:00 ` info-find-source Marcin Borkowski
[not found] ` <mailman.7369.1515913231.27995.help-gnu-emacs@gnu.org>
2018-01-15 4:17 ` info-find-source Emanuel Berg
2018-01-15 18:54 ` info-find-source Marcin Borkowski
[not found] ` <mailman.7435.1516042498.27995.help-gnu-emacs@gnu.org>
2018-01-15 19:55 ` info-find-source Emanuel Berg
2018-01-16 23:58 ` info-find-source Robert Thorpe
2018-01-19 6:22 ` info-find-source Marcin Borkowski
[not found] ` <mailman.7609.1516342943.27995.help-gnu-emacs@gnu.org>
2018-01-19 7:12 ` info-find-source Emanuel Berg
2018-01-19 20:31 ` info-find-source Marcin Borkowski
2018-01-19 21:05 ` info-find-source Drew Adams
[not found] ` <mailman.7653.1516395915.27995.help-gnu-emacs@gnu.org>
2018-01-19 22:19 ` info-find-source Emanuel Berg
2018-01-19 23:21 ` info-find-source Drew Adams
[not found] ` <mailman.7656.1516404112.27995.help-gnu-emacs@gnu.org>
2018-01-20 19:49 ` info-find-source Emanuel Berg
2018-01-20 20:18 ` info-find-source Eli Zaretskii
[not found] ` <<83bmhos2qd.fsf@gnu.org>
2018-01-20 23:50 ` info-find-source Drew Adams
2018-01-21 0:04 ` info-find-source Drew Adams
[not found] ` <mailman.7695.1516493072.27995.help-gnu-emacs@gnu.org>
2018-01-21 11:49 ` info-find-source Emanuel Berg
[not found] ` <mailman.7650.1516393881.27995.help-gnu-emacs@gnu.org>
2018-01-19 20:43 ` info-find-source Emanuel Berg
2018-01-13 5:17 ` info-find-source Marcin Borkowski
[not found] ` <mailman.7313.1515820700.27995.help-gnu-emacs@gnu.org>
2018-01-14 2:54 ` info-find-source Emanuel Berg
2018-01-15 18:52 ` info-find-source Marcin Borkowski
[not found] ` <mailman.7433.1516042345.27995.help-gnu-emacs@gnu.org>
2018-01-15 19:50 ` info-find-source Emanuel Berg
2016-08-03 9:30 How to get back to a place in a buffer, or: what is a window configuration? Marcin Borkowski
2016-08-03 11:25 ` Kaushal Modi
2016-08-03 18:31 ` Marcin Borkowski
2016-08-03 14:42 ` Drew Adams
2016-08-03 18:42 ` Marcin Borkowski
2016-08-03 19:39 ` Drew Adams
2016-08-03 21:47 ` Robert Thorpe
2016-08-03 22:06 ` Drew Adams
2016-05-13 14:20 Overriding emacs key bindings xiongtk
2016-05-16 18:04 ` Eli Zaretskii
2016-05-16 21:15 ` xiongtk
2016-05-16 18:59 ` Emanuel Berg
2016-05-16 21:14 ` xiongtk
2016-05-16 23:29 ` Emanuel Berg
2016-05-17 1:55 ` Robert Thorpe
2016-05-17 2:41 ` Emanuel Berg
2016-05-17 4:07 ` Drew Adams
2016-05-17 3:25 ` Kaushal Modi
2016-05-17 4:07 ` Drew Adams
2016-05-17 4:15 ` Emanuel Berg
2016-05-17 20:38 ` Robert Thorpe
2016-05-17 4:07 ` Drew Adams
2016-05-18 1:42 ` Emacs conventions (was: Re: Overriding emacs key bindings) Emanuel Berg
2016-05-18 4:38 ` Drew Adams
2016-05-18 5:22 ` Emanuel Berg
2016-05-18 5:36 ` "First line is not a complete sentence" (was: Re: Emacs conventions (was: Re: Overriding emacs key bindings)) Emanuel Berg
[not found] ` <mailman.40.1463549841.6543.help-gnu-emacs@gnu.org>
2016-05-18 13:27 ` Joost Kremers
2016-05-19 4:32 ` Emanuel Berg
[not found] ` <mailman.37.1463546355.6543.help-gnu-emacs@gnu.org>
2016-05-18 14:31 ` Emacs conventions (was: Re: Overriding emacs key bindings) Barry Margolin
2016-05-19 4:38 ` Emanuel Berg
2016-05-17 4:44 ` Overriding emacs key bindings Marcin Borkowski
2016-05-17 20:37 ` Robert Thorpe
2016-05-18 2:21 ` Emanuel Berg
2016-05-18 20:34 ` Robert Thorpe
2016-05-19 1:33 ` Emanuel Berg
2016-05-18 17:52 ` Marcin Borkowski
2016-05-18 20:30 ` Robert Thorpe
2016-05-17 4:43 ` Marcin Borkowski
2016-05-18 1:51 ` Emanuel Berg
2016-05-17 4:49 ` Marcin Borkowski
2016-05-18 2:02 ` Emanuel Berg
2015-03-03 0:47 Opening a bookmark in the init file Robert Thorpe
2015-03-03 0:56 ` Drew Adams
2015-03-03 2:32 ` Robert Thorpe
2015-03-08 19:18 ` Robert Thorpe
2015-03-08 21:24 ` Drew Adams
2015-03-08 21:48 ` Robert Thorpe
2015-03-08 22:52 ` Drew Adams
2015-01-14 22:12 Info: how to get back from a footnote Marcin Borkowski
2015-01-15 2:42 ` Robert Thorpe
2015-01-15 3:11 ` Drew Adams
2015-01-15 5:51 ` Marcin Borkowski
2015-01-16 2:38 ` Robert Thorpe
[not found] <mailman.16504.1419019164.1147.help-gnu-emacs@gnu.org>
2014-12-29 4:21 ` Abbrevs for the most frequent elisp symbols Emanuel Berg
2014-12-29 11:24 ` Marcin Borkowski
2014-12-29 13:09 ` Robert Thorpe
2014-12-29 15:28 ` Drew Adams
2014-12-29 16:28 ` Robert Thorpe
2014-12-29 13:26 ` Stefan Monnier
2014-12-29 13:40 ` Marcin Borkowski
2014-12-29 14:57 ` Stefan Monnier
2014-12-29 15:49 ` Tom
[not found] ` <mailman.16844.1419852282.1147.help-gnu-emacs@gnu.org>
2015-01-03 2:25 ` Emanuel Berg
2015-01-04 0:19 ` Artur Malabarba
[not found] ` <mailman.17204.1420330787.1147.help-gnu-emacs@gnu.org>
2015-01-05 21:16 ` Emanuel Berg
2015-01-08 20:53 ` Artur Malabarba
2015-01-03 2:31 ` Emanuel Berg
2014-07-23 21:37 when you gotta have a variable value for a symbol name Buchs, Kevin J.
2014-07-23 22:02 ` Drew Adams
[not found] ` <(message>
[not found] ` <from>
[not found] ` <Raffaele>
[not found] ` <Emanuel>
[not found] ` <Marcin>
[not found] ` <Drew>
[not found] ` <Adams>
[not found] ` <on>
[not found] ` <Sat>
[not found] ` <Tue>
[not found] ` <03>
[not found] ` <17>
[not found] ` <May>
[not found] ` <2016>
[not found] ` <01:29:37>
[not found] ` <Mon>
[not found] ` <24>
[not found] ` <Nov>
[not found] ` <2020>
[not found] ` <17:07:29>
[not found] ` <-0800>
[not found] ` <29>
[not found] ` <Wed>
[not found] ` <14>
[not found] ` <Jan>
[not found] ` <2018>
[not found] ` <04:04:52>
[not found] ` <2015>
[not found] ` <02:32:50>
[not found] ` <23>
[not found] ` <Jul>
[not found] ` <2014>
[not found] ` <15:02:38>
[not found] ` <-0700>
[not found] ` <17:40:42>
[not found] ` <Sun>
[not found] ` <Robert>
[not found] ` <Barry>
2014-07-24 21:57 ` Robert Thorpe
2014-07-25 0:06 ` Drew Adams
[not found] ` <mailman.5936.1406152985.1147.help-gnu-emacs@gnu.org>
2014-07-23 22:12 ` Pascal J. Bourguignon
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=877fykgsde.fsf@vsl28t2g.ww011 \
--to=dieter@duenenhof-wilhelm.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).