🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #267597

Re: tin: article stubs one line short

#267597
From: Urs Janßen
Date: Sat, 21 Sep 2024 09:58
28 lines
2297 bytes
Anton Shepelev wrote:
> It is not a bug in the editor, because regarless of the editor `tin'
> 2.6.3 on FreeBSD 14.1 pre-generates an article with /only one/ empty
> line at the end instead of two.  `tin' 2.6.2 (on a remote system I
> use) pre-genenerates articles with two empty lines at the end. I
> think it is an error in `tin' 2.6.3.  Or can this have been changed
> intentionally?

kinda, just tested it with an editor which doesn't complain _and_ jumps
one line _past_ the last line if called with +N > lines_in_file (e.g.
nano, joe, ...). I'll revert that change (= adding an additional
\n to the stub):

=== modified file 'src/post.c'
--- old/src/post.c	2024-09-17 13:26:24 +0000
+++ new/src/post.c	2024-09-21 09:52:00 +0000
@@ -2895,6 +2895,7 @@
 
 	start_line_offset = msg_write_headers(fp) + 1;
 	msg_free_headers();
+	fprintf(fp, "\n");			/* add a newline to keep vi from bitching */
 
 	start_line_offset += msg_add_x_body(fp, group->attribute->x_body);
 


meanwhile you might be able to use something like (depends on your $SHELL)
editor_format=%E +$((%N - 1)) %F
Technical Details
Message-ID: <vcm5bq$oku$1@nntp.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mail
References: <vchp81$1bo2h$1@paganini.bofh.team> <1gzgk2lgv08eo$.dlg@v.nguard.lh> <vck7ih$1kifu$1@paganini.bofh.team>

Show Full Headers
Complete Article Headers
Message-ID: <vcm5bq$oku$1@nntp.de>
Subject: Re: tin: article stubs one line short
Date: Sat, 21 Sep 2024 09:58:18 +0000
From: Urs Janßen <urs@buil.tin.org>
References: <vchp81$1bo2h$1@paganini.bofh.team> <1gzgk2lgv08eo$.dlg@v.nguard.lh> <vck7ih$1kifu$1@paganini.bofh.team>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!nntp.de!.POSTED.akk21-int.akk.kit.edu!not-for-mail
Newsgroups: news.software.readers
Organization: tin.org
Archive: no
Injection-Date: Sat, 21 Sep 2024 09:58:18 -0000 (UTC)
Injection-Info: nntp.de; posting-host="akk21-int.akk.kit.edu:2a00:1398:5:f602:cafe:cafe:cafe:21";
 logging-data="25246"; mail-complaints-to="abuse@nntp.de"
User-Agent: tin/2.6.4-20240917 ("Banff") (Linux/6.1.0-23-amd64 (x86_64))
Cancel-Lock: sha1:KVIQKvgQQl8dpwOW1z80+IHZsKQ=
X-No-Archive: yes
X-No-HTML: yes