🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #259967

Re: [slrn] Automattic subject modification

#259967
From: Doug713705
Date: Thu, 14 Jan 2016 13:07
48 lines
3587 bytes
Le 14-01-2016, J.B. Nicholson nous expliquait dans 
news.software.readers
(<slrnn9e654.h97.jbn@forestfield.org>) :

> Then when you've got that header modified, you could replace the
> entire article with your modified version (via replace_article()) and
> let the user run slrn's followup or reply intrinsics in the ordinary
> way. This would let you leverage the code that's already in slrn and
> not require using any hooks.

That what I thought at first and I already succeed in using 
replace_article(). 

It does the job on screen but it does not modify the article and when I 
followup as usual such a replaced article, the subject is still based 
on the original one as "Re: <original subject>" althought some other 
parts of the article are replaced. The artcile body  part and some of 
the headers are replaced but *not* the subject header or the References 
header that are generated by slrn prior to passing it to the editor.

As far as I can tell Slrn seems to process the original article before 
passing it to the editor rather than processing the replacement one 
that is effectively displayed. So the Subject and References headers 
are generated from the original article independently of the 
modifications.

I think what I need is something like a pre_edit_hook() ;-)

> You could also bind a key to a function that would restore the article
> to it's original state if you want to toggle on/off the subject
> tagging.

At he moment I managed to use the followup_custom_headers variable in 
which I can store my Subject header and some other modified headers. It 
does the job well but I still have to remove the auto-generated headers 
headers (like Subject and References) by hand.

It's a bit annoying but always better than nothing ;-)

Thank for your help and for the S-lang guide pointers. 
I always thought S-lang was a mystical and difficult to apprehend 
language. It seems not ;-)

-- 
Je ne connaîtrai rien de tes habitudes
Il se peut même que tu sois décédée
Mais j'demanderai ta main pour la couper
                    -- H.F. Thiéfaine, L'ascenceur de 22H43
Technical Details
Message-ID: <n786j1$47m$1@golgoth98.redatomik.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <n742hs$8j2$1@golgoth98.redatomik.org> <slrnn9b613.39r.jbn@forestfield.org> <n7554d$olo$1@golgoth98.redatomik.org> <slrnn9e654.h97.jbn@forestfield.org>

Show Full Headers
Complete Article Headers
Message-ID: <n786j1$47m$1@golgoth98.redatomik.org>
Subject: Re: [slrn] Automattic subject modification
Date: Thu, 14 Jan 2016 13:07:45 +0000
From: Doug713705 <doug.letough@free.fr>
References: <n742hs$8j2$1@golgoth98.redatomik.org> <slrnn9b613.39r.jbn@forestfield.org> <n7554d$olo$1@golgoth98.redatomik.org> <slrnn9e654.h97.jbn@forestfield.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 195.154.70.45
Newsgroups: news.software.readers
Organization: Les cassoulets tropicaux reunis
Lines: 48
Sender: doug.letough@free.fr
Reply-To: Doug Le Tough <doug.letough@free.fr>
NNTP-Posting-Host: golgoth98.redatomik.org
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: golgoth98.redatomik.org 1452776865 4342 195.154.70.45 (14 Jan 2016 13:07:45 GMT)
X-Complaints-To: abuse@redatomik.org
NNTP-Posting-Date: Thu, 14 Jan 2016 13:07:45 +0000 (UTC)
User-Agent: slrn/pre1.0.0-18 (Linux)
X-Face: 'Sh}&9(gyOf[,6&8(Gv#k(:g=wUCLP}b#oqMPkLKpV"|y1TatXGYTh.jK\!@!&OsR}'~a
 %D7>:N$)5?\hx$?7Vu5U}GgJaY[&Hb!ThY_TB}.EsQn%JD4k<<)V_f*]P'FM<BJz{NJ$d<3S1<D*{
 ,0^l<z&NxluMUHA<c
X-Received-Body-CRC: 3318667083
X-Received-Bytes: 3608