Subject: Display filters in 4.32

From: Richard Stevenson <[email-masked]>
Date: Fri, 19 Jan 2001 08:01:55 +1300 (NZDT)

Hiya

I built Pine 4.32 on my Linux box yesterday, and it appears to be ignoring
my display filters.. going back to 4.31, they do work on the same
messages.  Have there been any changes in this area that aren't in the
docs?  My filters:

display-filters=_BEGINNING("-----BEGIN PGP MESSAGE")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_,
	_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_

FWIW, Pine 4.32 immediately shows me the content of PGP messages as is...
it looks as if the filter isn't invoked at all.

Cheers

Richard

-- 
Richard Stevenson, Systems Support Specialist, Telecom Xtra
Phone: +64 9 355 5231   Mobile: +64 25 290 3101   Pager: +64 26 100 155

Windows 2000 - proudly brought to you by the people behind EDLIN

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Jeff Franklin <[email-masked]>
Date: Thu, 18 Jan 2001 17:23:36 -0800 (Pacific Standard Time)

> it looks as if the filter isn't invoked at all.

Hi Richard,

We have seen a few other reports of this problem happening, but so far,
we're unable to reproduce it.  We'll let you know if we find out more, but
in the meantime, could you send us some debugging information after
running with the -d 9 option?  Is anyone else on this list experiencing
this problem?

Thanks,
Jeff

-- 
Jeff Franklin <[email-masked]>
Networks and Distributed Computing     University of Washington

---

From: Eduardo Chappa <[email-masked]>
Date: Thu, 18 Jan 2001 18:37:23 -0800 (PST)

*** Jeff Franklin ([email-masked]) wrote today:

:) > display-filters=_BEGINNING("-----BEGIN PGP MESSAGE")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_,
:) > 	_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_
:) >
:) > FWIW, Pine 4.32 immediately shows me the content of PGP messages as is...
:) > it looks as if the filter isn't invoked at all.
:)
:) Hi Richard,
:)
:) We have seen a few other reports of this problem happening, but so far,
:) we're unable to reproduce it.  We'll let you know if we find out more, but
:) in the meantime, could you send us some debugging information after
:) running with the -d 9 option?  Is anyone else on this list experiencing
:) this problem?

I could reproduce some variant of this problem. I tried the following
display-filter:

_BEGINNING("<HTML>")_ /usr/local/bin/lynx -force_html _TMPFILE_

which failed on the following text:

<HTML>
<P>test
</HTML>

However, eliminating the quotation signs made it work:

_BEGINNING(<HTML>)_ /usr/local/bin/lynx -force_html _TMPFILE_

I guess the test includes the quotations, and that's the bug.

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Richard Stevenson <[email-masked]>
Date: Fri, 19 Jan 2001 16:06:36 +1300 (NZDT)

> I guess the test includes the quotations, and that's the bug.

Hmm... yep.  From my debug file for 4.31:

static trigger: "_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_" --> "_BEGINNING(-----BEGIN PGP SIGNED)_" and "/home/richard/.pgp/verify2.tcsh _TMPFILE_"

And from 4.32:

static trigger: "_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_" --> "_BEGINNING("-----BEGIN PGP SIGNED")_" and "/home/richard/.pgp/verify2.tcsh _TMPFILE_"

The double quotes are the difference.  Now I've just got to find the right
place in the source :)

Cheers

R

---

From: Eduardo Chappa <[email-masked]>
Date: Thu, 18 Jan 2001 19:41:50 -0800 (PST)

*** Richard Stevenson ([email-masked]) wrote in the...:

:) On Thu, 18 Jan 2001, Eduardo Chappa wrote:
:) 
:) > I guess the test includes the quotations, and that's the bug.
:) 
:) Hmm... yep.  From my debug file for 4.31:
:) 
:) static trigger: "_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_" --> "_BEGINNING(-----BEGIN PGP SIGNED)_" and "/home/richard/.pgp/verify2.tcsh _TMPFILE_"
:) 
:) And from 4.32:
:) 
:) static trigger: "_BEGINNING("-----BEGIN PGP SIGNED")_ /home/richard/.pgp/verify2.tcsh _TMPFILE_" --> "_BEGINNING("-----BEGIN PGP SIGNED")_" and "/home/richard/.pgp/verify2.tcsh _TMPFILE_"
:) 
:) 
:) The double quotes are the difference.  Now I've just got to find the right
:) place in the source :)

Make the change in line 3902 in file mailpart.c. You need to eliminate the 
quotes from the "str" variable. I do not know if there's already a 
function that does that for you (so that if you really meant to have a 
quote as the first character of the filter it will be considered). In any 
case for what you want this should be easy to do.