🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #37950

Re: Starting line in editor (Was Re: slrn and 80 char line max)

#37950
From: 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/

Technical Details
Message-ID: <slrn6bamhp.85f.lahvak@math.mps.ohio-state.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <6930jg$drn$1@news.ipass.net> <slrn6ba5n0.98m.wilhelp@fluffy.meow.org> <slrn6ba7r9.l7a.lahvak@math.mps.ohio-state.edu> <693f9u$foh$1@newsflash.concordia.ca> <slrn6bahgp.41k.lahvak@math.mps.ohio-state.edu> <slrn6bai2a.nc.dmcook@mozart.cts.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6bamhp.85f.lahvak@math.mps.ohio-state.edu>
Subject: Re: Starting line in editor (Was Re: slrn and 80 char line max)
Date: Thu, 08 Jan 1998 00:00:00 +0000
From: lahvak@math.mps.ohio-state.edu (Jan Hlavacek)
References: <6930jg$drn$1@news.ipass.net> <slrn6ba5n0.98m.wilhelp@fluffy.meow.org> <slrn6ba7r9.l7a.lahvak@math.mps.ohio-state.edu> <693f9u$foh$1@newsflash.concordia.ca> <slrn6bahgp.41k.lahvak@math.mps.ohio-state.edu> <slrn6bai2a.nc.dmcook@mozart.cts.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 314096861
Reply-To: lahvak@math.mps.ohio-state.edu
Organization: Department of Mathematics, The Ohio State University
Newsgroups: news.software.readers