From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39268 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.gnus.general Subject: patches (Re: auto-fill in body after "^[A-Za-z]: ") Date: Sat, 13 Oct 2001 22:36:27 +0200 Organization: Gnus Information Center Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035175003 26989 80.91.224.250 (21 Oct 2002 04:36:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:36:43 +0000 (UTC) Return-Path: Original-Received: (qmail 18546 invoked from network); 13 Oct 2001 19:30:19 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 13 Oct 2001 19:30:19 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15sUR6-0004lW-00; Sat, 13 Oct 2001 14:27:04 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 13 Oct 2001 14:26:41 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id OAA14932 for ; Sat, 13 Oct 2001 14:26:28 -0500 (CDT) Original-Received: (qmail 18516 invoked by alias); 13 Oct 2001 19:26:43 -0000 Original-Received: (qmail 18511 invoked from network); 13 Oct 2001 19:26:43 -0000 Original-Received: from quimby.gnus.org (195.204.10.139) by gnus.org with SMTP; 13 Oct 2001 19:26:43 -0000 Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id VAA10742 for ding@gnus.org; Sat, 13 Oct 2001 21:26:41 +0200 (CEST) Original-To: ding@gnus.org Original-Path: hermes!nobody Original-Newsgroups: gnus.ding Original-Lines: 167 Original-NNTP-Posting-Host: 92-41.f.dial.o-tel-o.net Original-X-Trace: quimby.gnus.org 1003001200 8420 212.144.92.41 (13 Oct 2001 19:26:40 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 13 Oct 2001 19:26:40 GMT X-attribution: os User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39268 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39268 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit *blushes* I'm sorry for the spam. I was a bit careless as I posted my last message. :-¬ I worked a bit on the code. Please note that my lisp-writing is pure diletantism. It is very probable that this is not worth anything. Furthermore: I never made a diff before. I followed the instructions in the Emacs Manual. I hope I made it right. 1. Patch to message.el --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message.diff Content-Description: Patch to message.el *** message.el Fri Oct 12 16:39:31 2001 --- /home/egoge/message.el Sat Oct 13 21:04:09 2001 *************** *** 3943,3955 **** (when message-default-headers (insert message-default-headers) (or (bolp) (insert ?\n))) - (put-text-property (point-min) (point) 'field 'header) (put-text-property (point) (progn (insert mail-header-separator "\n") (1- (point))) ! 'read-only nil) (forward-line -1) (when (message-news-p) (when message-default-news-headers --- 3943,3954 ---- (when message-default-headers (insert message-default-headers) (or (bolp) (insert ?\n))) (put-text-property (point) (progn (insert mail-header-separator "\n") (1- (point))) ! 'read-only t) (forward-line -1) (when (message-news-p) (when message-default-news-headers *************** *** 3979,3984 **** --- 3978,3986 ---- (set-buffer-modified-p nil) (setq buffer-undo-list nil) (run-hooks 'message-setup-hook) + (save-restriction + (message-narrow-to-headers) + (put-text-property (point-min) (point-max) 'field 'header)) (message-position-point) (undo-boundary)) --=-=-= a. This sets the 'field 'header property to the whole header. b. This sets the read-only property of the mail-header-separator to t. (changes are in `message-setup-1') 2. Patch to gnus-draft.el --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-draft.diff Content-Description: Patch to gnus.draft.el *** gnus-draft.el Sun Sep 23 12:37:11 2001 --- /home/egoge/gnus-draft.el Sat Oct 13 21:42:02 2001 *************** *** 102,108 **** (save-excursion (save-restriction (message-narrow-to-headers) ! (message-remove-header "date"))) (save-buffer) (let ((gnus-verbose-backends nil)) (gnus-request-expire-articles (list article) group t)) --- 102,109 ---- (save-excursion (save-restriction (message-narrow-to-headers) ! (message-remove-header "date") ! (put-text-property (point-min) (point-max) 'field 'header))) (save-buffer) (let ((gnus-verbose-backends nil)) (gnus-request-expire-articles (list article) group t)) *************** *** 218,224 **** (progn (defun gnus-draft-setup (narticle group &optional restore) ! (let (ga) (gnus-setup-message 'forward (let ((article narticle)) (message-mail) --- 219,225 ---- (progn (defun gnus-draft-setup (narticle group &optional restore) ! (let (ga (inhibit-read-only t)) (gnus-setup-message 'forward (let ((article narticle)) (message-mail) *************** *** 232,238 **** (goto-char (point-min)) (search-forward "\n\n") (forward-char -1) ! (insert mail-header-separator) (forward-line 1) (setq ga (message-fetch-field gnus-draft-meta-information-header)) (message-set-auto-save-file-name)))) --- 233,244 ---- (goto-char (point-min)) (search-forward "\n\n") (forward-char -1) ! (put-text-property ! (point) ! (progn ! (insert mail-header-separator) ! (point)) ! 'read-only t) (forward-line 1) (setq ga (message-fetch-field gnus-draft-meta-information-header)) (message-set-auto-save-file-name)))) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To change only message.el is not enough. When I save a message to the drafts folder and edit it then, then the text properties are not set accordingly and I cannot -- for example -- add a long Cc without auto-filling. And: The read-only property of the mail-header-separator causes an error. This change a. sets the 'field property to the header again (in `gnus-draft-edit-message') b. sets inhibit-read-only to t for the erasion of the buffer. (in `gnus-draft-setup'). I tested it with GNU Emacs 21.0.106 and GNU Emacs 20.7 (both only on a tty if that matters). I'm not familiar with XEmacs, so I could not set it up appropriately to run Gnus. But I checked in the Lispref that the functions/variables I added are known to XEmacs. 'oliver -- 22 Vendémiaire an 210 de la Révolution --=-=-=--