* [patch] CVS gnus-group.el: Even quicker select group
@ 2003-08-18 20:30 Jari Aalto+mail.linux
2003-08-19 5:02 ` Kevin Greiner
0 siblings, 1 reply; 3+ messages in thread
From: Jari Aalto+mail.linux @ 2003-08-18 20:30 UTC (permalink / raw)
Here is improvement to the quick select feature. The new variable
should be added to manual as well.
Jari
2003-08-18 Jari Aalto <jari.aalto@poboxes.com>
* 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-variable-suppress): New support
macro.
(gnus-group-quick-select-group): Use new variable
`gnus-group-quick-select-ignore-variable-list'.
--- gnus-group.el 2003-08-18 23:24:06.000000000 +0300
+++ gnus-group.el.b 2003-08-18 23:16:48.000000000 +0300
@@ -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")
@@ -1885,6 +1906,16 @@
(forward-line -1))
(gnus-group-read-group all t))
+(put 'gnus-group-quick-select-group-variable-suppress
+ 'lisp-indent-function 1)
+(defmacro gnus-group-quick-select-group-variable-suppress
+ (symbols &rest body)
+ "Suppress SYMBOLS by setting their values locally to nil."
+ (ignore-errors
+ (setq symbols (symbol-value symbols)))
+ `(let ,symbols
+ ,@body))
+
(defun gnus-group-quick-select-group (&optional all)
"Select the current group \"quickly\".
This means that no highlighting or scoring will be performed.
@@ -1892,14 +1923,14 @@
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-quick-select-group-variable-suppress
+ gnus-group-quick-select-ignore-variable-list
(gnus-group-read-group all t)))
(defun gnus-group-visible-select-group (&optional all)
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] CVS gnus-group.el: Even quicker select group
2003-08-18 20:30 [patch] CVS gnus-group.el: Even quicker select group Jari Aalto+mail.linux
@ 2003-08-19 5:02 ` Kevin Greiner
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Greiner @ 2003-08-19 5:02 UTC (permalink / raw)
letters@hotpop.com (Jari Aalto+mail.linux) writes:
> Here is improvement to the quick select feature. The new variable
> should be added to manual as well.
>
> Jari
>
> 2003-08-18 Jari Aalto <jari.aalto@poboxes.com>
>
> * 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-variable-suppress): New support
> macro.
> (gnus-group-quick-select-group): Use new variable
> `gnus-group-quick-select-ignore-variable-list'.
>
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?
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] CVS gnus-group.el: Even quicker select group
@ 2003-08-19 18:26 Jari Aalto+mail.linux
0 siblings, 0 replies; 3+ messages in thread
From: Jari Aalto+mail.linux @ 2003-08-19 18:26 UTC (permalink / raw)
Kevin Greiner <kgreiner <at> 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 <jari.aalto@poboxes.com>
* 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-19 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 20:30 [patch] CVS gnus-group.el: Even quicker select group Jari Aalto+mail.linux
2003-08-19 5:02 ` Kevin Greiner
2003-08-19 18:26 Jari Aalto+mail.linux
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).