From: Ilya Goz <ivg@mobilon.ktk.ru>
Subject: Re: nntp-encode-text corrupts text
Date: 24 Apr 2003 23:57:25 +0800 [thread overview]
Message-ID: <87y91zga6y.fsf@eureka.mobilon> (raw)
In-Reply-To: <iluadehzi2g.fsf@latte.josefsson.org>
Simon Josefsson <jas@extundo.com> 11:20 23/4/2003 writes:
SJ> I'm not sure it has been fixed in 21.3.
Okay, I've got my hands at 21.3. It has been fixed.
Meanwhile, I put into my .emacs the following hack, which, strangely
enough, do the work:
(require 'nntp)
(defun nntp-encode-text ()
"Encode the text in the current buffer."
(save-excursion
;; Replace "." at beginning of line with "..".
(goto-char (point-min))
; (while (re-search-forward "^\\." nil t)
; (insert "."))
;; work around bug in re-search-forward
(while (not (eobp))
(if (looking-at "^\\.") (insert "."))
(forward-line 1))
(goto-char (point-max))
;; Insert newline at the end of the buffer.
(unless (bolp)
(insert "\n"))
;; Insert `.' at end of buffer (end of text mark).
(goto-char (point-max))
(insert ".\n")
(goto-char (point-min))
(while (not (eobp))
(end-of-line)
(delete-char 1)
(insert nntp-end-of-line))))
What would be a proper way to replace definition of the function?
--
Ilya V. Goz
next prev parent reply other threads:[~2003-04-24 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8765p6jvap.fsf@eureka.mobilon>
[not found] ` <ilu1xzu1grh.fsf@latte.josefsson.org>
[not found] ` <873ck926eg.fsf@eureka.mobilon>
2003-04-23 9:20 ` Simon Josefsson
2003-04-24 15:57 ` Ilya Goz [this message]
2003-04-25 12:42 ` Simon Josefsson
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=87y91zga6y.fsf@eureka.mobilon \
--to=ivg@mobilon.ktk.ru \
/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).