Gnus development mailing list
 help / color / mirror / Atom feed
* more on accessing the body via split rules...
@ 2001-05-18 15:15 Josh Huber
  2001-05-18 15:37 ` Josh Huber
  0 siblings, 1 reply; 18+ messages in thread
From: Josh Huber @ 2001-05-18 15:15 UTC (permalink / raw)


OK, so I've almost got it right.  gnus-original-article-buffer doesn't
seem to be set when gnus is reading spool files.  In this case it's
using the buffer < *nnmail incoming*>, whereas when you respool an
article it's using < *Original Article*>.

What should I do?  Shouldn't Gnus set this variable properly?
Actually, it appears that it's only when starting up Gnus for the
first time, as in:

xemacs -f gnus

I get a bunch of messages in the bogus group since my
(set-buffer gnus-original-article-buffer) fails.

Any help?

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-18 15:15 more on accessing the body via split rules Josh Huber
@ 2001-05-18 15:37 ` Josh Huber
  2001-05-18 16:12   ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Josh Huber @ 2001-05-18 15:37 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

> OK, so I've almost got it right.  gnus-original-article-buffer doesn't
> seem to be set when gnus is reading spool files.  In this case it's
> using the buffer < *nnmail incoming*>, whereas when you respool an
> article it's using < *Original Article*>.
> 
> What should I do?  Shouldn't Gnus set this variable properly?
> Actually, it appears that it's only when starting up Gnus for the
> first time, as in:
> 
> xemacs -f gnus

This is a lie.

It only fails on startup because nothing has created the < *Original
Article*> buffer yet.  When I was switching to this buffer is had a
different message in it, when reading spool files. (ouch)

The only case where gnus-original-article-buffer has the right value
is during re-spooling.

Just thought I'd mention that.

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-18 15:37 ` Josh Huber
@ 2001-05-18 16:12   ` Kai Großjohann
  2001-05-18 16:33     ` Josh Huber
  0 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2001-05-18 16:12 UTC (permalink / raw)


On 18 May 2001, Josh Huber wrote:

> The only case where gnus-original-article-buffer has the right value
> is during re-spooling.

So it seems that

  (or gnus-original-article-buffer (get-buffer " *nnmail incoming*"))

should do the trick?

kai
-- 
The passive voice should never be used.


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

* Re: more on accessing the body via split rules...
  2001-05-18 16:12   ` Kai Großjohann
@ 2001-05-18 16:33     ` Josh Huber
  2001-05-18 16:56       ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Josh Huber @ 2001-05-18 16:33 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> So it seems that
> 
>   (or gnus-original-article-buffer (get-buffer " *nnmail incoming*"))
> 
> should do the trick?

That's the first thing I thought of, except that the original article
buffer is still around for when I hit 'g' to re-read my spool files
again, so the variable is set *and* the buffer exists, but it has the
contents of some other message in it.

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-18 16:33     ` Josh Huber
@ 2001-05-18 16:56       ` Kai Großjohann
  2001-05-18 18:58         ` Josh Huber
  0 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2001-05-18 16:56 UTC (permalink / raw)


On 18 May 2001, Josh Huber wrote:

> That's the first thing I thought of, except that the original
> article buffer is still around for when I hit 'g' to re-read my
> spool files again, so the variable is set *and* the buffer exists,
> but it has the contents of some other message in it.

Gack.  That's bad.  Why don't you make a bug report that says that
there should be a variable pointing to the right buffer during
splitting.  Or that respooling should also use " *nnmail incoming*".

kai
-- 
The passive voice should never be used.


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

* Re: more on accessing the body via split rules...
  2001-05-18 16:56       ` Kai Großjohann
@ 2001-05-18 18:58         ` Josh Huber
  2001-05-18 19:16           ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Josh Huber @ 2001-05-18 18:58 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Gack.  That's bad.  Why don't you make a bug report that says that
> there should be a variable pointing to the right buffer during
> splitting.  Or that respooling should also use " *nnmail incoming*".

Right, it would make sense to me that the gnus-original-article-buffer
variable should be updated during splitting, and set back to the
previous value after splitting is done.

