Thread View: news.software.readers
6 messages
6 total messages
Started by Olly Betts
Fri, 18 Jul 1997 00:00
slrn: "fetch the FAQ" macro
Author: Olly Betts
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
71 lines
2732 bytes
2732 bytes
Sven suggested it would be nice to be able to fetch the FAQ with a single
keystroke. So here's a macro which points your web browser at the
appropriate directory on rtfm.mit.edu. There may be better sites to use
but rtfm seems to work.
Slrn macro:
define fetch_faq ()
{
variable url = "ftp://rtfm.mit.edu/pub/usenet/";
url = strcat( url, current_newsgroup() );
url = strcat( url, "/" );
launch_url( url );
}
You may notice that slrn doesn't provide a "launch_url" intrinsic. Until
you apply this patch that is:
*** art.c.orig Sat Jul 12 21:29:02 1997
--- art.c Fri Jul 18 14:36:48 1997
***************
*** 1278,1284 ****
/*}}}*/
! static void launch_url (char *url) /*{{{*/
{
char command [4096];
char *browser, *has_percent;
--- 1278,1285 ----
/*}}}*/
! /* extern so interp.c can provide this as a slang intrinsic function */
! extern void launch_url (char *url) /*{{{*/
{
char command [4096];
char *browser, *has_percent;
*** art.h.orig Sat Jul 12 21:29:02 1997
--- art.h Fri Jul 18 14:36:47 1997
***************
*** 137,142 ****
--- 137,144 ----
extern void slrn_set_article_window_size (int);
extern char *slrn_extract_header (char *, unsigned int);
+ extern void launch_url (char *);
+
/* Third argument must be zero unless caller deals with Slrn_Current_Header. */
extern Slrn_Header_Type *slrn_set_header_score (Slrn_Header_Type *, int, int);
*** interp.c.orig Sat Jul 12 21:29:03 1997
--- interp.c Fri Jul 18 14:36:47 1997
***************
*** 1057,1062 ****
--- 1057,1063 ----
MAKE_INTRINSIC(".is_article_visible", slrn_is_article_visible, INT_TYPE, 0),
MAKE_INTRINSIC(".is_group_mode", is_group_mode, INT_TYPE, 0),
MAKE_INTRINSIC(".is_thread_collapsed", is_thread_collapsed, INT_TYPE, 0),
+ MAKE_INTRINSIC(".launch_url", launch_url, VOID_TYPE, 1),
MAKE_INTRINSIC(".make_home_filename", make_home_filename, VOID_TYPE, 1),
MAKE_INTRINSIC(".message", message, VOID_TYPE, 1),
MAKE_INTRINSIC(".next_tagged_header", slrn_next_tagged_header, INT_TYPE, 0),
Olly
--
Don't send a man to do a buoy's job.
Re: slrn: "fetch the FAQ" macro
Author: A. Deckers
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
15 lines
924 bytes
924 bytes
In <slrn5sutck.8lv.olly@noxious.muscat.co.uk>, Olly Betts <olly@muscat.co.uk> wrote: [...] >You may notice that slrn doesn't provide a "launch_url" intrinsic. Until >you apply this patch that is: [...] Slow down Olly, or slrn will have changed beyond all recognition by the time JED next reads this newsgroup. :-) Alain
Re: slrn: "fetch the FAQ" macro - rtfm.mit.edu mirrors
Author: Sven Guckes
Date: Fri, 18 Jul 1997 00:00
Date: Fri, 18 Jul 1997 00:00
12 lines
985 bytes
985 bytes
olly@muscat.co.uk (Olly Betts): > here's a macro which points your web browser > at the appropriate directory on rtfm.mit.edu. > There may be better sites to use but rtfm seems to work. I think this macro (and the patch) should be added to the distribution. Anyone have a list of rtfm.mit.edu mirrors? Sven
Re: slrn: "fetch the FAQ" macro
Author: Mike Mckinney
Date: Sat, 19 Jul 1997 00:00
Date: Sat, 19 Jul 1997 00:00
31 lines
1617 bytes
1617 bytes
On 18 Jul 1997 13:55:08 GMT, Olly Betts <olly@muscat.co.uk> wrote:
>Sven suggested it would be nice to be able to fetch the FAQ with a single
>keystroke. So here's a macro which points your web browser at the
>appropriate directory on rtfm.mit.edu. There may be better sites to use
>but rtfm seems to work.
>
>Slrn macro:
>
>define fetch_faq ()
>{
> variable url = "ftp://rtfm.mit.edu/pub/usenet/";
> url = strcat( url, current_newsgroup() );
> url = strcat( url, "/" );
> launch_url( url );
>}
Okay, as most of you have probably already guessed, I'm a bit "challenged"
when it comes to adding patches or macros..Now, here's my problem:
I tried adding the above macro to my slrn.sl file, but after I add it,
slrn complains that it can't process the file, starting at line 17, even
though I've added the macro to the end of the file, at line 168 .
Also, which key would I use to call this macro ?
Any help, once again, would be most appreciated.
mike@bga.com
Re: slrn: "fetch the FAQ" macro
Author: Mike Mckinney
Date: Sat, 19 Jul 1997 00:00
Date: Sat, 19 Jul 1997 00:00
24 lines
1359 bytes
1359 bytes
>>define fetch_faq ()
>>{
>> variable url = "ftp://rtfm.mit.edu/pub/usenet/";
>> url = strcat( url, current_newsgroup() );
>> url = strcat( url, "/" );
>> launch_url( url );
>>}
>
>Okay, as most of you have probably already guessed, I'm a bit "challenged"
>when it comes to adding patches or macros..Now, here's my problem:
>
>I tried adding the above macro to my slrn.sl file, but after I add it,
>slrn complains that it can't process the file, starting at line 17, even
>though I've added the macro to the end of the file, at line 168 .
>Also, which key would I use to call this macro ?
Okay, I finally figured out where I went wrong setting this up.
mike@bga.com
Re: slrn: "fetch the FAQ" macro
Author: Olly Betts
Date: Mon, 21 Jul 1997 00:00
Date: Mon, 21 Jul 1997 00:00
33 lines
1547 bytes
1547 bytes
In article <slrn5t01fr.mk.mike@apm0-43.realtime.net>, Mike Mckinney wrote:
>>define fetch_faq ()
>>{
>> variable url = "ftp://rtfm.mit.edu/pub/usenet/";
>> url = strcat( url, current_newsgroup() );
>> url = strcat( url, "/" );
>> launch_url( url );
>>}
>
>Okay, as most of you have probably already guessed, I'm a bit "challenged"
>when it comes to adding patches or macros..Now, here's my problem:
>
>I tried adding the above macro to my slrn.sl file
You need to put it in a separate file (say ".fetchfaq.sl" in your home
directory) and add a line to .slrnrc which says:
interpret .fetchfaq.sl
>Also, which key would I use to call this macro ?
That's up to you. If you wanted it on "Z" you'd add this to your .slrnrc:
setkey article fetch_faq "Z"
Or you could put this line in ".fetchfaq.sl" instead.
Olly
--
Don't send a man to do a buoy's job.
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