🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
13 messages
13 total messages Started by narke Mon, 17 May 2010 03:07
slrn editor_command error
#240904
Author: narke
Date: Mon, 17 May 2010 03:07
17 lines
1551 bytes
Hi,

I got probelm when using the editor_command option of slrn.  When the option is
not used, everything is okay. But when I enabled it, it failed:

1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
an editor without header in it, and can not save.

2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
gvim will complain that it can not process the command line.


Do you know what are the possible causes? Thanks.


-
narke
Re: slrn editor_command error
#240908
Author: Keith
Date: Mon, 17 May 2010 04:14
43 lines
2329 bytes
On Mon, 17 May 2010 03:07:28 GMT, narke <narkewoody@gmail.com> wrote:

>Hi,
>
>I got probelm when using the editor_command option of slrn.  When the option is
>not used, everything is okay. But when I enabled it, it failed:
>
>1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
>an editor without header in it, and can not save.
>
>2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
>gvim will complain that it can not process the command line.
>
>
>Do you know what are the possible causes? Thanks.
>
>
>-
>narke

 Don't use a `=` sign when assigning variables to parameters in .slrnrc. You
use `=` in macros & scripts.

[snip]
% Set your favourite editor.  Use %s for the file name and %d for the line
% where the cursor should be placed (usually at the beginning of the body).
%set editor_command "jed '%s' -g %d -tmp"
set editor_command "pico -t +%d '%s'"
[snip]

>From the color.sl macro:

% The macro illustrates several things:
%
%   * How to create and use a linked list in the S-Lang language
%   * Interaction with files
%   * The slrn select_list_box function

variable Color_List_Root = NULL;

