From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2352 Path: news.gmane.org!not-for-mail From: Ilya Goz Newsgroups: gmane.emacs.gnus.user Subject: Re: nntp-encode-text corrupts text Date: 24 Apr 2003 23:57:25 +0800 Message-ID: <87y91zga6y.fsf@eureka.mobilon> References: <8765p6jvap.fsf@eureka.mobilon> <873ck926eg.fsf@eureka.mobilon> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138668814 14831 80.91.229.2 (31 Jan 2006 00:53:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:53:34 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:30:33 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!80.253.227.161!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Sender: ivg@eureka.mobilon Original-NNTP-Posting-Host: 80.253.227.161 Original-X-Trace: fu-berlin.de 1051199846 8046600 80.253.227.161 (16 [120900]) X-Comment-To: Simon Josefsson User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2492 Original-Lines: 39 X-Gnus-Article-Number: 2492 Tue Jan 17 17:30:33 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2352 Archived-At: Simon Josefsson 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