all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman" <lennart.borgman@gmail.com>
To: "Volkan YAZICI" <volkan.yazici@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Persistent Window Registers
Date: Wed, 7 Jan 2009 23:26:39 +0100	[thread overview]
Message-ID: <e01d8a50901071426k4c173654i55f053773070fa7f@mail.gmail.com> (raw)
In-Reply-To: <9e107126-498c-4b68-b354-427d2e1ce94b@u18g2000pro.googlegroups.com>

On Wed, Jan 7, 2009 at 2:03 PM, Volkan YAZICI <volkan.yazici@gmail.com> wrote:
> On Jan 5, 12:50 pm, "Lennart Borgman" <lennart.borg...@gmail.com>
> wrote:
>> See winsav.el in nXhtml
>
> After spending some time, I found out that there is no easy way to
> save window configurations. Instead, as nXhtml, people


Hi Volkan,
I am not sure what you mean and it is a long time since I wrote
winsav.el. Are the things you need missing in winsav.el?


> 1. Walk through available window configurations they are interested
> in,
>
> 2. Copy attributes (buffer name, buffer start/end position, etc.) of
> the walked windows,
>
> And in later sessions, using saved window attributes
>
> 3. Open same buffers one by one in specific windows,
>
> 4. Then resize opened windows according to the saved attributes.
>
> On Jan 4, 6:10 pm, Volkan YAZICI <volkan.yaz...@gmail.com> wrote:
>> - C-x r j 1 (*Group*)
>> - C-x r j 2 (#postgresql and #lisp buffers divided vertically)
>
> To summarize, here is the solution I came up with:
>
> (defun erc-register-window-configuration ()
>  "Register vertically split `#postgresql' and `#lisp' channel windows
> into
> configuration 2."
>  (let ((psql-buf (get-buffer "#postgresql"))
>        (lisp-buf (get-buffer "#lisp")))
>    (cond ((and psql-buf lisp-buf)
>           (switch-to-buffer psql-buf)
>           (delete-other-windows)
>           (recenter)
>           (select-window (split-window-horizontally))
>           (switch-to-buffer lisp-buf)
>           (recenter)
>           (window-configuration-to-register ?2))
>          (t (warn "Couldn't find buffers `#postgresql' and `#lisp'.")))))
>
> (add-hook 'erc-join-hook 'erc-register-window-configuration)
>
> (defun gnus-register-window-configuration ()
>  "Register a whole `*Group*' buffer window into configuration 1."
>  (let ((group-buf (get-buffer "*Group*")))
>    (when group-buf
>      (switch-to-buffer group-buf)
>      (delete-other-windows)
>      (beginning-of-buffer)
>      (window-configuration-to-register ?1))))
>
> (add-hook 'gnus-started-hook 'gnus-register-window-configuration)
>
>
> Regards.
>




  reply	other threads:[~2009-01-07 22:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 16:10 Persistent Window Registers Volkan YAZICI
2009-01-05 10:17 ` Volkan YAZICI
2009-01-05 10:50   ` Lennart Borgman
     [not found]   ` <mailman.3999.1231152658.26697.help-gnu-emacs@gnu.org>
2009-01-07 13:03     ` Volkan YAZICI
2009-01-07 22:26       ` Lennart Borgman [this message]
     [not found]       ` <mailman.4299.1231367204.26697.help-gnu-emacs@gnu.org>
2009-01-08  6:48         ` Volkan YAZICI
2009-01-08  7:50 ` Volkan YAZICI

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=e01d8a50901071426k4c173654i55f053773070fa7f@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=volkan.yazici@gmail.com \
    /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.
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.