From: Julian Assange <proff@iq.org>
Cc: ding@gnus.org
Subject: Re: Article headers & virtual windows
Date: 05 Dec 1998 05:33:46 +0100 [thread overview]
Message-ID: <wxd85z5hsl.fsf@yoshi.iq.org> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "02 Dec 1998 03:45:13 +0100"
Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
> But the thing is that an Emacs frame with more than two windows in it
> sucks, because `C-x o' doesn't really do what you want it to and
> stuff.
I often use frames with 4+ windows. The below is probably what you
want (though, I've only tested it with xemacs thus far).
;; change-windows-intuitively.el (c) 1998 Julian Assange <proff@iq.org>
;; move around (x)emacs windows intuitively (e.g
;; take me to the window to the immediate left/right/top/bottem of
;; the current one)
;;
;; TODO move relative to the cursor, rather than relative
;; to the currently selected window (which in some
;; circumstances i.e when you have a lot of different size
;; windows stacked near each other, is is more intuitive).
;;
;; uncomment the following keybindings if you like them -
;; note however that shift+arrow keys may not be bindable
;; on your terminal (e.g if you are not running X)
;; (global-set-key [(shift left)] 'proff-select-window-left)
;; (global-set-key [(shift right)] 'proff-select-window-right)
;; (global-set-key [(shift up)] 'proff-select-window-up)
;; (global-set-key [(shift down)] 'proff-select-window-down)
(defun proff-find-window-down (win)
(let ((swin))
(walk-windows
(lambda (wwin)
(and (<= (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(> (nth 2 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(> (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(or (not swin)
(< (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges swin))))
(setq swin wwin)))
t 'visible)
swin))
(defun proff-select-window-down ()
(interactive)
(let ((win (proff-find-window-down (selected-window))))
(if win (select-window win))))
(defun proff-find-window-up (win)
(let ((swin))
(walk-windows
(lambda (wwin)
(and (<= (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(> (nth 2 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(< (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(or (not swin)
(> (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges swin))))
(setq swin wwin)))
t 'visible)
swin))
(defun proff-select-window-up ()
(interactive)
(let ((win (proff-find-window-up (selected-window))))
(if win (select-window win))))
(defun proff-find-window-left (win)
(let ((swin))
(walk-windows
(lambda (wwin)
(and (<= (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(> (nth 3 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(< (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(or (not swin)
(> (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges swin))))
(setq swin wwin)))
t 'visible)
swin))
(defun proff-select-window-left ()
(interactive)
(let ((win (proff-find-window-left (selected-window))))
(if win (select-window win))))
(defun proff-find-window-right (win)
(let ((swin))
(walk-windows
(lambda (wwin)
(and (<= (nth 1 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(> (nth 3 (window-pixel-edges wwin))
(nth 1 (window-pixel-edges win)))
(> (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges win)))
(or (not swin)
(< (nth 0 (window-pixel-edges wwin))
(nth 0 (window-pixel-edges swin))))
(setq swin wwin)))
t 'visible)
swin))
(defun proff-select-window-right ()
(interactive)
(let ((win (proff-find-window-right (selected-window))))
(if win (select-window win))))
next prev parent reply other threads:[~1998-12-05 4:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-02 2:45 Lars Magne Ingebrigtsen
1998-12-02 4:58 ` Matt Simmons
1998-12-02 17:12 ` Lars Magne Ingebrigtsen
1998-12-02 18:38 ` Hrvoje Niksic
1998-12-03 6:33 ` Matt Simmons
1998-12-03 7:34 ` Hrvoje Niksic
1998-12-05 15:49 ` Matt Simmons
1998-12-05 17:36 ` Lars Magne Ingebrigtsen
1999-01-02 6:04 ` Matt Simmons
1999-01-03 13:03 ` Lars Magne Ingebrigtsen
1998-12-03 14:31 ` Sean Doran
1998-12-02 16:57 ` Hrvoje Niksic
1998-12-02 18:27 ` Lars Magne Ingebrigtsen
1998-12-02 19:01 ` Lars Balker Rasmussen
1998-12-02 19:20 ` Lars Magne Ingebrigtsen
1998-12-02 19:13 ` Lars Magne Ingebrigtsen
1998-12-05 4:33 ` Julian Assange [this message]
1998-12-07 22:06 ` Lars Magne Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wxd85z5hsl.fsf@yoshi.iq.org \
--to=proff@iq.org \
--cc=ding@gnus.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 NNTP newsgroup(s).