Re: tin: article stubs one line short

Liste des GroupesRevenir à s readers 
Sujet : Re: tin: article stubs one line short
De : anton.txt (at) *nospam* gmail.moc (Anton Shepelev)
Groupes : news.software.readers
Date : 21. Sep 2024, 11:43:04
Autres entêtes
Organisation : To protect and to server
Message-ID : <vcm7vo$1sm6e$1@paganini.bofh.team>
References : 1 2 3 4
User-Agent : tin/2.6.3-20231224 ("Banff") (FreeBSD/14.1-RELEASE (amd64))
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.

Date Sujet#  Auteur
19 Sep 24 * tin: article stubs one line short24Anton Shepelev
20 Sep 24 +* Re: tin: article stubs one line short21VanguardLH
20 Sep 24 i`* Re: tin: article stubs one line short20Anton Shepelev
21 Sep 24 i +* Re: tin: article stubs one line short2VanguardLH
21 Sep 24 i i`- Re: tin: article stubs one line short1Anton Shepelev
21 Sep 24 i `* Re: tin: article stubs one line short17Urs Janßen
21 Sep 24 i  +* Re: tin: article stubs one line short9Anton Shepelev
21 Sep 24 i  i+- Re: tin: article stubs one line short1Urs Janßen
21 Sep 24 i  i`* Re: tin: article stubs one line short7Joerg Mertens
21 Sep 24 i  i `* Re: tin: article stubs one line short6Joerg Mertens
21 Sep 24 i  i  +* Re: tin: article stubs one line short3Anton Shepelev
21 Sep 24 i  i  i`* Re: tin: article stubs one line short2Joerg Mertens
21 Sep 24 i  i  i `- Re: tin: article stubs one line short1Anton Shepelev
21 Sep 24 i  i  `* vi: silence Invalid range with +n (was: tin: article stubs one line short)2Urs Janßen
21 Sep 24 i  i   `- Re: vi: silence Invalid range with +n1Anton Shepelev
21 Sep 24 i  +- Re: tin: article stubs one line short1Anton Shepelev
21 Sep 24 i  `* Re: tin: article stubs one line short6Anton Shepelev
22 Sep 24 i   `* Re: tin: article stubs one line short5Urs Janßen
22 Sep 24 i    `* Re: tin: article stubs one line short4Anton Shepelev
22 Sep 24 i     `* Re: tin: article stubs one line short3Urs Janßen
22 Sep 24 i      +- Re: tin: article stubs one line short1Anton Shepelev
22 Sep 24 i      `- Re: tin: article stubs one line short1Anton Shepelev
20 Sep 24 `* Re: tin: article stubs one line short2John McCue
20 Sep 24  `- Re: tin: article stubs one line short1Anton Shepelev

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal