Article View: news.software.readers
Article #267600Re: tin: article stubs one line short
From: Anton Shepelev
Date: Sat, 21 Sep 2024 10:43
Date: Sat, 21 Sep 2024 10:43
38 lines
2953 bytes
2953 bytes
Urs Janssen <urs@buil.tin.org> wrote: >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): Thank you, Urs. Of cousre, Tin should generate a correct stub rather than rely on an editor to "fix" it. This means the stub should have conclude with two empty lines, in order that the user may simply start typing at the end of the stub to produce a correct article. >=== 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 */ Yeah, but the comment :-) vi is in the right protesting against positioning the cursor on a non-existant line in the file. >meanwhile you might be able to use something like (depends on your $SHELL) >editor_format=%E +$((%N - 1)) %F Thank you, I can adapt this to my shell. I am not sure, however, it will work with follow-ups, because they are OK as is. At least, I can simply ignore the error and be glad that you fixed the bug upsteam.
Technical Details
Message-ID:
<vcm7vo$1sm6e$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!newsfeed.bofh.team!paganini.bofh.team!not-for-mailReferences:
<vchp81$1bo2h$1@paganini.bofh.team> <1gzgk2lgv08eo$.dlg@v.nguard.lh> <vck7ih$1kifu$1@paganini.bofh.team> <vcm5bq$oku$1@nntp.de>Show Full Headers
Complete Article Headers
Message-ID: <vcm7vo$1sm6e$1@paganini.bofh.team>
Subject: Re: tin: article stubs one line short
Date: Sat, 21 Sep 2024 10:43:04 +0000
From: Anton Shepelev <anton.txt@gmail.moc>
References: <vchp81$1bo2h$1@paganini.bofh.team> <1gzgk2lgv08eo$.dlg@v.nguard.lh> <vck7ih$1kifu$1@paganini.bofh.team> <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!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
Newsgroups: news.software.readers
Organization: To protect and to server
Sender: 9dIQLXBM7WM9KzA+yjdR4A
Injection-Date: Sat, 21 Sep 2024 10:43:04 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="1988814"; posting-host="Uel2WI51f7fb6qozThlx/g.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.3-20231224 ("Banff") (FreeBSD/14.1-RELEASE (amd64))
X-Notice: Filtered by postfilter v. 0.9.3