how does that sound?

I'll go submit a bug report now.  Maybe I'll look to see where the
relevant code is...

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-18 18:58         ` Josh Huber
@ 2001-05-18 19:16           ` Kai Großjohann
  2001-05-18 20:35             ` Josh Huber
  2001-05-18 21:07             ` Simon Josefsson
  0 siblings, 2 replies; 18+ messages in thread
From: Kai Großjohann @ 2001-05-18 19:16 UTC (permalink / raw)


On 18 May 2001, Josh Huber wrote:

> Right, it would make sense to me that the
> gnus-original-article-buffer variable should be updated during
> splitting, and set back to the previous value after splitting is
> done.
> 
> how does that sound?

I think that's not the right buffer, for gnus-original-article-buffer
is used when _displaying_ a message, not during splitting.  That is,
if you look at the *Article* buffer then you see a munged copy of the
contents of the original article buffer.

Maybe introduce a new variable nnmail-original-message-buffer?

kai
-- 
~/.signature: No such file or directory


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

* Re: more on accessing the body via split rules...
  2001-05-18 19:16           ` Kai Großjohann
@ 2001-05-18 20:35             ` Josh Huber
  2001-05-18 22:44               ` Kai Großjohann
  2001-05-18 21:07             ` Simon Josefsson
  1 sibling, 1 reply; 18+ messages in thread
From: Josh Huber @ 2001-05-18 20:35 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I think that's not the right buffer, for gnus-original-article-buffer
> is used when _displaying_ a message, not during splitting.  That is,
> if you look at the *Article* buffer then you see a munged copy of the
> contents of the original article buffer.
> 
> Maybe introduce a new variable nnmail-original-message-buffer?

Ok we could do that.  I just submitted a bug report, but like you said
it probably would be better to just to nnmail-original-message-buffer.

I included a diff to nnmail.el in the report...

where do those reports go? to this list?

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-18 19:16           ` Kai Großjohann
  2001-05-18 20:35             ` Josh Huber
@ 2001-05-18 21:07             ` Simon Josefsson
  2001-05-18 22:43               ` Kai Großjohann
  1 sibling, 1 reply; 18+ messages in thread
From: Simon Josefsson @ 2001-05-18 21:07 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> > Right, it would make sense to me that the
> > gnus-original-article-buffer variable should be updated during
> > splitting, and set back to the previous value after splitting is
> > done.
> > 
> > how does that sound?
> 
> I think that's not the right buffer, for gnus-original-article-buffer
> is used when _displaying_ a message, not during splitting.  That is,
> if you look at the *Article* buffer then you see a munged copy of the
> contents of the original article buffer.
> 
> Maybe introduce a new variable nnmail-original-message-buffer?

Yes, g-o-a-b is definitely wrong.  How about this?

	* nnmail.el (nnmail-incoming-buffer): New variable.
	(nnmail-split-incoming): Use it.

--- nnmail.el.~6.13.~	Sun May  6 02:15:16 2001
+++ nnmail.el	Fri May 18 23:00:36 2001
@@ -450,6 +450,8 @@
 (defvar nnmail-split-tracing nil)
 (defvar nnmail-split-trace nil)
 
