From: Oliver Scholz <oscholz@my.gnus.org>
Subject: Re: auto-fill in body after "^[A-Za-z]: "
Date: Sat, 13 Oct 2001 14:34:06 +0200 [thread overview]
Message-ID: <m3bsjbaic6.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: <vafhet4h58p.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de>
* "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
> Oliver Scholz <epameinondas@gmx.de> writes:
>> * there are some headers that are inserted *after* the
>> text-property 'field 'header is set. In my header the whole block:
q> Hm. I hope that it is okay to insert the headers at a later time.
> But maybe the problem is that the headers are inserted outside of
> the region of the text property? That would be bad.
The Elisp-manual states[1] that that "ordinary text insertion
functions such as `insert' do not inherit any properties". To insert
text that inherits text properties one could use `insert-and-inherit'.
But: I had a look at XEmacs. `insert-and-inherit' is there, but it is
declared "obsolete" (?):
,----[ C-h f insert-and-inherit RET in XEmacs 21.1.14 ]
| `insert-and-inherit' is an alias for `insert', a built-in function
| -- loaded from "/usr/local/src/xemacs-21.1.14/lisp/obsolete.elc"
|
| Emacs Compatible; use `insert' instead.
|
| Documentation:
| Insert the arguments, either strings or characters, at point.
| Point moves forward so that it ends up after the inserted text.
| Any other markers at the point of insertion remain before the text.
| If a string has non-null string-extent-data, new extents will be created.
`----
> I just now tried to type something after the last header. It was
> not wrapped. Right now, the header region looks like this:
> /---- | X-Draft-From: ("nnimap:INBOX.auto.gnus" 7800) | To: Oliver
> Scholz <epameinondas@gmx.de> | Cc: ding@gnus.org | Subject: Re:
> auto-fill in body after "^[A-Za-z]: " | References:
> <m3y9mht2b0.fsf@ID-87814.user.dfncis.de> |
> <vafsncphu81.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> |
> <m3vghk7f7e.fsf@ID-87814.user.dfncis.de> | --text follows this
> line-- \----
> And typing in the line just before `text follows this line' means
> that the text does not wrap -- and it is not supposed to wrap.
[...]
Hmm. That's definitely not the case on my system. I tested this with
`list-text-properties-at': If I use the message.el from CVS, some of
the header lines don't have the 'field 'header property.
I used `edebug-defun' on `message-setup-1' to see, what happens where:
Everything is fine, until `(run-hooks 'message-setup-hook)' at the
end. Then a lot of stuff (posting-styles stuff) is added in the header
which does not inherit the 'field property.
Ah! But I see now: the difference is not so strange: In *your* header
the last header-line before "--text follows this line --" is
"References: ..." That header line has the text property in question
on my system, too.
I fiddled a bit with message.el.
I added the following right after `(run-hooks 'message-setup-hook) and
that works:
(save-restriction
(message-narrow-to-headers)
(put-text-property (point-min) (point-max) 'field 'header))
Hmmm. Maybe that is not very nice, because then I have two times
`(save-restriction (message-narrow-to-headers) ....)' in the same
function?
'oliver
Footnotes:
[1] Usual caveat whenever *I* --being a newby -- say something about
the Elisp manual: `*if* I understand it correctly'.
--
22 Vendémiaire an 210 de la Révolution
next prev parent reply other threads:[~2001-10-13 12:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-12 13:28 Oliver Scholz
2001-10-12 13:18 ` Kai Großjohann
2001-10-12 14:57 ` David S. Goldberg
2001-10-12 20:53 ` Oliver Scholz
2001-10-12 22:18 ` Kai Großjohann
2001-10-13 12:34 ` Oliver Scholz [this message]
2001-10-13 19:52 ` Kai Großjohann
2001-10-13 12:42 ` Oliver Scholz
2001-10-13 12:48 ` Oliver Scholz
2001-10-13 20:36 ` patches (Re: auto-fill in body after "^[A-Za-z]: ") Oliver Scholz
2001-10-13 19:55 ` Kai Großjohann
2001-10-14 1:02 ` Henrik Enberg
2001-10-15 20:47 ` Oliver Scholz
2001-10-15 20:37 ` Kai Großjohann
2001-10-16 0:04 ` Oliver Scholz
2001-10-16 8:27 ` Kai Großjohann
2001-10-19 6:41 ` Per Abrahamsen
2001-10-19 9:21 ` Kai Großjohann
2001-10-19 10:10 ` Per Abrahamsen
2001-10-19 11:41 ` Kai Großjohann
2001-10-19 13:27 ` Per Abrahamsen
2001-10-19 16:29 ` Kai Großjohann
2001-10-13 19:56 ` Kai Großjohann
2001-10-12 15:51 ` auto-fill in body after "^[A-Za-z]: " Simon Josefsson
2001-10-12 16:45 ` Kai Großjohann
2001-10-12 17:05 ` Paul Jarc
2001-10-12 17:10 ` Paul Jarc
2001-10-12 17:16 ` Kai Großjohann
2001-10-12 17:09 ` ShengHuo ZHU
2001-10-12 17:22 ` Kai Großjohann
2001-10-12 17:19 ` Simon Josefsson
2001-10-12 18:53 ` Oliver Scholz
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=m3bsjbaic6.fsf@ID-87814.user.dfncis.de \
--to=oscholz@my.gnus.org \
/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).