define color_save_colors_to_file ()
{
[snip]
Re: slrn editor_command error
#240909
Author: Indi
Date: Mon, 17 May 2010 04:47
27 lines
1606 bytes
On 2010-05-17, narke <narkewoody@gmail.com> wrote:
> Hi,
>
> I got probelm when using the editor_command option of slrn.  When the option is
> not used, everything is okay. But when I enabled it, it failed:
>
> 1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
> an editor without header in it, and can not save.
>
> 2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
> gvim will complain that it can not process the command line.
>
>
> Do you know what are the possible causes? Thanks.
>
>
> -
> narke

set editor_command "vim -c 'set tw=72 et' '+/^$'"

Should work with gvim too, I think.

-- 
Caveat utilitor,
indi
Re: slrn editor_command error
#240910
Author: narke
Date: Mon, 17 May 2010 05:34
34 lines
2031 bytes
On 2010-05-17, Indi <indi@satcidananda.16x108.merseine.nu> wrote:
> On 2010-05-17, narke <narkewoody@gmail.com> wrote:
>> Hi,
>>
>> I got probelm when using the editor_command option of slrn.  
>> When the option is
>> not used, everything is okay. But when I enabled it, it failed:
>>
>> 1. If I use the origianl setting "editor_command = gvim -c %s '%d'", 
>>    I will get an editor without header in it, and can not save.
>>
>> 2. If I use my own setting 
>>    "editor_command = gvim -c 'set textwidth=80' '%d'",
>>    gvim will complain that it can not process the command line.
>>
>>
>> Do you know what are the possible causes? Thanks.
>>
>>
>> -
>> narke
>
> set editor_command "vim -c 'set tw=72 et' '+/^$'"
>
> Should work with gvim too, I think.
>

I've found the cause.  I cannot use '...', I should rather use \"set
tw=72\".  Because slrn and gvim are running in Windows system.

Thanks anyway.

-
nare
Re: slrn editor_command error
#240912
Author: narke
Date: Mon, 17 May 2010 05:37
59 lines
2986 bytes
On 2010-05-17, Keith <kilowattradio@use-reply-to.invalid> wrote:
> On Mon, 17 May 2010 03:07:28 GMT, narke <narkewoody@gmail.com> wrote:
>
>>Hi,
>>
>>I got probelm when using the editor_command option of slrn.  
>>When the option is
>>not used, everything is okay. But when I enabled it, it failed:
>>
>>1. If I use the origianl setting 
>>"editor_command = gvim -c %s '%d'", I will get
>>an editor without header in it, and can not save.
>>
>>2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
>>gvim will complain that it can not process the command line.
>>
>>
>>Do you know what are the possible causes? Thanks.
>>
>>
>>-
>>narke
>
>  Don't use a `=` sign when assigning variables to parameters in .slrnrc. You
> use `=` in macros & scripts.
>

I've found the cause for the error, please refer my reply to
Indi. On the other hand, I found I don't understand your point.
If I should not use `=` to assign value to variables. How do I do
it? Especially, when I want gvim to wrap my inputs to make it no
longer than 80 columns when I am acutually composing an Usenet
article?

> [snip]
> % Set your favourite editor.  Use %s for the file name and %d for the line
> % where the cursor should be placed (usually at the beginning of the body).
> %set editor_command "jed '%s' -g %d -tmp"
> set editor_command "pico -t +%d '%s'"
> [snip]
>
> From the color.sl macro:
>
> % The macro illustrates several things:
> %
> %   * How to create and use a linked list in the S-Lang language
> %   * Interaction with files
> %   * The slrn select_list_box function
>
> variable Color_List_Root = NULL;
>
> define color_save_colors_to_file ()
> {
> [snip]

I don't get it. Why you show me the color.sl?

-
narke
Re: slrn editor_command error
#240917
Author: Lewis
Date: Mon, 17 May 2010 07:33
24 lines
1966 bytes
In message <slrnhv1cng.510.narkewoody@cnzuhnb639.ap.bm.net> 
  narke <narkewoody@gmail.com> wrote:
> Hi,

> I got probelm when using the editor_command option of slrn.  When the option is
> not used, everything is okay. But when I enabled it, it failed:

> 1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
> an editor without header in it, and can not save.

> 2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
> gvim will complain that it can not process the command line.

I have:

set editor_command "vim -f '+set tw=72' +%d '%s'"

When I am using vim. I have my machine to invoke gvim when I am logged
in locally and the regular vim when I am logged in via a ssh session.

I think the = in yours is a problem? Also the lack of +s?

-- 
THERE'S JUST ME, said Death. THE FINAL FRONTIER. --Moving Pictures
Re: slrn editor_command error
#240918
Author: narke
Date: Mon, 17 May 2010 08:39
26 lines
2115 bytes
On 2010-05-17, Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> In message <slrnhv1cng.510.narkewoody@cnzuhnb639.ap.bm.net> 
>   narke <narkewoody@gmail.com> wrote:
>> Hi,
>
>> I got probelm when using the editor_command option of slrn.  When the option is
>> not used, everything is okay. But when I enabled it, it failed:
>
>> 1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
>> an editor without header in it, and can not save.
>
>> 2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
>> gvim will complain that it can not process the command line.
>
> I have:
>
> set editor_command "vim -f '+set tw=72' +%d '%s'"
>
> When I am using vim. I have my machine to invoke gvim when I am logged
> in locally and the regular vim when I am logged in via a ssh session.
>
> I think the = in yours is a problem? Also the lack of +s?
>

Thank you Lewis, the problem has resolved. Please refer my reply to
Indi.
Re: slrn editor_command error
#240928
Author: andrew
Date: Mon, 17 May 2010 14:35
26 lines
1724 bytes
On 2010-05-17, narke <narkewoody@gmail.com> wrote:

> I've found the cause.  I cannot use '...', I should rather use \"set
> tw=72\".  Because slrn and gvim are running in Windows system.

On my own copy of slrn under windows 7 I call gvim from slrn.rc as
follows:

set editor_command "C:/Vim/vim72/gvim +%d %s"

and place the following in _vimrc:

set textwidth=70

but I guess it is much of a muchness... BTW when slrn development
restarts you might be interested in the following:

Compiling the Subversion slrn under Windows 7
http://www.andrews-corner.org/slrn-windows.html

Still waiting for someone other than me to use this guide :(. 

Andrew

-- 
Do you think that's air you're breathing?
Re: slrn editor_command error
#240951
Author: narke
Date: Tue, 18 May 2010 00:35
29 lines
2120 bytes
On 2010-05-17, andrew <andrew@skamandros.invalid> wrote:
> On 2010-05-17, narke <narkewoody@gmail.com> wrote:
>
>> I've found the cause.  I cannot use '...', I should rather use \"set
>> tw=72\".  Because slrn and gvim are running in Windows system.
>
> On my own copy of slrn under windows 7 I call gvim from slrn.rc as
> follows:
>
> set editor_command "C:/Vim/vim72/gvim +%d %s"
>
> and place the following in _vimrc:
>
> set textwidth=70

Most time, I use gvim for programming, so set 'tw' in a global way makes
no sense to me :)

>
> but I guess it is much of a muchness... BTW when slrn development
> restarts you might be interested in the following:
>
> Compiling the Subversion slrn under Windows 7
> http://www.andrews-corner.org/slrn-windows.html
>
> Still waiting for someone other than me to use this guide :(. 
>
> Andrew
>
Re: slrn editor_command error
#240964
Author: W. Citoan
Date: Tue, 18 May 2010 01:57
38 lines
2546 bytes
narke wrote:
>  On 2010-05-17, andrew <andrew@skamandros.invalid> wrote:
> > On 2010-05-17, narke <narkewoody@gmail.com> wrote:
> >
> >> I've found the cause.  I cannot use '...', I should rather use
> >> \"set tw=72\".  Because slrn and gvim are running in Windows
> >> system.
> >
> > On my own copy of slrn under windows 7 I call gvim from slrn.rc as
> > follows:
> >
> > set editor_command "C:/Vim/vim72/gvim +%d %s"
> >
> > and place the following in _vimrc:
> >
> > set textwidth=70
> 
>  Most time, I use gvim for programming, so set 'tw' in a global way
>  makes no sense to me :)

Define it for the slrn files only.  Example from my _vimrc file:

  augroup filetype
    autocmd BufNewFile,BufRead *.txt set filetype=text
    autocmd BufNewFile,BufRead followup.txt set filetype=mail
    autocmd BufNewFile,BufRead article.txt set filetype=mail
  augroup END

  autocmd FileType mail set formatoptions=tcq textwidth=72 comments=n:>,n::,n:??,n:]

The first 5 lines the slrn followup & article files (for default Windows
names) as mail type.  The last line defines settings specific for mail
type files.

- W. Citoan
-- 
Abandon hope, all ye who enter here.
-- Dante
Re: slrn editor_command error
#240982
Author: Keith
Date: Tue, 18 May 2010 09:14
61 lines
2833 bytes
Keith wrote in news:<hsqge002mrb@news6.newsguy.com>:
> On Mon, 17 May 2010 03:07:28 GMT, narke <narkewoody@gmail.com> wrote:
>
>>Hi,
>>
>>I got probelm when using the editor_command option of slrn.  When the option is
>>not used, everything is okay. But when I enabled it, it failed:
>>
>>1. If I use the origianl setting "editor_command = gvim -c %s '%d'", I will get
>>an editor without header in it, and can not save.
>>
>>2. If I use my own setting "editor_command = gvim -c 'set textwidth=80' '%d'",
>>gvim will complain that it can not process the command line.
>>
>>
>>Do you know what are the possible causes? Thanks.
>>
>>
>>-
>>narke
>
>  Don't use a `=` sign when assigning variables to parameters in .slrnrc. You
> use `=` in macros & scripts.
>
> [snip]
> % Set your favourite editor.  Use %s for the file name and %d for the line
> % where the cursor should be placed (usually at the beginning of the body).
> %set editor_command "jed '%s' -g %d -tmp"
> set editor_command "pico -t +%d '%s'"
> [snip]
>
> From the color.sl macro:
>
> % The macro illustrates several things:
> %
> %   * How to create and use a linked list in the S-Lang language
> %   * Interaction with files
> %   * The slrn select_list_box function
>
> variable Color_List_Root = NULL;
>
> define color_save_colors_to_file ()
> {
> [snip]

 You used "editor_command = gvim -c %s '%d'"
in .slrnrc. The proper format for the .slrnrc file
is:
"editor_command gvim -c %s '%d'"
If your program requires an = sign for a switch make sure that it is in 
quotes so that slrn doesn't attempt to interpret the = sign:

editor_command gvim -c %s 'foo=blah' '%d'

HTH,


-- 
Best Regards, Keith   | http://home.comcast.net/~kilowattradio/
Tired of Google Groups? Use free Usenet access & programs.
http://home.comcast.net/~kilowattradio/usenet.html
Re: slrn editor_command error
#240983
Author: W. Citoan
Date: Tue, 18 May 2010 10:17
21 lines
2056 bytes
Keith wrote:
> 
>   You used "editor_command = gvim -c %s '%d'" in .slrnrc. The proper
>   format for the .slrnrc file is:
>  "editor_command gvim -c %s '%d'"

>  If your program requires an = sign for a switch make sure that it is
>  in quotes so that slrn doesn't attempt to interpret the = sign:
> 
>  editor_command gvim -c %s 'foo=blah' '%d'

While you're correct the "=" is wrong, the "set" is needed.  I believe
the command itself also needs to be in quotes (never tried it w/o, but
the manual shows them).  So the above should be:

    set editor_command "gvim -c %s 'foo=blah' '%d'"

- W. Citoan
-- 
That little world, the human mind.
-- Samuel Rogers
Re: slrn editor_command error
#240993
Author: Bastian Erdnuess
Date: Tue, 18 May 2010 12:52
22 lines
2071 bytes
W. Citoan wrote:

> Keith wrote:
>> 
>>   You used "editor_command = gvim -c %s '%d'" in .slrnrc. The proper
>>   format for the .slrnrc file is:
>>  "editor_command gvim -c %s '%d'"
>
>>  If your program requires an = sign for a switch make sure that it is
>>  in quotes so that slrn doesn't attempt to interpret the = sign:
>> 
>>  editor_command gvim -c %s 'foo=blah' '%d'
>
> While you're correct the "=" is wrong, the "set" is needed.  I believe
> the command itself also needs to be in quotes (never tried it w/o, but
> the manual shows them).  So the above should be:
>
>     set editor_command "gvim -c %s 'foo=blah' '%d'"

Did anyone recognize that %s and %d are swaped all the time?

Bastian
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