GNU bug report logs - #12476
no startup hook corresponding to gnus-suspend-gnus-hook

Previous Next

Package: gnus;

Reported by: sds <at> gnu.org

Date: Wed, 19 Sep 2012 18:18:01 UTC

Severity: normal

Tags: wontfix

Found in version 5.13

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: no startup hook corresponding to gnus-suspend-gnus-hook
Date: Wed, 19 Sep 2012 14:16:20 -0400
Gnus v5.13
GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
 of 2012-09-14 on t520sds

I use these settings to ensure that gnus saves and restores the window
configuration:
--8<---------------cut here---------------start------------->8---
(defvar sds-window-configuration)
(defun sds-window-configuration-save ()
  (setq sds-window-configuration (current-window-configuration)))
(defun sds-window-configuration-restore ()
  (set-window-configuration sds-window-configuration))
(add-hook 'gnus-after-exiting-gnus-hook 'sds-window-configuration-restore)
(add-hook 'gnus-suspend-gnus-hook 'sds-window-configuration-restore)
(add-hook 'gnus-before-startup-hook 'sds-window-configuration-save)
--8<---------------cut here---------------end--------------->8---
alas, `gnus-before-startup-hook' is not run by `gnus' if it is already
alive, i.e., after `gnus-group-suspend'.
this means that when I syspend gnus, I get the window configuration
which was saved when I first started `gnus'.

I wish there were a better way to save-restore the window configuration,
than redefining gnus:
--8<---------------cut here---------------start------------->8---
(defun sds-gnus (&rest args)
  (let ((wc (current-window-configuration)))
    (ignore-errors (apply #'gnus args))
    (set-window-configuration wc)))
--8<---------------cut here---------------end--------------->8---

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://truepeace.org http://dhimmi.com
http://thereligionofpeace.com http://camera.org http://openvotingconsortium.org
Booze is the answer. I can't remember the question.




This bug report was last modified 12 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.