Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* getting fancy splitting instead of splitting
@ 2006-12-20 19:28 Bill Harris
  2006-12-20 21:31 ` Kai Großjohann
       [not found] ` <mailman.2161.1166650342.2155.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Bill Harris @ 2006-12-20 19:28 UTC (permalink / raw)


I'm totally confused at this point.  Something happened with my nntp
server late last week.  In the process of fixing that (adding alternate
servers and an nntp timeout), I apparently did something unfortunate to
my Gnus (v5.10.6) configuration, and then we lost power for a day in the
middle of my troubleshooting, so my knowledge of exactly what changed is
a bit fuzzy.  I did have backups of my old .emacs and .gnus, and I did
restore those and then try adding only the new nntp servers and
timeout.  

I used to have normal splitting set up to put various emails where they
belonged.  I had tried spam-stat.el ages ago and then given up on it, so
fancy splitting was turned on for a bit a couple of years ago and then
turned off, or so I think.

Now every time I start gnus, I end up with fancy splitting, which, since
it's not set up, doesn't do anything except pass everything through to
mail.misc. 

nnmail-split-methods is set in customize to an alist that seems correct.

nnmail-prepare-incoming-message-hook was set to
spam-stat-store-current-buffer, but I customized it to empty.

gnus-install-group-spam-parameters was set to on, but I customized it to
nil.  

spam-stat-install-hooks was set to on, but I customized it to nil.

When I run 'B t' on an article in mail.misc that should go to a certain
group, I get 

,----
| (: spam-stat-split-fancy)
| "mail.misc"
`----

I presume this means fancy splitting is somehow turned on, but I don't
have any idea how.  Can anyone help?

I checked my .emacs and .gnus for things that might call fancy splitting
and don't see anything:

,----[ bash transcript ]
| Bill Harris@Villingen /c
| $ grep spam .emacs
|  '(gnus-install-group-spam-parameters nil)
|  '(spam-stat-install-hooks nil)
| 
| Bill Harris@Villingen /c
| $ grep spam .gnus
| ;; Spam-stat from http://www.bloomington.in.us/~brutt/gnus-spam-stat.html
| ;; Following spam-stat section commented out 2006-12-20
| ;;;   (require 'spam-stat)
| ;;;   (when (file-exists-p spam-stat-file)
| ;;;     (spam-stat-load))
| ;;;   (setq spam-stat-split-fancy-spam-group "spam")
| ;;;   (defun my-spam-stat-learn ()
| ;;;     "Learn about my spam and non-spam"
| ;;;       (spam-stat-process-spam-directory "~/Mail/spam")
| ;;; ;;      (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
| ;;;             (spam-stat-process-non-spam-directory
| ;;;       (spam-stat-reduce-size)
| ;;;       (spam-stat-save)
| ;;;       (message "my-spam-stat-learn:  started at %s, ended at %s"
| ;;            (spam-stat-process-non-spam-directory
|      ;; from the manual "Splitting mail using spam-stat"
| ;;;           `(| (: spam-stat-split-fancy)
| ;; moved from before spam-stat 2005-01-13 to try to keep .gnus running to end
| 
| Bill Harris@Villingen /c
| $ 
`----

,----[ bash transcript ]
| Bill Harris@Villingen /c
| $ grep fancy .emacs
| ;; setup fancy diary display
|      (setq diary-display-hook 'fancy-diary-display)
| 
| Bill Harris@Villingen /c
| $ grep fancy .gnus
| ;;;   (setq spam-stat-split-fancy-spam-group "spam")
| ;;;     (setq nnmail-split-fancy
| ;;;           `(| (: spam-stat-split-fancy)
| ;; (setq nnmail-split-methods 'nnmail-split-fancy) ; commented out 2006-12-19
| 
| Bill Harris@Villingen /c
| $ 
`----

I have gotten splitting to work on occasion yesterday and today.  I
think it had to do with resetting the variables I mentioned above in
Customize, but it all goes away when I restart emacs and then gnus.

I think the key variable to customize to make splitting work is
nnmail-split-fancy; it keeps coming back.  When I start Gnus, I see
something in the minibuffer about starting spam-stat; is it possible
that some function is turning fancy splitting back on?  Any suggestions
on where I can find that?  I suspect it's something I've customized.

Thanks,

Bill
-- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
  2006-12-20 19:28 getting fancy splitting instead of splitting Bill Harris
@ 2006-12-20 21:31 ` Kai Großjohann
       [not found] ` <mailman.2161.1166650342.2155.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2006-12-20 21:31 UTC (permalink / raw)


The thing that turns on fancy splitting is nnmail-split-methods being
set to nnmail-split-fancy.

What does C-h v nnmail-split-methods RET say after you have started
Gnus and observed that it splits fancily?  If it says
nnmail-split-fancy, then you "only" have to find out why...

Kai

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
       [not found] ` <mailman.2161.1166650342.2155.info-gnus-english@gnu.org>
@ 2006-12-21 19:06   ` Bill Harris
  2006-12-21 23:45     ` Kai Großjohann
       [not found]     ` <mailman.2205.1166744736.2155.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Bill Harris @ 2006-12-21 19:06 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kai@emptydomain.de (Kai Großjohann) writes:

> The thing that turns on fancy splitting is nnmail-split-methods being
> set to nnmail-split-fancy.

I thought so.

> What does C-h v nnmail-split-methods RET say after you have started
> Gnus and observed that it splits fancily?  If it says
> nnmail-split-fancy, then you "only" have to find out why...

Before starting Gnus, it was a list of rules as I've been using for
quite some time (months or years).  After starting Gnus, it was, as you
suspected, nnmail-split-fancy.  

I like the use of "only"; any tips on making that easy enough to avoid
needing quotation marks?  :-)

In customize-group nnmail-split, I see that nnmail-split-methods is now
set to nnmail-split-fancy, and it says "this option has been changed
outside the customize buffer."  I thought the only custom code that
would be executed when I started Gnus would be .gnus (or be controlled
by .gnus), and searching my .gnus for split gives

,----
| Bill Harris@Villingen /c
| $ grep split .gnus
| ;;;   (setq spam-stat-split-fancy-spam-group "spam")
| ;;;     (setq nnmail-split-fancy
| ;;;           `(| (: spam-stat-split-fancy)
| ;; (setq nnmail-split-methods 'nnmail-split-fancy) ; commented out 2006-12-19
| 
| Bill Harris@Villingen /c
| $ 
`----

";" does mean comment, right?

I think I do see that the first thing that shows up in the mini-buffer
when I start Gnus is something like "loading c:/..../spam-stat.el", but
I have no idea why.

TIA,

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: For more information, see http://www.gnupg.org

iD8DBQFFits53J3HaQTDvd8RAisAAJ43eM43fJ/TTfQPFI7eKytaFRPj6gCggZ2N
Ieyp75fM+xR/tYkDodr1gQU=
=auQJ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
  2006-12-21 19:06   ` Bill Harris
@ 2006-12-21 23:45     ` Kai Großjohann
       [not found]     ` <mailman.2205.1166744736.2155.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2006-12-21 23:45 UTC (permalink / raw)


Bill Harris <bill_harris@facilitatedsystems.com> writes:

> kai@emptydomain.de (Kai Großjohann) writes:
>
>> What does C-h v nnmail-split-methods RET say after you have started
>> Gnus and observed that it splits fancily?  If it says
>> nnmail-split-fancy, then you "only" have to find out why...
>
> Before starting Gnus, it was a list of rules as I've been using for
> quite some time (months or years).  After starting Gnus, it was, as you
> suspected, nnmail-split-fancy.  
>
> I like the use of "only"; any tips on making that easy enough to avoid
> needing quotation marks?  :-)

I have no silver bullet.  Idea:

(message "split is %s" nnmail-split-methods)
(sleep-for 3)

The above snippet can be used in various places during Emacs startup
and then you can see how the variable evolves.

Obvious places are ~/.emacs and ~/.gnus, and I'd try the beginning and
the end first.

I hope that it happens from one of these two files.  If it doesn't,
then (mapcar 'car load-history) (evaluate it with M-: or by typing it
into the *scratch* buffer and then hitting C-j, or by way of M-x ielm
RET) gives you a list of files that Emacs has loaded.

Please report your findings.  I'll try to come up with useful advice
depending on those findings.

Apologies if all of this was obvious.

Kai

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
       [not found]     ` <mailman.2205.1166744736.2155.info-gnus-english@gnu.org>
@ 2006-12-22  4:49       ` Bill Harris
  2006-12-23  1:58       ` Bill Harris
  1 sibling, 0 replies; 8+ messages in thread
From: Bill Harris @ 2006-12-22  4:49 UTC (permalink / raw)


kai@emptydomain.de (Kai Großjohann) writes:

> I have no silver bullet.  Idea:
>
> (message "split is %s" nnmail-split-methods)
> (sleep-for 3)

> Obvious places are ~/.emacs and ~/.gnus, and I'd try the beginning and
> the end first.

I'll try them out and then let you know.  I think the ~/.emacs idea is
less likely to help, for I've seen that nnmail-split-methods is
correctly set to a list of lists _before_ I start Gnus.

> Apologies if all of this was obvious.

Not at all.  Perhaps it should have been, but my elisp skills are
largely in reading, at best.

Thanks,

Bill
-- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
       [not found]     ` <mailman.2205.1166744736.2155.info-gnus-english@gnu.org>
  2006-12-22  4:49       ` Bill Harris
@ 2006-12-23  1:58       ` Bill Harris
  2006-12-23 18:09         ` Kai Großjohann
       [not found]         ` <mailman.2261.1166897435.2155.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 8+ messages in thread
From: Bill Harris @ 2006-12-23  1:58 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kai@emptydomain.de (Kai Großjohann) writes:

> (message "split is %s" nnmail-split-methods)
> (sleep-for 3)

As I understand it, that should pause for 3 seconds, displaying "split
is <somethingorother>" in the minibuffer, right?

When I put it in my .gnus in several places -- beginning, middle, near
the end -- I don't see any messages.  

When I put it near the beginning of my .emacs, I get

,----
| (C:\emacs\emacs-21.3\bin\emacs.exe)
| 
| 
| An error has occurred while loading `c:/.emacs':
| 
| Symbol's value as variable is void: nnmail-split-methods
| 
| To ensure normal operation, you should investigate the cause
| of the error in your initialization file and remove it.  Start
| Emacs with the `--debug-init' option to view a complete error
| backtrace
`----

When I put it late enough in my .emacs, I still don't see anything, but
it at least runs.

After Emacs is fully loaded, nnmail-split-methods has a value that's a
list of lists for splitting.  

When I start Gnus, I still don't see the display, but
nnmail-split-methods ends up being set to nnmail-split-fancy.

Afterwards, (mapcar 'car load-history) gives a list that's not too
meaningful:

("dabbrev" "newcomment" "bbdb-gui" "bbdb-hooks" "gnus-cite" "gnus-async"
"gnus-bcklg" "gnus-ml" "gnus-topic" "nnfolder" "nndoc" "pop3" ...)

given that it's truncated.

I then looked at the value of load-history.  While it's 2207 lines long,
searching for spam-stat turned up

,----
|   (autoload . nnvirtual-find-group-art)
|   gnus-cache-open gnus-cache-close gnus-cache-save-buffers gnus-cache-possibly-enter-article gnus-cache-enter-remove-article gnus-cache-possibly-remove-articles gnus-cache-possibly-remove-articles-1 gnus-cache-request-article gnus-cache-possibly-alter-active gnus-cache-retrieve-headers gnus-cache-enter-article gnus-cache-remove-article gnus-cached-article-p gnus-summary-insert-cached-articles gnus-summary-limit-include-cached gnus-cache-change-buffer gnus-cache-member-of-class gnus-cache-file-name gnus-cache-update-article gnus-cache-possibly-remove-article gnus-cache-articles-in-group gnus-cache-braid-nov gnus-cache-braid-heads gnus-jog-cache gnus-cache-read-active gnus-cache-write-active gnus-cache-possibly-update-active gnus-cache-update-active gnus-cache-generate-active gnus-cache-generate-nov-databases gnus-cache-move-cache gnus-cache-fully-p
|   (provide . gnus-cache))
|  ("c:/.gnus.elc"
|   (require . spam-stat)
|   my-spam-stat-learn)
|  ("c:/.spam-stat.el")
|  ("spam-stat" spam-stat-file spam-stat-install-hooks spam-stat-unknown-word-score spam-stat-max-word-length spam-stat-max-buffer-length spam-stat-split-fancy-spam-group spam-stat-split-fancy-spam-threshhold spam-stat-syntax-table spam-stat-dirty spam-stat-buffer spam-stat-buffer-name spam-stat-store-current-buffer spam-stat-store-gnus-article-buffer spam-stat spam-stat-ngood spam-stat-nbad spam-stat-good spam-stat-bad spam-stat-score spam-stat-set-good spam-stat-set-bad spam-stat-set-score spam-stat-make-entry spam-stat-compute-score with-spam-stat-max-buffer-size spam-stat-buffer-words spam-stat-buffer-is-spam spam-stat-buffer-is-non-spam spam-stat-buffer-change-to-spam spam-stat-buffer-change-to-non-spam spam-stat-save spam-stat-load spam-stat-to-hash-table spam-stat-reset spam-stat-score-data spam-stat-score-word spam-stat-buffer-words-with-scores spam-stat-score-buffer spam-stat-split-fancy spam-stat-process-directory spam-stat-process-spam-directory spam-stat-process-non-spam-directory spam-stat-count spam-stat-test-directory spam-stat-reduce-size spam-stat-install-hooks-function spam-stat-unload-hook
|   (provide . spam-stat))
`----

in the early part.  It appears as if it's picking up an older, compiled
.gnus.elc instead of my .gnus.  I'll delete that and try again.

... and that worked!  I thought Emacs took the latest version, compiled
or not.  Perhaps it only compares .el and .elc files, not .gnus and
.gnus.elc files?

At any rate, the suggestion to look at load-history was just what I
needed; thanks!  Assuming I don't find anything else strange, I think
I'm back and running again.

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: For more information, see http://www.gnupg.org

iD8DBQFFjI023J3HaQTDvd8RAnW0AJ9u2NE3VCX477xBUI+f/k35ftxRrgCeILpC
MtnIDoBRHQytkyaBlhBh/yA=
=T6HF
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
  2006-12-23  1:58       ` Bill Harris
@ 2006-12-23 18:09         ` Kai Großjohann
       [not found]         ` <mailman.2261.1166897435.2155.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2006-12-23 18:09 UTC (permalink / raw)


Bill Harris <bill_harris@facilitatedsystems.com> writes:

> kai@emptydomain.de (Kai Großjohann) writes:
>
>> (message "split is %s" nnmail-split-methods)
>> (sleep-for 3)
>
> As I understand it, that should pause for 3 seconds, displaying "split
> is <somethingorother>" in the minibuffer, right?

Yes, but I forgot about the unbound case.

> When I put it near the beginning of my .emacs, I get [an error][...]

Ah, I forgot that case.  One could say (if (boundp
'nnmail-split-methods) nnmail-split-methods "unbound") instead of just
nnmail-split-methods in the statement.

> When I put it late enough in my .emacs, I still don't see anything, but
> it at least runs.

How come you don't see anything?  Weird.  Does it help to use sit-for
instead of sleep-for?  Does it help to say (redraw-display) before
(sleep-for 3) or (sit-for 3)?

Ick.  I should be testing this.

> Afterwards, (mapcar 'car load-history) gives a list that's not too
> meaningful: [...]  given that it's truncated.

I just tried it, and M-x ielm RET doesn't truncate.

> in the early part.  It appears as if it's picking up an older, compiled
> .gnus.elc instead of my .gnus.  I'll delete that and try again.
>
> ... and that worked!  I thought Emacs took the latest version, compiled
> or not.  Perhaps it only compares .el and .elc files, not .gnus and
> .gnus.elc files?

Yes, Emacs uses *.elc even if *.el is newer.  It then helpfully prints
"(source file is newer)" in the echo area (minibuffer).

> At any rate, the suggestion to look at load-history was just what I
> needed; thanks!  Assuming I don't find anything else strange, I think
> I'm back and running again.

I'm happy that it works now.  Apologies for the clumsy help.

Kai

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: getting fancy splitting instead of splitting
       [not found]         ` <mailman.2261.1166897435.2155.info-gnus-english@gnu.org>
@ 2006-12-26  6:40           ` Bill Harris
  0 siblings, 0 replies; 8+ messages in thread
From: Bill Harris @ 2006-12-26  6:40 UTC (permalink / raw)


kai@emptydomain.de (Kai Großjohann) writes:

> Ah, I forgot that case.  One could say (if (boundp
> 'nnmail-split-methods) nnmail-split-methods "unbound") instead of just
> nnmail-split-methods in the statement.

That makes sense.  If I had taken more time, I might have come up with
that and tried it.

> How come you don't see anything?  Weird.  Does it help to use sit-for
> instead of sleep-for?  Does it help to say (redraw-display) before
> (sleep-for 3) or (sit-for 3)?
>
> Ick.  I should be testing this.

I didn't take the time to test it today, but I can say that, once I
erased my .gnus.elc, I did see the display in the minibuffer for the
statements in .gnus.

>> Afterwards, (mapcar 'car load-history) gives a list that's not too
>> meaningful: [...]  given that it's truncated.
>
> I just tried it, and M-x ielm RET doesn't truncate.

Ah.  Thanks.  Both C-j and C-e do from *scratch*.

> I'm happy that it works now.  Apologies for the clumsy help.

NP.  That was just what I needed to solve the problem, and I learned a
few things along the way.  Thanks!

MfG,

Bill
-- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-12-26  6:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-20 19:28 getting fancy splitting instead of splitting Bill Harris
2006-12-20 21:31 ` Kai Großjohann
     [not found] ` <mailman.2161.1166650342.2155.info-gnus-english@gnu.org>
2006-12-21 19:06   ` Bill Harris
2006-12-21 23:45     ` Kai Großjohann
     [not found]     ` <mailman.2205.1166744736.2155.info-gnus-english@gnu.org>
2006-12-22  4:49       ` Bill Harris
2006-12-23  1:58       ` Bill Harris
2006-12-23 18:09         ` Kai Großjohann
     [not found]         ` <mailman.2261.1166897435.2155.info-gnus-english@gnu.org>
2006-12-26  6:40           ` Bill Harris

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).