[slrn-pre0.9.9] storing raw article via read_article_hook does not work anymore
Christian Ebert <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Organization | Black Trash Productions <http://www.blacktrash.org/> |
| Message-ID | <[email protected]> |
Hi,
I use, or used to use, roughly the following workaround to have
the current article always available in its undecoded form for
scripts:
#v+
% file tools.sl
implements ("SlrnTools");
static variable current_rawart = "";
static define get_raw ()
{
current_rawart = raw_article_as_string ();
}
if (1 != register_hook ("read_article_hook", "SlrnTools->get_raw"))
throw RunTimeError, "failed to register get_raw";
% ...
#v-
Now scripts interpreted after tools.sl have the raw article
available as SlrnTools->current_rawart even *after* a call to
replace_article.
While accessing SlrnTools->current_rawart still works from
/scripts/, it stopped being accessable from read_article_hooks
registered after the hook above.
Is this "cleanup" intentional? Necessary? At least for my needs
it would be nice to have the old behaviour back. At the moment I
can only obtain the raw article from within read_article_hook by
calling raw_article_as_string directly; if the hook the replaces
the article, the raw article has become unavailable for further
processing.
c
--
__ _ _ _ __ _ _
\ \ | |__| |__ _ __| |_\ \| |_ _ _ __ _ __| |_
\ \| '_ \ / _` / _| / /\ \ _| '_/ _` (_-< ' \
\_\_.__/_\__,_\__|_\_\ \_\__|_| \__,_/__/_||_| http://www.blacktrash.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/