From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39255 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.gnus.general Subject: Re: auto-fill in body after "^[A-Za-z]: " Date: 12 Oct 2001 20:53:30 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174990 26906 80.91.224.250 (21 Oct 2002 04:36:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:36:30 +0000 (UTC) Summary: To put a text-property at the text in the header does allow to insert a header manually. I test it with this summary and it works. Cc: ding@gnus.org Return-Path: Original-Received: (qmail 13086 invoked from network); 12 Oct 2001 17:42:41 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 12 Oct 2001 17:42:41 -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 15s6KI-0000JM-00; Fri, 12 Oct 2001 12:42:26 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 12 Oct 2001 12:42:03 -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 MAA10592 for ; Fri, 12 Oct 2001 12:41:52 -0500 (CDT) Original-Received: (qmail 13070 invoked by alias); 12 Oct 2001 17:42:06 -0000 Original-Received: (qmail 13065 invoked from network); 12 Oct 2001 17:42:05 -0000 Original-Received: from 94-116.f.dial.o-tel-o.net (HELO localhost.localdomain) (212.144.94.116) by gnus.org with SMTP; 12 Oct 2001 17:42:05 -0000 Original-Received: (from egoge@localhost) by localhost.localdomain (8.11.4/8.11.4) id f9CIrUZ05616; Fri, 12 Oct 2001 20:53:30 +0200 X-Authentication-Warning: localhost.localdomain: egoge set sender to epameinondas@gmx.de using -f Original-To: Oliver Scholz In-Reply-To: X-attribution: os Original-Lines: 44 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.106 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39255 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39255 * "Simon" == Simon Josefsson writes: > Oliver Scholz writes: >> This is the offspring from a discussion on gnu.emacs.gnus about the >> fact that something like "Suggestion: bla bla ..." breaks auto-fill >> in message buffer. I have added the following to my .emacs to >> correct that behaviour while still inhibiting auto-fill in the >> header. Kai suggested that I should mail my code to this list. >> >> (defun os-header-set-text-property () "Put a text-property >> \"field\" with value \"header\" to the header lines." >> (save-excursion (put-text-property (point-min) (re-search-forward >> (concat "^" mail-header-separator) nil nil 1) 'field 'header))) >> >> >> (defun message-do-auto-fill () "Test if point is in message-header >> before auto-filling." (unless (text-property-any >> (line-beginning-position) (point) 'field 'header) (do-auto-fill))) > This doesn't work if I manually add a header, right? It wouldn't > have the proper text property. Oh, it does. In the header the character at point inherits the text property in question from the preceding one. This is at least true of GNU Emacs 21. As soon as I know how to use cvs I will test it with Emacs 20.7 and XEmacs 21.1.14 > Maybe the above be replaced by something such as the following? > (defun message-do-auto-fill () (when (> (point) (save-excursion > (rfc822-goto-eoh))) (do-auto-fill))) > (Btw, use `gnus-point-at-bol' instead of `line-beginning-position' > to make it works in XEmacs as well.) Ah, thank you for that information. 'oliver -- Oliver Scholz Taunusstr. 25 60329 Frankfurt am Main Tel. 069 97 40 99 42