help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch a program in an arbitrary frame


From: Emanuel Berg
Subject: Re: launch a program in an arbitrary frame
Date: Sun, 19 Jul 2015 01:39:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> OK! This I once knew how to do. What you want is to
> push the window configuration to a register each
> time you open an article, and then have it restored
> with a global keystroke. Hang on, I'll find it...

Here is how you do it.

With this, save the window configuration with `C-x m',
and store it with `C-x l'. When you show an article
from the *Summary* buffer, it'll save automatically so
you just have to restore it when you are done reading
articles. Unless you load it, it doesn't save again.

(defvar *do-save-new* t)

(defun save-win-conf ()
  (interactive)
  (when *do-save-new*
    (window-configuration-to-register ?0) ))

(defun load-win-conf ()
  (interactive)
  (setq *do-save-new* t)
  (jump-to-register ?0) )

(global-set-key "\C-xm" 'save-win-conf)
(global-set-key "\C-xl" 'load-win-conf)

(defun gnus-summary-show-article-save-win-conf ()
  (interactive)
  (save-win-conf)
  (setq *do-save-new* nil)
  (call-interactively 'gnus-summary-show-article) )

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]