Gnus development mailing list
 help / color / mirror / Atom feed
From: Christopher Davis <ckd@loiosh.kei.com>
Subject: Re: 5.2.20 nits/fixes (with patches for most)
Date: 19 Jun 1996 16:29:25 -0400	[thread overview]
Message-ID: <w4k9x3czbu.fsf@loiosh.kei.com> (raw)
In-Reply-To: larsi@ifi.uio.no's message of 19 Jun 96 16:36:55 GMT

LMI> == Lars Magne Ingebrigtsen <larsi@ifi.uio.no>

 ckd> - message-insert-signature adds a gratuitous blank line at the end
 ckd>   of the text if the text already ends in a newline.

 LMI> An extra newline before the signature separator?  Hm, yes...  It
 LMI> removes all whitespace at the end of the message before inserting
 LMI> the signature, and it inserts a blank line before the separator.

Actually, it backs up over all the whitespace, moves forward a line (so if
there is a newline at the end of the text, point will be at the beginning
of the next line), and then deletes from there to point-max (preserving
said newline, if any).

So there are three possibilities:

- no newline at end of buffer.  forward-line will silently fail, and
  message-insert-signature will insert \n-- \n and the signature.

- one newline at end of buffer (my usual situation).  forward-line will
  move past that newline, message-insert-signature will delete from there
  (point-max) to point-max (a no-op), then message-insert-signature will
  add another newline, leaving a blank line between the last line of text
  and the .signature file.

- more than one newline (or other whitespace) at end of buffer.  (Trailing
  whitespace on the last line of text not included.)  forward-line will
  move past the first newline, the rest will be deleted, and then the
  scenario goes as for one newline (above).

In order to fix the second and third scenarios without breaking the first,
it suffices to check to make sure that you're not at bol before inserting
a newline before the signature separator (as my patch does).

 LMI> This is slightly fascist.  Should it do this or not?

Maybe it should be part of the syntax checks, but I say yes!  It should
zap the whitespace (by default, anyway).  Since so many people don't set
next-line-add-newlines to nil, lots of posts could otherwise go out with
20 blank lines at the end.
-- 
Christopher Davis <ckd@kei.com> <URL: http://www.kei.com/homepages/ckd/ >
"I conclude that the CDA is unconstitutional and that the First Amendment
 denies Congress the power to regulate protected speech on the Internet."
                               -- Judge Stewart Dalzell in _ACLU v. Reno_


  reply	other threads:[~1996-06-19 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-19 15:52 Christopher Davis
1996-06-19 16:36 ` Lars Magne Ingebrigtsen
1996-06-19 20:29   ` Christopher Davis [this message]
1996-06-20  6:44     ` Lars Magne Ingebrigtsen
1996-06-20 14:24       ` Hallvard B Furuseth
1996-06-20 14:37         ` Lars Magne Ingebrigtsen
1996-06-19 23:00   ` Edward J. Sabol
1996-06-20  4:05     ` Firebeard
1996-06-21 15:35   ` Christopher Davis
1996-06-21 15:50     ` Lars Magne Ingebrigtsen
1996-06-21 17:24       ` Christopher Davis
1996-06-22  9:04         ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=w4k9x3czbu.fsf@loiosh.kei.com \
    --to=ckd@loiosh.kei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).