From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53772 Path: main.gmane.org!not-for-mail From: letters@hotpop.com (Jari Aalto+mail.linux) Newsgroups: gmane.emacs.gnus.general Subject: Re: [patch] CVS gnus-group.el: Even quicker select group Date: Tue, 19 Aug 2003 21:26:39 +0300 Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1061317219 6890 80.91.224.253 (19 Aug 2003 18:20:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2003 18:20:19 +0000 (UTC) Original-X-From: ding-owner+M2313@lists.math.uh.edu Tue Aug 19 20:20:18 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19pB5d-0000mk-00 for ; Tue, 19 Aug 2003 20:20:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19pB4c-0005Yv-00; Tue, 19 Aug 2003 13:19:14 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19pB4Y-0005Yq-00 for ding@lists.math.uh.edu; Tue, 19 Aug 2003 13:19:10 -0500 Original-Received: (qmail 5479 invoked by alias); 19 Aug 2003 18:19:10 -0000 Original-Received: (qmail 5474 invoked from network); 19 Aug 2003 18:19:10 -0000 Original-Received: from fep01-0.kolumbus.fi (HELO fep01-app.kolumbus.fi) (193.229.0.41) by sclp3.sclp.com with SMTP; 19 Aug 2003 18:19:10 -0000 Original-Received: from poboxes.com ([81.197.1.6]) by fep01-app.kolumbus.fi with ESMTP id <20030819181908.DPZI15160.fep01-app.kolumbus.fi@poboxes.com> for ; Tue, 19 Aug 2003 21:19:08 +0300 Original-To: ding@gnus.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/20.7 (windows-nt) (i386-*-nt5.0.2195) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53772 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53772 Kevin Greiner xpediantsolutions.com> I do believe that macros are expanded at compile-time rather than run-time. Doesn't that mean that I'll have to recompile gnus-group.el for any customization to gnus-group-quick-select-ignore-variable-list to take effect? If so, is that the behavior that you wanted? Good point. I think this solves it: 2003-08-18 Jari Aalto * gnus-group.el (gnus-group-quick-select-ignore-variable-list): New user variable. More user controllable quickiness to select the group. (gnus-group-quick-select-group): Use new variable `gnus-group-quick-select-ignore-variable-list'. Prereq: 6.115 Index: gnus-group.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-group.el,v retrieving revision 6.115 diff -u -IId: -u -b -w -r6.115 gnus-group.el --- gnus-group.el 4 Aug 2003 21:53:44 -0000 6.115 +++ gnus-group.el 19 Aug 2003 18:17:34 -0000 @@ -77,6 +77,27 @@ (const best) (sexp :tag "other" t))) +(defcustom gnus-group-quick-select-ignore-variable-list + '(gnus-visual + gnus-score-find-score-files-function + gnus-home-score-file + gnus-apply-kill-hook + gnus-summary-expunge-below) + "List of variables to set to nil during `gnus-group-quick-select-group'. + +The fefault value is: + + '(gnus-visual + gnus-score-find-score-files-function + gnus-home-score-file + gnus-apply-kill-hook + gnus-summary-expunge-below) + +But you might want to add also variable `gnus-use-scoring'. To maximize +speed you could also add `gnus-show-threads'." + :group 'gnus-group-various + :type 'list) + (defcustom gnus-group-goto-unread t "*If non-nil, movement commands will go to the next unread and subscribed group." :link '(custom-manual "(gnus)Group Maneuvering") @@ -1892,15 +1913,28 @@ buffer. This might be useful if you want to toggle threading -before entering the group." +before entering the group. + +The variables that are set to nil are listed in +`gnus-group-quick-select-ignore-variable-list'." (interactive "P") (require 'gnus-score) - (let (gnus-visual - gnus-score-find-score-files-function - gnus-home-score-file - gnus-apply-kill-hook - gnus-summary-expunge-below) - (gnus-group-read-group all t))) + (let (saved) + (unwind-protect + (progn + (dolist (var gnus-group-quick-select-ignore-variable-list) + ;; If user makes a mistake and gives a variable that + ;; doesn't exist, don't record it. + (when (boundp var) + (let ((val (symbol-value var))) + (push (list var var) saved) + ;; Unwind this! + (set var nil)))) + (gnus-group-read-group all t)) + (dolist (elt saved) + (multiple-value-bind (var val) + elt + (set var val)))))) (defun gnus-group-visible-select-group (&optional all) "Select the current group without hiding any articles." -- http://tiny-tools.sourceforge.net/ Swatch @time http://www.mir.com.my/iTime/itime.htm http://www.ryanthiessen.com/swatch/resources.htm Use Licenses! http://www.linuxjournal.com/article.php?sid=6225 Which Licence? http://www.linuxjournal.com/article.php?sid=4825 OSI Licences http://www.opensource.org/licenses/