+(defvar nnmail-incoming-buffer " *nnmail incoming*")
+
 \f
 
 (defconst nnmail-version "nnmail 1.0"
@@ -896,7 +898,7 @@
 				nnmail-split-methods)))
     (save-excursion
       ;; Insert the incoming file.
-      (set-buffer (get-buffer-create " *nnmail incoming*"))
+      (set-buffer (get-buffer-create nnmail-incoming-buffer))
       (erase-buffer)
       (let ((coding-system-for-read nnmail-incoming-coding-system))
 	(mm-insert-file-contents incoming))



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

* Re: more on accessing the body via split rules...
  2001-05-18 21:07             ` Simon Josefsson
@ 2001-05-18 22:43               ` Kai Großjohann
  2001-05-19  8:58                 ` Simon Josefsson
  0 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2001-05-18 22:43 UTC (permalink / raw)


On 18 May 2001, Simon Josefsson wrote:

> Yes, g-o-a-b is definitely wrong.  How about this?

Close, but Josh says that respooling uses the
gnus-original-article-buffer.  Does that also need changing?

kai
-- 
~/.signature: No such file or directory


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

* Re: more on accessing the body via split rules...
  2001-05-18 20:35             ` Josh Huber
@ 2001-05-18 22:44               ` Kai Großjohann
  0 siblings, 0 replies; 18+ messages in thread
From: Kai Großjohann @ 2001-05-18 22:44 UTC (permalink / raw)


On 18 May 2001, Josh Huber wrote:

> Ok we could do that.  I just submitted a bug report, but like you
> said it probably would be better to just to
> nnmail-original-message-buffer.
> 
> I included a diff to nnmail.el in the report...

Nice.  Hm.  Will have a look.

> where do those reports go? to this list?

No, but you can have a look at them by reading the group ding.bugs (or
so) from quimby.gnus.org.

kai
-- 
~/.signature: No such file or directory


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

* Re: more on accessing the body via split rules...
  2001-05-18 22:43               ` Kai Großjohann
@ 2001-05-19  8:58                 ` Simon Josefsson
  2001-05-19 11:20                   ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Simon Josefsson @ 2001-05-19  8:58 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> > Yes, g-o-a-b is definitely wrong.  How about this?
> 
> Close, but Josh says that respooling uses the
> gnus-original-article-buffer.  Does that also need changing?

I don't think so, respooling are Gnus summary buffer commands, and
they uses the same functions for retrieving articles as the displaying
commands does.  Nn* on the other hand shouldn't know about Gnus
internals, and in theory should even be possible to use without Gnus
(but that is not really tested, I think).  Hm, how is this a problem?
Doesn't nnmail copy the article into nnmail-incoming-buffer before
processing it, even when respooling?



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

* Re: more on accessing the body via split rules...
  2001-05-19  8:58                 ` Simon Josefsson
@ 2001-05-19 11:20                   ` Kai Großjohann
  2001-05-21 14:08                     ` Josh Huber
  0 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2001-05-19 11:20 UTC (permalink / raw)


On 19 May 2001, Simon Josefsson wrote:

> Hm, how is this a problem?  Doesn't nnmail copy the article into
> nnmail-incoming-buffer before processing it, even when respooling?

If this would happen, that would be good enough, I guess.  Then, split
rules wishing to access the message body can look in
nnmail-incoming-buffer.

Josh?

kai
-- 
~/.signature: No such file or directory


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

* Re: more on accessing the body via split rules...
  2001-05-19 11:20                   ` Kai Großjohann
@ 2001-05-21 14:08                     ` Josh Huber
  2001-05-21 14:30                       ` Kai Großjohann
  2001-05-21 17:29                       ` Simon Josefsson
  0 siblings, 2 replies; 18+ messages in thread
From: Josh Huber @ 2001-05-21 14:08 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> On 19 May 2001, Simon Josefsson wrote:
> 
> > Hm, how is this a problem?  Doesn't nnmail copy the article into
> > nnmail-incoming-buffer before processing it, even when respooling?
> 
> If this would happen, that would be good enough, I guess.  Then, split
> rules wishing to access the message body can look in
> nnmail-incoming-buffer.
> 
> Josh?

It doesn't happen.  I put a (debug) inside my fancy split function,
and checked out the values of the variables and what buffers existed.
gnus-original-article-buffer definitely points to < *Original
Article*> and said buffer contains the message being re-spooled.

Should it copy the message into nnmail-incoming-buffer beforehand?

thanks for checking this out, :)

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-21 14:08                     ` Josh Huber
@ 2001-05-21 14:30                       ` Kai Großjohann
  2001-05-21 14:34                         ` Josh Huber
  2001-05-21 17:29                       ` Simon Josefsson
  1 sibling, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2001-05-21 14:30 UTC (permalink / raw)


On 21 May 2001, Josh Huber wrote:

