🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Krzysztof P. Jasiutowicz Tue, 05 Jan 1999 00:00
[slrn] select signature while replying ?
#45678
Author: Krzysztof P. Jasiutowicz
Date: Tue, 05 Jan 1999 00:00
16 lines
1065 bytes

Hello all,
I would like to select a signature file dependent on
newsgroup's name :
other for news.software.readers and other for pl.comp.os.linux etc
I believe it can be done through a macro but how ?
Any hints are most welcome.
Regards,
kpj. 
-- 
Krzysztof P. Jasiutowicz, M.D     | Czestochowa, Poland ...
kpjas@priv.onet.pl @box43.gnet.pl | Linux 2.0.36 Red Hat 5.2 KDE 1.0
http://friko.onet.pl/cz/kpjas/    | mutt 0.95i VIM 5.3 slrn 0.9.5.4 ...

Re: [slrn] select signature while replying ?
#45703
Author: Peppe
Date: Wed, 06 Jan 1999 00:00
38 lines
1969 bytes
Thus wrote Krzysztof P. Jasiutowicz <kpjas@priv.onet.pl>
> Hello all,
> I would like to select a signature file dependent on
> newsgroup's name :
> other for news.software.readers and other for pl.comp.os.linux etc
> I believe it can be done through a macro but how ?
> Any hints are most welcome.

I do something like that for my "realname" setting. If the current
group includes one of two substrings, it gets a special value. To do
so I have the following in my ~/.slrn.sl file.

define my_realname ()
{
    if (is_substr (current_newsgroup (), "k-net")
        or is_substr (current_newsgroup (), "bergsoe"))
        
        set_string_variable ("realname", "Peppe -pbk3104");
    else
        set_string_variable ("realname", "Peppe");
}

To include this file, I add

    interpret .slrn.sl

to my ~/.slrnrc file.

You can probably tweak this into doing the right thing for you.

Peppe
-- 
Preben Guldberg          __/-\__  He said: "Life is like a sewer - what you get
c928400@student.dtu.dk    (o o)     out of it depends on what you put into it."
----------------------oOOo (_) oOOo   --Tom Lehrer: We Will All Go
http://www.student.dtu.dk/~c928400/     Together When We Go (comment)

Re: [slrn] select signature while replying ?
#45735
Author: Kikutani Makoto
Date: Thu, 07 Jan 1999 00:00
37 lines
1908 bytes
On 5 Jan 1999 21:25:13 GMT, Krzysztof P. Jasiutowicz <kpjas@priv.onet.pl> wrote:

> I would like to select a signature file dependent on
> newsgroup's name :
> other for news.software.readers and other for pl.comp.os.linux etc
> I believe it can be done through a macro but how ?

For example, my ~/.slrn.sl has the following:

define article_mode_hook ()
{
     variable signature_file = ".signature-eng"; % english signature
     variable followup = "On %d, %r <%f> wrote:";

    if (is_substr (current_newsgroup (), ".listing")) 
        editor = "vim";

    if (is_substr (current_newsgroup (), "fj.") or
            is_substr (current_newsgroup (), "japan.") or
            is_substr (current_newsgroup (), "local.test") ) {
        signature_file = ".signature"; % japanese signature
        followup = "<some Japanese which maybe you cannot read>:\n";
    }


    set_string_variable ("signature", signature_file);
    set_string_variable ("followup", followup);
}

I want to use my Japanese signature (and followup string) only for
Japanese newsgroups. Maybe you can use this method.

-- 
Kikutani, Makoto  kikutani@sprintmail.com


