🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
11 messages
11 total messages Started by tpr Tim Ryan Thu, 08 Jan 1998 00:00
slrn and 80 char line max
#37959
Author: tpr Tim Ryan
Date: Thu, 08 Jan 1998 00:00
15 lines
883 bytes
 Is there any way to have slrn post a message with greater than 80
characters per line? I sometimes need to post debugger output which
exceeds 80 characters and slrn refuses to post the article. Editing
is not really an option since it would make the output very difficult
to read.
 
 Thanks.
 
-- 
Tim Ryan
email: tpryan@ipass.net
Web: http://www.ipass.net/~tpryan/

Starting line in editor (Was Re: slrn and 80 char line max)
#37949
Author: Sylvain Robitaille
Date: Thu, 08 Jan 1998 00:00
27 lines
1809 bytes
On 8 Jan 1998 18:48:10 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
wrote:

> When we are talking about this,  I have one more wish.  When you choose to
> Edit the message,  slrn puts you at the first line of the file.  However,
> slrn already knows the number of the first long line.  It would be nice if
> slrn could automatically put you at this line.  

This is clearly documented in the sample slrnrc file included in the
distribution. I include a snippet from my own .slrnrc as an example:

% Command used to invoke editor.  In the following example, %s represents
% the file name and %d represents the starting line number
set editor_command "vim -c'set wm=6' +%d %s"

Hope that helps...

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              syl@alcor.concordia.ca

Assistant to the System Managers                  Concordia University
Computing Services Department                 Montreal, Quebec, Canada
----------------------------------------------------------------------

Re: Starting line in editor (Was Re: slrn and 80 char line max)
#37950
Author: Jan Hlavacek
Date: Thu, 08 Jan 1998 00:00
60 lines
2744 bytes
On 8 Jan 1998 21:42:28 GMT, David M. Cook <dmcook@cts.com> wrote:
> On 8 Jan 1998 21:33:13 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
> wrote:
> 
> >No it doesn't :-(
> 
> Try JED then.

The same.  I know it doesn't work.  Just look at the post.c.  I think that the
following would probably do it,  but I don't have time to compile and test
right now.  The flowing patch is totally UNTESTED,  and I didn't even try to
figure out what is going  to happen if edit the message repeatedely.  It is
just to give an idea of what the problem is,  so DO NOT USE IT!

--- post.c.orig	Thu Jan  8 17:44:03 1998
+++ post.c	Thu Jan  8 17:50:36 1998
@@ -490,7 +490,7 @@
 	SLsmg_write_string ("section from the body by a BLANK line.");
      }
    
-   return 1;
+   return num;  /* return number of line */
 }
 
 
@@ -557,6 +557,7 @@
    SLang_Name_Type *filter_hook;
 #endif
    int once_more;
+   int lineno = 1;
    
 #if SLRN_HAS_SLANG
    filter_hook = SLang_get_function ("post_filter_hook");
@@ -620,6 +621,7 @@
 	       return -1;
 	     
 	     SLtt_beep ();
+	     lineno = rsp; /* remember the line number */
 	     rsp = slrn_get_response ("yYnNcC\007", "Press '\001Y' to re-edit or '\001C' to cancel.");
 	     if ((rsp != 'y') && (rsp != 'Y'))
 	       break;
@@ -628,7 +630,7 @@
 	     
 	   case 'e':
 	   case 'E':
