Re: Are there any 'hooks' in the pager, or can one replace it?
Urs Janßen <[email protected]> Tue, 24 Jun 2014 11:50:00 +0200
| Newsgroups | gmane.network.tin.user |
|---|---|
| Message-ID | <[email protected]> |
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. > > Can one either 'hook' incoming text somehow or replace the pager > completely with an external program? 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 something 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) 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... > I simple want to change incoming quoted text on a couple of groups > where quoted text is marked as follows:- > > > [quote] This is the quoted text, possibly > on multiple lines. > [/quote] > > to:- > > This is the quoted text, possibly > > on multiple lines. 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. sed 's,foo,bar,' | vim [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) urs -- "Only whimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" - Linus