Re: [slrn] select signature while replying ?
#45759
Author: Dawn Owens-Nicholson
Date: Fri, 08 Jan 1999 00:00
22 lines
1414 bytes
Kikutani Makoto wrote:
>     if (is_substr (current_newsgroup (), ".listing")) 
> [...]
>     if (is_substr (current_newsgroup (), "fj.") or
>             is_substr (current_newsgroup (), "japan.") or
>             is_substr (current_newsgroup (), "local.test") ) {

A suggestion--if these substrings are intended to match at at a particular
place in the group name, regular expressions can help against getting false
positives here.

   variable newsgroup = current_newsgroup ();

   if (string_match (newsgroup, "\.listing$", 1)) [...]

   if (orelse
	{ string_match (newsgroup, "^fj\.", 1) }
	{ string_match (newsgroup, "^japan\.", 1) }
	{ string_match (newsgroup, "^local\.test\.", 1) })
       [...]

Re: [slrn] select signature while replying ?
#45765
Author: Kikutani Makoto
Date: Fri, 08 Jan 1999 00:00
24 lines
1469 bytes
On 8 Jan 1999 01:02:35 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:

> A suggestion--if these substrings are intended to match at at a particular
> place in the group name, regular expressions can help against getting false
> positives here.
> 
>    variable newsgroup = current_newsgroup ();
> 
>    if (string_match (newsgroup, "\.listing$", 1)) [...]
> 
>    if (orelse
> 	{ string_match (newsgroup, "^fj\.", 1) }
> 	{ string_match (newsgroup, "^japan\.", 1) }
> 	{ string_match (newsgroup, "^local\.test\.", 1) })
>        [...]

Right. Thank you!

makoto
-- 
Kikutani, Makoto  kikutani@sprintmail.com


Re: [slrn] select signature while replying ?
#45786
Author: Krzysztof P. Jasiutowicz
Date: Fri, 08 Jan 1999 00:00
28 lines
1815 bytes
On 6 Jan 99 13:06:40 GMT, Peppe <c928400@student.dtu.dk> wrote:
>> I would like to select a signature file dependent on
>> newsgroup's name :
>> other for news.software.readers and other for pl.comp.os.linux etc
>> I believe it can be done through a macro but how ?
>I do something like that for my "realname" setting. If the current
>group includes one of two substrings, it gets a special value. To do
>so I have the following in my ~/.slrn.sl file.
>define my_realname ()
>{
>    if (is_substr (current_newsgroup (), "k-net")
>        or is_substr (current_newsgroup (), "bergsoe"))
>        
>        set_string_variable ("realname", "Peppe -pbk3104");
>    else
>        set_string_variable ("realname", "Peppe");
>}
I solved this problem along the lines you mentioned in
your post but using article_mode_hook.
I am glad that slrn can be so easily customized. Thanks !
Regards,
kpj. 
-- 
Krzysztof P. Jasiutowicz, M.D     | Czestochowa, Poland ...
kpjas@priv.onet.pl @box43.gnet.pl | Linux 2.0.36 Red Hat 5.2 KDE 1.0
http://friko.onet.pl/cz/kpjas/    | mutt 0.95i VIM 5.3 slrn 0.9.5.4 ...

Re: [slrn] select signature while replying ?
#45827
Author: Peppe
Date: Sun, 10 Jan 1999 00:00
27 lines
1676 bytes
Thus wrote Gary Jones <news@manassa.demon.co.uk>
> On 6 Jan 99 13:06:40 GMT, Peppe wrote:

> > I do something like that for my "realname" setting. If the current
> > group includes one of two substrings, it gets a special value. To do
> > so I have the following in my ~/.slrn.sl file.

> > define my_realname ()
> > {
> [...]
> > }

> Don't you then have to call it within a hook procedure?

Yup, I overlooked this necessity when replying.
As Krzysztof already mentioned, this belongs in eg. an article_mode_hook.

Thanks,

Peppe
-- 
And then I write // By morning, night,     __/-\__         Preben Guldberg
And afternoon,   // And pretty soon         (o o)   c928400@student.dtu.dk
My name in Dnepropetrovsk is cursed,    oOOo (_) oOOo---------------------
When he finds out I published first!    --Tom Lehrer: Lobachevsky

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