Re: trn and xfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Lars J. Aas <> wrote:
: I've noticed there are a few people posting news with X-Face headers, and
: I would like to be able to see the xface of whoever I'm reading the message
: from with xfaces.  I figure I probably only need trn to fake/update a spool-
: file of some sort by dumping a the header to a file whenever I read a
: message, and xfaces will update itself when the file changes.

Got a 20% solution working now, but I'm far from satisfied.  After getting
$NEWSHEADER set up in .bashrc to get my X-Face data processed by bash and trn
to end up correctly in my news messages, I set up this macro:

\040	%(%m=[ap]? : )%(%m=[ap]?!rm -f %~/current^MS%~/current^M)

This will in the selector, when I press space, send the space on, and then
run the commands for storing the current message as ~/current afterwards.
I've started xfaces with the commandline "xfaces -s ~/current" so it monitors
that file.

The problems with this approach are:

* It only works as long as I space through messages.  If I manoever around
with arrow keys or n, p, etc., the macro isn't triggered.  Also, the first message
I view isn't stored in 'current'.  I can of course hook up this for *all*
article-manoevering commands, but that's a solution I want to avoid.

* The second part of the macro is %-interpreted already at the point when the
macro is triggered.  The %m-conditional is therefore the same for both tests.
What I'm trying to do is to avoid having the store commands executed when I've
read the last article, and trn returns to the article-selector or newsgroup
level.  I haven't been able to achieve that.  The macro looks weird, I know -
it's just how it ended up after I've tried different things - the second macro
started out embedded inside the true-clause of the first macro-part.

* The execution of the article-storing commands ought to be invisible, as well
as trn's response to them.  I didn't find a way to do that.  I tried to insert
^S + ^Q to freeze the terminal while doing those commands, but discovered that
the output still gets through (as it should - I remebered incorrectly).  Does
anyone know of any control-sequence that will put the terminal output in the
bitbucket until told otherwise?  Maybe this is terminal-specific and won't work
when being sent from an application for all I know....

Anyways, tbe first two problems would be solved if macros could be hooked up to
events in addition to key-strokes, so I could define a macro that would be run
when the pager is about to display an article.  I didn't see any such thing
being possible though...  Anyone?

  Lars J

This SF.NET email is sponsored by: - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your 
clients even if they use browsers that are limited to 40 bit encryption. 
Get a guide here:

[Index of Archives]     [Photo]     [Yosemite]     [Epson Inkjet]     [Mhonarc]     [Nntpcache]

  Powered by Linux