Re: Are there any 'hooks' in the pager, or can one replace it?
Chris Green <[email protected]> Tue, 24 Jun 2014 11:09:51 +0100
| Newsgroups | gmane.network.tin.user |
|---|---|
| Message-ID | <20140624100951.GA22888@chris> |
On Tue, Jun 24, 2014 at 11:50:00AM +0200, Urs Jan=DFen wrote: > On Tue, Jun 24, 2014 at 10:19:52AM +0100, Chris Green wrote: > > I want to write a simple filter to run text through before displaying > > it in the pager. > >=20 > > Can one either 'hook' incoming text somehow or replace the pager > > completely with an external program? >=20 > there is neither such thing as a hook to preprocess the article befor > passing in to the internal pager [1] nor can the pager replaced by some= thing > else (the later wont work as the external pager would need to know all = the > key bindings from the internal (i.e. reply, toggle into raw mode, ...) = pager > and pass the actions back to tin) >=20 OK, that's a pity. > of course you could manually pipe the (raw) article through any command= , but > that is not realy an option if it should be done for more than a few > articles... >=20 It's only for three newsgroups and only for occasional articles so a manual command would be better than nothing. If I use "pipe article/thread/hot/pattern/tagged articles into command" in tin and output the result to the window where tin is running will I then be able to return to tin afterwards? I'm often doing this via ssh so popping up a new window for display is not so easy. > > I simple want to change incoming quoted text on a couple of groups > > where quoted text is marked as follows:- > >=20 > >=20 > > [quote] This is the quoted text, possibly > > on multiple lines. > > [/quote] > >=20 > > to:- > > > This is the quoted text, possibly > > > on multiple lines. >=20 > what can be done is reformat the article for passing it to your editor = on > reply/followup, ... by settings EDITOR to your needs, i.e. >=20 > sed 's,foo,bar,' | vim >=20 Yes, though the trouble is partly that it's very difficult to see what's in the article before I decide to reply to it when it has the [quote].....[/quote] in it because they don't stand out at all and, of course, there's no differential colouring. > [1] cook.c is the place to look into if you want to add such a feature > (preprcess article befor showing in the internal pager) >=20 OK, I don't think I'm quite that desperate though. :-) --=20 Chris Green