* How to know a mail is sent with gnus ?
@ 2011-02-13 20:07 Francis Moreau
2011-02-13 20:20 ` Tassilo Horn
2011-02-13 23:51 ` Andreas Schwab
0 siblings, 2 replies; 11+ messages in thread
From: Francis Moreau @ 2011-02-13 20:07 UTC (permalink / raw)
To: ding
Hi !
I'm writing a hook for 'message-send-hook' and I would like to know from
this hook if the current message has been sent by Gnus.
Could anybody tell me what I can test ?
Thanks
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-13 20:07 How to know a mail is sent with gnus ? Francis Moreau
@ 2011-02-13 20:20 ` Tassilo Horn
2011-02-13 21:32 ` Francis Moreau
2011-02-13 23:51 ` Andreas Schwab
1 sibling, 1 reply; 11+ messages in thread
From: Tassilo Horn @ 2011-02-13 20:20 UTC (permalink / raw)
To: ding
Francis Moreau <francis.moro@gmail.com> writes:
Hi Francis,
> I'm writing a hook for 'message-send-hook' and I would like to know
> from this hook if the current message has been sent by Gnus.
Sent by Gnus in contrast to rmail, which also started using message-mode
recently, right?
> Could anybody tell me what I can test ?
At least `org-gnus.el' checks for Message-Id and Gcc headers to store
links to Gnus messages that haven't been sent at the time of linking
yet. I might be wrong, but I think Gcc headers are a Gnus invention.
Bye,
Tassilo
--
Sent from my Emacs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-13 20:20 ` Tassilo Horn
@ 2011-02-13 21:32 ` Francis Moreau
2011-02-14 7:28 ` Tassilo Horn
0 siblings, 1 reply; 11+ messages in thread
From: Francis Moreau @ 2011-02-13 21:32 UTC (permalink / raw)
To: Tassilo Horn; +Cc: ding
Tassilo Horn <tassilo@member.fsf.org> writes:
> Francis Moreau <francis.moro@gmail.com> writes:
>
>> I'm writing a hook for 'message-send-hook' and I would like to know
>> from this hook if the current message has been sent by Gnus.
>
> Sent by Gnus in contrast to rmail, which also started using message-mode
> recently, right?
>
You're right.
>
>> Could anybody tell me what I can test ?
>
> At least `org-gnus.el' checks for Message-Id and Gcc headers to store
> links to Gnus messages that haven't been sent at the time of linking
> yet. I might be wrong, but I think Gcc headers are a Gnus invention.
>
The thing is that I don't always use Gcc header. For mailing lists for
example, I don't use it since I'm going to receive a copy of the mail
anyways.
Thanks
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-13 20:07 How to know a mail is sent with gnus ? Francis Moreau
2011-02-13 20:20 ` Tassilo Horn
@ 2011-02-13 23:51 ` Andreas Schwab
2011-02-14 8:05 ` Francis Moreau
1 sibling, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2011-02-13 23:51 UTC (permalink / raw)
To: ding
Francis Moreau <francis.moro@gmail.com> writes:
> I'm writing a hook for 'message-send-hook' and I would like to know from
> this hook if the current message has been sent by Gnus.
Why do you need to know that?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-13 21:32 ` Francis Moreau
@ 2011-02-14 7:28 ` Tassilo Horn
2011-02-14 7:55 ` Francis Moreau
0 siblings, 1 reply; 11+ messages in thread
From: Tassilo Horn @ 2011-02-14 7:28 UTC (permalink / raw)
To: ding
Francis Moreau <francis.moro@gmail.com> writes:
Hi Francis,
>>> Could anybody tell me what I can test ?
>>
>> At least `org-gnus.el' checks for Message-Id and Gcc headers to store
>> links to Gnus messages that haven't been sent at the time of linking
>> yet. I might be wrong, but I think Gcc headers are a Gnus invention.
>>
>
> The thing is that I don't always use Gcc header. For mailing lists for
> example, I don't use it since I'm going to receive a copy of the mail
> anyways.
Hm, I always set a Gcc. For normal groups it's the group itself, and
for mailing list groups, I set a Gcc to my "Sent Messages" group.
Instead of looking at the Gcc, you could set
`message-generate-headers-first' to t and make User-Agent non-optional
in `message-required-mail-headers'. That should insert a User-Agent
header with Gnus + version as contents as soon as you write a mail from
inside Gnus.
HTH,
Tassilo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-14 7:28 ` Tassilo Horn
@ 2011-02-14 7:55 ` Francis Moreau
0 siblings, 0 replies; 11+ messages in thread
From: Francis Moreau @ 2011-02-14 7:55 UTC (permalink / raw)
To: Tassilo Horn; +Cc: ding
Hi Tassilo,
Tassilo Horn <tassilo@member.fsf.org> writes:
> Francis Moreau <francis.moro@gmail.com> writes:
>
>>>> Could anybody tell me what I can test ?
>>>
>>> At least `org-gnus.el' checks for Message-Id and Gcc headers to store
>>> links to Gnus messages that haven't been sent at the time of linking
>>> yet. I might be wrong, but I think Gcc headers are a Gnus invention.
>>>
>>
>> The thing is that I don't always use Gcc header. For mailing lists for
>> example, I don't use it since I'm going to receive a copy of the mail
>> anyways.
>
> Hm, I always set a Gcc. For normal groups it's the group itself, and
> for mailing list groups, I set a Gcc to my "Sent Messages" group.
>
Hmm, I think I could use the "Sent Messages" group for mailing list
groups.
>
> Instead of looking at the Gcc, you could set
> `message-generate-headers-first' to t and make User-Agent non-optional
> in `message-required-mail-headers'. That should insert a User-Agent
> header with Gnus + version as contents as soon as you write a mail from
> inside Gnus.
>
Ah, that's another possibility which sounds good.
Thanks Tassilo for your suggestions.
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-13 23:51 ` Andreas Schwab
@ 2011-02-14 8:05 ` Francis Moreau
2011-02-15 1:03 ` Dave Goldberg
0 siblings, 1 reply; 11+ messages in thread
From: Francis Moreau @ 2011-02-14 8:05 UTC (permalink / raw)
To: Andreas Schwab; +Cc: ding
Andreas Schwab <schwab@linux-m68k.org> writes:
> Francis Moreau <francis.moro@gmail.com> writes:
>
>> I'm writing a hook for 'message-send-hook' and I would like to know from
>> this hook if the current message has been sent by Gnus.
>
> Why do you need to know that?
>
Because I have this in my .emacs:
(setq mail-default-headers
(concat "Bcc: " user-mail-address "\n"))
that is I want to receive a copy of my emails sent from emacs but not by
gnus itself.
When writing stuff with Gnus, I prefer to use Gcc header. Therefore when
I'm writing email from Gnus, I want to drop the Bcc header automatically
set.
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-14 8:05 ` Francis Moreau
@ 2011-02-15 1:03 ` Dave Goldberg
2011-02-15 7:59 ` Francis Moreau
0 siblings, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2011-02-15 1:03 UTC (permalink / raw)
To: ding
> Andreas Schwab <schwab@linux-m68k.org> writes:
>> Francis Moreau <francis.moro@gmail.com> writes:
>>
>>> I'm writing a hook for 'message-send-hook' and I would like to know from
>>> this hook if the current message has been sent by Gnus.
>>
>> Why do you need to know that?
>>
> Because I have this in my .emacs:
> (setq mail-default-headers
> (concat "Bcc: " user-mail-address "\n"))
> that is I want to receive a copy of my emails sent from emacs but not by
> gnus itself.
> When writing stuff with Gnus, I prefer to use Gcc header. Therefore when
> I'm writing email from Gnus, I want to drop the Bcc header automatically
> set.
Perhaps a call to message-remove-header in message-setup-hook will work?
--
Dave Goldberg
david.goldberg6@verizon.net
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-15 1:03 ` Dave Goldberg
@ 2011-02-15 7:59 ` Francis Moreau
2011-02-15 22:36 ` Dave Goldberg
0 siblings, 1 reply; 11+ messages in thread
From: Francis Moreau @ 2011-02-15 7:59 UTC (permalink / raw)
To: Dave Goldberg; +Cc: ding
david.goldberg6@verizon.net (Dave Goldberg) writes:
>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>> Francis Moreau <francis.moro@gmail.com> writes:
>>>
>>>> I'm writing a hook for 'message-send-hook' and I would like to know from
>>>> this hook if the current message has been sent by Gnus.
>>>
>>> Why do you need to know that?
>>>
>
>> Because I have this in my .emacs:
>
>> (setq mail-default-headers
>> (concat "Bcc: " user-mail-address "\n"))
>
>> that is I want to receive a copy of my emails sent from emacs but not by
>> gnus itself.
>
>> When writing stuff with Gnus, I prefer to use Gcc header. Therefore when
>> I'm writing email from Gnus, I want to drop the Bcc header automatically
>> set.
>
> Perhaps a call to message-remove-header in message-setup-hook will
> work?
But isn't that new hook be installed for my whole emacs session ?
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-15 7:59 ` Francis Moreau
@ 2011-02-15 22:36 ` Dave Goldberg
2011-02-19 11:15 ` Francis Moreau
0 siblings, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2011-02-15 22:36 UTC (permalink / raw)
To: ding
> david.goldberg6@verizon.net (Dave Goldberg) writes:
>>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>>> Francis Moreau <francis.moro@gmail.com> writes:
>>>>
>>>>> I'm writing a hook for 'message-send-hook' and I would like to know from
>>>>> this hook if the current message has been sent by Gnus.
>>>>
>>>> Why do you need to know that?
>>>>
>>
>>> Because I have this in my .emacs:
>>
>>> (setq mail-default-headers
>>> (concat "Bcc: " user-mail-address "\n"))
>>
>>> that is I want to receive a copy of my emails sent from emacs but not by
>>> gnus itself.
>>
>>> When writing stuff with Gnus, I prefer to use Gcc header. Therefore when
>>> I'm writing email from Gnus, I want to drop the Bcc header automatically
>>> set.
>>
>> Perhaps a call to message-remove-header in message-setup-hook will
>> work?
> But isn't that new hook be installed for my whole emacs session ?
Yes, sorry, I should have said gnus-message-setup-hook, which I would hope that other modes that use message do not call.
--
Dave Goldberg
david.goldberg6@verizon.net
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to know a mail is sent with gnus ?
2011-02-15 22:36 ` Dave Goldberg
@ 2011-02-19 11:15 ` Francis Moreau
0 siblings, 0 replies; 11+ messages in thread
From: Francis Moreau @ 2011-02-19 11:15 UTC (permalink / raw)
To: Dave Goldberg; +Cc: ding
david.goldberg6@verizon.net (Dave Goldberg) writes:
>> david.goldberg6@verizon.net (Dave Goldberg) writes:
>>>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>>>> Francis Moreau <francis.moro@gmail.com> writes:
>
>>>>>
>>>>>> I'm writing a hook for 'message-send-hook' and I would like to know from
>>>>>> this hook if the current message has been sent by Gnus.
>>>>>
>>>>> Why do you need to know that?
>>>>>
>>>
>>>> Because I have this in my .emacs:
>>>
>>>> (setq mail-default-headers
>>>> (concat "Bcc: " user-mail-address "\n"))
>>>
>>>> that is I want to receive a copy of my emails sent from emacs but not by
>>>> gnus itself.
>>>
>>>> When writing stuff with Gnus, I prefer to use Gcc header. Therefore when
>>>> I'm writing email from Gnus, I want to drop the Bcc header automatically
>>>> set.
>>>
>>> Perhaps a call to message-remove-header in message-setup-hook will
>>> work?
>
>> But isn't that new hook be installed for my whole emacs session ?
>
> Yes, sorry, I should have said gnus-message-setup-hook, which I would hope that other modes that use message do not call.
Ah, yes indeed that's a good idea, assuming that no other modes call
this hook, but that would be pretty silly I think.
Thanks
--
Francis
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-02-19 11:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-13 20:07 How to know a mail is sent with gnus ? Francis Moreau
2011-02-13 20:20 ` Tassilo Horn
2011-02-13 21:32 ` Francis Moreau
2011-02-14 7:28 ` Tassilo Horn
2011-02-14 7:55 ` Francis Moreau
2011-02-13 23:51 ` Andreas Schwab
2011-02-14 8:05 ` Francis Moreau
2011-02-15 1:03 ` Dave Goldberg
2011-02-15 7:59 ` Francis Moreau
2011-02-15 22:36 ` Dave Goldberg
2011-02-19 11:15 ` Francis Moreau
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).