> It doesn't happen.  I put a (debug) inside my fancy split function,
> and checked out the values of the variables and what buffers
> existed.  gnus-original-article-buffer definitely points to <
> *Original Article*> and said buffer contains the message being
> re-spooled.
> 
> Should it copy the message into nnmail-incoming-buffer beforehand?

Or maybe it could bind the variable nnmail-incoming-buffer to the
right value, instead.  But it should do at least one of the two.

kai
-- 
~/.signature: No such file or directory


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

* Re: more on accessing the body via split rules...
  2001-05-21 14:30                       ` Kai Großjohann
@ 2001-05-21 14:34                         ` Josh Huber
  0 siblings, 0 replies; 18+ messages in thread
From: Josh Huber @ 2001-05-21 14:34 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Or maybe it could bind the variable nnmail-incoming-buffer to the
> right value, instead.  But it should do at least one of the two.

Ah, of course.  If only for the sake of performance, we should just
bind the variable and not bother copying the whole message.

-- 
Josh Huber


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

* Re: more on accessing the body via split rules...
  2001-05-21 14:08                     ` Josh Huber
  2001-05-21 14:30                       ` Kai Großjohann
@ 2001-05-21 17:29                       ` Simon Josefsson
  2001-05-21 18:15                         ` Josh Huber
  1 sibling, 1 reply; 18+ messages in thread
From: Simon Josefsson @ 2001-05-21 17:29 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

> > If this would happen, that would be good enough, I guess.  Then, split
> > rules wishing to access the message body can look in
> > nnmail-incoming-buffer.
> > 
> > Josh?
> 
> It doesn't happen.  I put a (debug) inside my fancy split function,
> and checked out the values of the variables and what buffers existed.
> gnus-original-article-buffer definitely points to < *Original
> Article*> and said buffer contains the message being re-spooled.
> 
> Should it copy the message into nnmail-incoming-buffer beforehand?

Yes, and looking at the code it looks like it does, but maybe I'm
reading it wrong.  The article would be in g-o-a-b as well.



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

* Re: more on accessing the body via split rules...
  2001-05-21 17:29                       ` Simon Josefsson
@ 2001-05-21 18:15                         ` Josh Huber
  0 siblings, 0 replies; 18+ messages in thread
From: Josh Huber @ 2001-05-21 18:15 UTC (permalink / raw)


Simon Josefsson <simon@josefsson.org> writes:

> > Should it copy the message into nnmail-incoming-buffer beforehand?
> 
> Yes, and looking at the code it looks like it does, but maybe I'm
> reading it wrong.  The article would be in g-o-a-b as well.

Well, I just tried it again and the buffer < *nnmail incoming*>
doesn't even exist during re-spooling.

so, my workaround is this:

(if (get-buffer " *nnmail incoming*")
    (set-buffer " *nnmail incoming*")
  (set-buffer " *Original Article*"))

which would work, I guess, but the introduction of
nnmail-incoming-buffer would be ideal :)

ttyl,

-- 
Josh Huber


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

end of thread, other threads:[~2001-05-21 18:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-18 15:15 more on accessing the body via split rules Josh Huber
2001-05-18 15:37 ` Josh Huber
2001-05-18 16:12   ` Kai Großjohann
2001-05-18 16:33     ` Josh Huber
2001-05-18 16:56       ` Kai Großjohann
2001-05-18 18:58         ` Josh Huber
2001-05-18 19:16           ` Kai Großjohann
2001-05-18 20:35             ` Josh Huber
2001-05-18 22:44               ` Kai Großjohann
2001-05-18 21:07             ` Simon Josefsson
2001-05-18 22:43               ` Kai Großjohann
2001-05-19  8:58                 ` Simon Josefsson
2001-05-19 11:20                   ` Kai Großjohann
2001-05-21 14:08                     ` Josh Huber
2001-05-21 14:30                       ` Kai Großjohann
2001-05-21 14:34                         ` Josh Huber
2001-05-21 17:29                       ` Simon Josefsson
2001-05-21 18:15                         ` Josh Huber

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