-	     if (slrn_edit_file (Slrn_Editor_Post, file, 1) < 0) 
+	     if (slrn_edit_file (Slrn_Editor_Post, file, lineno) < 0) 
 	       {
 		  slrn_error ("User abort.");
 		  return -1;

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.ohio-state.edu>  (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/

Re: slrn and 80 char line max
#37958
Author: Fluffy
Date: Thu, 08 Jan 1998 00:00
13 lines
989 bytes
Tim Ryan wrote:
> Is there any way to have slrn post a message with greater than 80
>characters per line? I sometimes need to post debugger output which
>exceeds 80 characters and slrn refuses to post the article. Editing
>is not really an option since it would make the output very difficult
>to read.

Add this to your .slrnrc:

set reject_long_lines 0

Re: slrn and 80 char line max
#37960
Author: Jan Hlavacek
Date: Thu, 08 Jan 1998 00:00
38 lines
2310 bytes
On 8 Jan 1998 18:09:16 GMT, Fluffy <wilhelp@fluffy.meow.org> wrote:
> Tim Ryan wrote:
> > Is there any way to have slrn post a message with greater than 80
> >characters per line? I sometimes need to post debugger output which
> >exceeds 80 characters and slrn refuses to post the article. Editing
> >is not really an option since it would make the output very difficult
> >to read.
> 
> Add this to your .slrnrc:
> 
> set reject_long_lines 0

The problem with this is that usually,  one wants slrn to watch the line
lengths.  Only in some posts,  you want to turn it off.  One solution would be
to turn it off temporarily before posting,  and turn it back on afterwards,
using slang macros.  You can also use hooks to turn it off for specific
newsgroups  (I guess you don't want to post debugger output to
soc.culture.blablabla or rec.drink.beer).

The best solution (already discussed here) would probably be to add one more
option to the slrn prompt,  something like
Edit,  Cancel, Post anyway.
I think it's on Sven's wishlist.

When we are talking about this,  I have one more wish.  When you choose to
Edit the message,  slrn puts you at the first line of the file.  However,
slrn already knows the number of the first long line.  It would be nice if
slrn could automatically put you at this line.  

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.ohio-state.edu>  (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/

Re: slrn and 80 char line max
#37962
Author: Byrial Jensen
Date: Thu, 08 Jan 1998 00:00
15 lines
1048 bytes
Jan Hlavacek <lahvak@math.mps.ohio-state.edu> wrote:
>The best solution (already discussed here) would probably be to add one more
>option to the slrn prompt,  something like
>Edit,  Cancel, Post anyway.
>I think it's on Sven's wishlist.

I have a patch which do exactly that. It can be downloaded from
my slrn page at <URL:http://home3.inet.tele.dk/byrial/slrn/">.
Here you will also find my other slrn pathes.

Best regards
- Byrial

Re: Starting line in editor (Was Re: slrn and 80 char line max)
#37963
Author: Jan Hlavacek
Date: Thu, 08 Jan 1998 00:00
29 lines
1947 bytes
On 8 Jan 1998 21:09:18 GMT, Sylvain Robitaille <syl@alcor.concordia.ca> wrote:
> On 8 Jan 1998 18:48:10 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
> wrote:
> 
> > When we are talking about this,  I have one more wish.  When you choose to
> > Edit the message,  slrn puts you at the first line of the file.  However,
> > slrn already knows the number of the first long line.  It would be nice if
> > slrn could automatically put you at this line.  
> 
> This is clearly documented in the sample slrnrc file included in the
> distribution. I include a snippet from my own .slrnrc as an example:
> 
> % Command used to invoke editor.  In the following example, %s represents
> % the file name and %d represents the starting line number
> set editor_command "vim -c'set wm=6' +%d %s"
> 
> Hope that helps...

No it doesn't :-(

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.ohio-state.edu>  (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/

Re: Starting line in editor (Was Re: slrn and 80 char line max)
#37964
Author: David M. Cook
Date: Thu, 08 Jan 1998 00:00
11 lines
956 bytes
On 8 Jan 1998 21:33:13 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
wrote:

>No it doesn't :-(

Try JED then.

Dave

Re: Starting line in editor (Was Re: slrn and 80 char line max)
#37968
Author: David M. Cook
Date: Fri, 09 Jan 1998 00:00
11 lines
1147 bytes
On 8 Jan 1998 22:59:05 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu> wrote:

>The same.  I know it doesn't work.  

I went back and actually read the request ;}.  The first *long* line.  Yeah,
I'd like that too.

Dave

Re: slrn and 80 char line max
#37971
Author: tpr Tim Ryan
Date: Fri, 09 Jan 1998 00:00
25 lines
1415 bytes
On 8 Jan 1998 23:10:25 GMT, Byrial Jensen <byrial@post3.tele.dk> wrote:
>Jan Hlavacek <lahvak@math.mps.ohio-state.edu> wrote:
>>The best solution (already discussed here) would probably be to add one more
>>option to the slrn prompt,  something like
>>Edit,  Cancel, Post anyway.
>>I think it's on Sven's wishlist.
>
>I have a patch which do exactly that. It can be downloaded from
>my slrn page at <URL:http://home3.inet.tele.dk/byrial/slrn/">.
>Here you will also find my other slrn pathes.
>
>Best regards
>- Byrial

 I tried your patch and it works perfectly. Just what I was looking for. I
hope these patches get folded into the next release.


-- 
Tim Ryan
email: tpryan@ipass.net
Web: http://www.ipass.net/~tpryan/

Re: Starting line in editor (Was Re: slrn and 80 char line max)
#37976
Author: Ian T Zimmerman
Date: Sat, 10 Jan 1998 00:00
23 lines
1665 bytes
In article <slrn6bbp78.3lt.dmcook@mozart.cts.com>,
David M. Cook <dmcook@cts.com> writes:
>  On 8 Jan 1998 22:59:05 GMT, Jan Hlavacek
> <lahvak@math.mps.ohio-state.edu> wrote:
>
> >The same.  I know it doesn't work.

>  I went back and actually read the request ;}.  The first *long*
> line.  Yeah, I'd like that too.

But what if _I_ don't like that?  Lahvak's patch would force the new
behavior on everyone, not a good idea IMO.  I think if you really want
this you should add a _new_ escape (separate from %d) and a new
parameter.

-- 
Ian T Zimmerman                        <itz@rahul.net>
I came to the conclusion that what was wrong about the guillotine
was that the condemned man had no chance at all, absolutely none.
Albert Camus, _The Outsider_

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