What is the easiest way to generate a header via posting-styles when *sending* the message, not when I enter the writing-buffer (or ;hatever the buffer is called)? For example, when I generate the Face-Header with the posting-styles, it is already shown in the buffer when I compose the message, which is really annoying as I don't need to edit the Face header in any way, so I don't need to see it. Of course this could be done with the send-hook, but it isn't that easy to combine it with the posting-styles, is it? We have the variable message-generate-headers-first with makes headers show up in the compose buffer, although they normally would be hidden. What about a new variable message-generate-headers-last which contains a list a of all headers I don't want to see in the writing buffer (e.g. Face, Organization)? I would be very happy if someone wrote a patch or tells me how to hide the headers. :) Sebastian
krause@sdbk.de (Sebastian D.B. Krause) writes:
> What is the easiest way to generate a header via posting-styles when
> *sending* the message, not when I enter the writing-buffer (or
> ;hatever the buffer is called)?
I think it was me who asked for seeing the headers earlier. I have
an address specifier in my posting styles, and so I can see
beforehand whether the right address will be used. And I can change
the decision before sending it.
I wonder if you could use (propertize "...original Face header..."
'invisible t) as the value of the Face header?
--
A preposition is not a good thing to end a sentence with.
On 3500 September 1993, Kai Großjohann wrote: > I wonder if you could use (propertize "...original Face header..." > 'invisible t) as the value of the Face header? I can't find any information about propertize. You should this look like?: (setq gnus-posting-styles '(((message-news-p) (organization "http://www.sdbk.de/") ("Face" (gnus-face-from-file (expand-file-name "~/.face.jpg")))))) I want to hide both headers.
"Sebastian D.B. Krause" <krause@sdbk.de> writes: > (setq gnus-posting-styles > '(((message-news-p) > (organization "http://www.sdbk.de/") > ("Face" (gnus-face-from-file (expand-file-name "~/.face.jpg")))))) ("Face" ,(propertize (gnus-face-from-file...) ...)) And you'll need to replace ' with ` at the beginning of the value to make the comma work. > I want to hide both headers. Hm. Not sure about that one... -- A preposition is not a good thing to end a sentence with.
krause@sdbk.de (Sebastian D.B. Krause) writes:
> What is the easiest way to generate a header via posting-styles when
> *sending* the message, not when I enter the writing-buffer (or
> ;hatever the buffer is called)?
Actually, that might not be trivial to implement in a general
manner. Global variables are used when doing the posting styles, and
they might change before you get to the point where you're ready to
send the message.
Now, you could generate the headers first via posting styles, and
then remove the headers and stuff them somewhere else, and not insert
them until you send the message. That's certainly possible... nay,
even desirable, now that I think about it. So I'll just implement
it.
And I'll do it in Message, as a regexp that matches headers to be
hidden. And I'll just make them invisible/intangible.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> And I'll do it in Message, as a regexp that matches headers to be
> hidden. And I'll just make them invisible/intangible.
What the...
If I try to do something like
(put-text-property (point-min) (point-max) 'invisible t)
in a Message buffer, it just doesn't take. It has no effect at all.
It works everywhere else.
Anybody got a clue?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > Anybody got a clue? Hm, how about C-h v message-strip-special-text-properties ? Cheers, -- Romain FRANCOISE <romain@orebokech.com> | They're nothing but scared it's a miracle -- http://orebokech.com/ | little mice.
Romain FRANCOISE <romain@orebokech.com> writes:
> Hm, how about C-h v message-strip-special-text-properties ?
Ah. Makes sense. :-)
How about if I just remove intangible and invisible from
`message-forbidden-properties'? That may be somewhat yucky, but I
think experience shows that generating References from the saving
hook, for instance, is error prone.
Invisible headers aren't an ideal solution, either, but it's safer, I
think...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > How about if I just remove intangible and invisible from > `message-forbidden-properties'? Would that mean that one could compose a message with invisible text (e.g. from a cut & paste), and send it as-is without knowing it? If yes, Message should check the body for text with such special properties and warn before sending, I think... (I really don't know if these properties "survive" a cut & paste.) (Or: in Message buffers, change buffer-invisibility-spec so that only the '(header) value makes text become invisible, this way text copied with the invisible property set to t would still be visible.) > Invisible headers aren't an ideal solution, either, but it's safer, I > think... In Larsi we trust. :-) -- Romain FRANCOISE <romain@orebokech.com> | I'm flooded out with energy, it's a miracle -- http://orebokech.com/ | energy and deceit.
Romain FRANCOISE <romain@orebokech.com> writes: > Message should check the body for text with such special properties > and warn before sending, I think... Hm, it already does. Sorry for the noise. :-) -- Romain FRANCOISE <romain@orebokech.com> | Every sky is blue, but not it's a miracle -- http://orebokech.com/ | for me and you.
Romain FRANCOISE <romain@orebokech.com> writes:
> Would that mean that one could compose a message with invisible text
> (e.g. from a cut & paste), and send it as-is without knowing it? If
> yes, Message should check the body for text with such special
> properties and warn before sending, I think...
There is already such a check in Message -- it will make the text
visible, and then query the user before sending. It would be nicer
to make the text be visible at once, though.
Instead of removing invisible and intangible from the list, I could
make the unhiding hook function just ignore the text that's marked
with `message-hidden', which is the case for the hidden header stuff.
Yes, I think I'll do that.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
On 3510 September 1993, Lars Magne Ingebrigtsen wrote:
> Now, you could generate the headers first via posting styles, and
> then remove the headers and stuff them somewhere else, and not insert
> them until you send the message. That's certainly possible... nay,
> even desirable, now that I think about it. So I'll just implement
> it.
Thanks, it's working great for me. :)
Sebastian
krause@sdbk.de (Sebastian D.B. Krause) writes:
> Thanks, it's working great for me. :)
It could be working better, I think. If I go to the top of the
buffer, and then hit <down> a few times, it stops when it gets to the
end of the headers. <right> takes me past the offending text.
Emacs just doesn't implement intangible text quite right.
Hm... Perhaps one could put the intangible text at the start of the
buffer...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> It could be working better, I think. If I go to the top of the
> buffer, and then hit <down> a few times, it stops when it gets to the
> end of the headers. <right> takes me past the offending text.
>
> Emacs just doesn't implement intangible text quite right.
I vaguely recall a change in the handling of invisible text recently,
so that you don't have to make it intangible. Maybe for CVS Emacs,
it works better to make it invisible but not intangible?
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> I vaguely recall a change in the handling of invisible text recently,
> so that you don't have to make it intangible. Maybe for CVS Emacs,
> it works better to make it invisible but not intangible?
Indeed, that does work better...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen