Thread View: news.software.readers
3 messages
3 total messages
Started by Goran
Mon, 03 Jul 2000 00:00
slrn - few questions
Author: Goran
Date: Mon, 03 Jul 2000 00:00
Date: Mon, 03 Jul 2000 00:00
48 lines
2070 bytes
2070 bytes
Hi all,
I'm very happy with slrn but have a few things I can't sort out so I was
wondering if anyone else managed it.
1. Following README.macros I was able to get rid of input prompt when
decoding articles. However I was not able to get rid of the remaining
questions (Save to file ... and Decode file ...). There's a hint in
the above mentioned file :
For functions that prompt for a single character, such as
-----------
Do you really want to quit? [Y]es No
a similar intrinsic function, set_input_chars, may be used to
provide the answer.
-----------
This works perfectly for say quit command, but I can't get decode command
to work this way. Here's how I did it :
define my_decode()
{
set_input_string("/home/gorank/News/to_be_decoded");
call("decode");
}
definekey("my_decode", ":", "article");
I have tried adding a few calls to set_input_chars() before the call
to decode but it doesn't work. Any ideas ?
2. slrn has subject_search_forward and subject_search_backward functions
but using them is somewhat awkward IMHO. Is there anything like
subject_search_forward_next or something similar ?
Thank you in advance.
Regards,
Goran
--
Writing about music is like dancing about architecture.
-- Frank Zappa
Re: slrn - few questions
Author: Juha Sahakangas
Date: Mon, 03 Jul 2000 00:00
Date: Mon, 03 Jul 2000 00:00
64 lines
3157 bytes
3157 bytes
On Mon, 03 Jul 2000 08:32:30 GMT, Goran <goran@orange.net> wrote:
>2. slrn has subject_search_forward and subject_search_backward functions
> but using them is somewhat awkward IMHO. Is there anything like
> subject_search_forward_next or something similar ?
I wrote this small macro ... maybe it's something like the function you are
looking? And everyone, comments and corrections are welcome, it's the first
one so it may have bugs or other oddities at the moment.
-clip-
%start
define subject_search_forward_next ()
{
variable search_string;
variable rsp;
search_string = read_mini("Subject Search Forward","","");
if (search_string == "")
return;
set_input_string (search_string);
call ("subject_search_forward");
update ();
forever
{
message_now ("Press RET to continue searching.");
rsp = getkey ();
!if (rsp == 13)
return;
%I stole message and key from jed, but they can of course be easily
%changed to n, N or F3 (winblows-software tends to use this a lot),
%or whatever.
set_input_string (search_string);
call ("subject_search_forward");
update ();
}
}
%end
definekey ("subject_search_forward_next", "s", "article");
%put here any key you want, this should work exactly like the original
%subject search, except it doesn't terminate itself after the first hit so
%you can replace the original if you want (i think the key must not be
%defined in .slrnrc in order for this to work), or use a different key.
-clip-
I've also been trying to implement way to attach binaries from slrn "menus",
works fine as a filter by modifying ispell.sl from slrn, except that if
I'm using signature, the attachment comes after it, which is of course not
what I want. I could disable signatures for binary groups, but are there
other not-so-hard alternatives?
Also, I've been working on a macro that would catch up all the messages in
the group, then search for a word in a subject and undelete those messages,
and after that, expunge the rest... I managed to get it working somehow, but
there are problems ... if first message in a header list contains the search
prase, it doesn't get undeleted (because subject_search_forward doesn't find
the subject of selected message, and first message is selected when
header_bob is done).
Re: slrn - few questions
Author: J.B. Nicholson-Owens
Date: Mon, 03 Jul 2000 00:00
Date: Mon, 03 Jul 2000 00:00
22 lines
1751 bytes
1751 bytes
Goran wrote: > I have tried adding a few calls to set_input_chars() before the call > to decode but it doesn't work. Any ideas ? You need to anticipate all the questions slrn might ask. If I recall correctly, it'll ask different questions depending on whether there are any articles numerically tagged and whether the current article is at a collapsed thread. In my opinion, the decode and save intrinsics are aimed at interactive use only; they're kind of a pain to use programmatically (but it can be done if you look at the slrnfun.txt docs on responding to multiple questions). It might be more future-proof and straightforward if you opened an append+create handle to your output file, looped over each of the numerically tagged articles saving the article as you went. > 2. slrn has subject_search_forward and subject_search_backward functions > but using them is somewhat awkward IMHO. Is there anything like > subject_search_forward_next or something similar ? I don't know what you expect "subject_search_forward_next" or something similar to do.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads