* Automatically executing a function at sending
@ 2010-01-19 16:53 Merciadri Luca
2010-01-19 18:59 ` Richard Riley
[not found] ` <mailman.1719.1263927592.18930.info-gnus-english@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Merciadri Luca @ 2010-01-19 16:53 UTC (permalink / raw)
To: info-gnus-english
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have defined some function, say funcx, that is useful for me if it
is executed once I have finished writing my message (for Usenet or in
an e-mail). If this function is executed before writing the message,
that does the same effect. The only thing it needs is to be executed in an e-mail/group
posting buffer.
I currently do M-x funcx (manually), but I do not like manually doing things
that may be repeated.
Is there an alternative to this?
Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAktV44QACgkQM0LLzLt8MhyhywCbBvJxPsoomH2todLNFd0oUocn
su4AnioxSukQqwMqJhamdBLNS8oeOJsK
=YHLE
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatically executing a function at sending
2010-01-19 16:53 Automatically executing a function at sending Merciadri Luca
@ 2010-01-19 18:59 ` Richard Riley
[not found] ` <mailman.1719.1263927592.18930.info-gnus-english@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Richard Riley @ 2010-01-19 18:59 UTC (permalink / raw)
To: info-gnus-english
Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> writes:
> Hi,
>
> I have defined some function, say funcx, that is useful for me if it
> is executed once I have finished writing my message (for Usenet or in
> an e-mail). If this function is executed before writing the message,
> that does the same effect. The only thing it needs is to be executed in an e-mail/group
> posting buffer.
>
> I currently do M-x funcx (manually), but I do not like manually doing things
> that may be repeated.
>
> Is there an alternative to this?
>
> Thanks.
> --
> Merciadri Luca
> See http://www.student.montefiore.ulg.ac.be/~merciadri/
>
(your .sig separator should be "-- " btw)
Does this help?
,----
| (defun wicked/gnus-add-subject-to-bbdb-record ()
| "Add datestamped subject note for each person this message has been sent to."
| (let* ((subject (concat (format-time-string "%Y.%m.%d")
| ": E-mail: " (message-fetch-field "Subject") "\n"))
| (bbdb-get-addresses-headers
| (list (assoc 'recipients bbdb-get-addresses-headers)))
| records)
| (setq records
| (bbdb-update-records
| (bbdb-get-addresses nil gnus-ignored-from-addresses 'gnus-fetch-field)
| nil nil))
| (mapc (lambda (rec)
| (bbdb-record-putprop rec
| 'contact
| (concat subject
| (or
| (bbdb-record-getprop rec 'contact)
| ""))))
| records)))
|
| (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
`----
I borrowed it from Sacha Chua's website.
--
Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatically executing a function at sending
[not found] ` <mailman.1719.1263927592.18930.info-gnus-english@gnu.org>
@ 2010-01-20 17:43 ` Merciadri Luca
2010-01-20 17:57 ` Merciadri Luca
0 siblings, 1 reply; 4+ messages in thread
From: Merciadri Luca @ 2010-01-20 17:43 UTC (permalink / raw)
To: info-gnus-english
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard Riley <rileyrgdev@gmail.com> writes:
> (your .sig separator should be "-- " btw)
Huh.. I know. This is a problem due to Mailcrypt, which seems to be
deprecated. Sorry, I still had no time. If you are interested (and
maybe highly motivated, depending on your perseverance) in this, you may read
http://www.mail-archive.com/info-gnus-english@gnu.org/msg07571.html.
>
> Does this help?
>
> ,----
> | (defun wicked/gnus-add-subject-to-bbdb-record ()
> | "Add datestamped subject note for each person this message has been sent to."
> | (let* ((subject (concat (format-time-string "%Y.%m.%d")
> | ": E-mail: " (message-fetch-field "Subject") "\n"))
> | (bbdb-get-addresses-headers
> | (list (assoc 'recipients bbdb-get-addresses-headers)))
> | records)
> | (setq records
> | (bbdb-update-records
> | (bbdb-get-addresses nil gnus-ignored-from-addresses 'gnus-fetch-field)
> | nil nil))
> | (mapc (lambda (rec)
> | (bbdb-record-putprop rec
> | 'contact
> | (concat subject
> | (or
> | (bbdb-record-getprop rec 'contact)
> | ""))))
> | records)))
> |
> | (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
> `----
>
> I borrowed it from Sacha Chua's website.
I am going to try. I hope the
==
(add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
==
line does what I want. It would be so ... great!
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAktXQMgACgkQM0LLzLt8MhwHjQCfXsEUntZJObtxAhgvxjeEpOdb
AWIAnRky1mKRtMEt/ZfRWuIkYoC2Dv+s
=fKUS
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatically executing a function at sending
2010-01-20 17:43 ` Merciadri Luca
@ 2010-01-20 17:57 ` Merciadri Luca
0 siblings, 0 replies; 4+ messages in thread
From: Merciadri Luca @ 2010-01-20 17:57 UTC (permalink / raw)
To: info-gnus-english
On Jan 20, 6:43 pm, Merciadri Luca <Luca.Mercia...@student.ulg.ac.be>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Richard Riley <rileyrg...@gmail.com> writes:
> > (your .sig separator should be "-- " btw)
>
> Huh.. I know. This is a problem due to Mailcrypt, which seems to be
> deprecated. Sorry, I still had no time. If you are interested (and
> maybe highly motivated, depending on your perseverance) in this, you may read
> http://www.mail-archive.com/info-gnus-engl...@gnu.org/msg07571.html.
>
>
>
>
>
> > Does this help?
>
> > ,----
> > | (defun wicked/gnus-add-subject-to-bbdb-record ()
> > | "Add datestamped subject note for each person this message has been sent to."
> > | (let* ((subject (concat (format-time-string "%Y.%m.%d")
> > | ": E-mail: " (message-fetch-field "Subject") "\n"))
> > | (bbdb-get-addresses-headers
> > | (list (assoc 'recipients bbdb-get-addresses-headers)))
> > | records)
> > | (setq records
> > | (bbdb-update-records
> > | (bbdb-get-addresses nil gnus-ignored-from-addresses 'gnus-fetch-field)
> > | nil nil))
> > | (mapc (lambda (rec)
> > | (bbdb-record-putprop rec
> > | 'contact
> > | (concat subject
> > | (or
> > | (bbdb-record-getprop rec 'contact)
> > | ""))))
> > | records)))
> > |
> > | (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
> > `----
>
> > I borrowed it from Sacha Chua's website.
>
> I am going to try. I hope the
>
> ==
> (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
> ==
>
> line does what I want. It would be so ... great!
>
> - --
> Merciadri Luca
> Seehttp://www.student.montefiore.ulg.ac.be/~merciadri/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
>
> iEYEARECAAYFAktXQMgACgkQM0LLzLt8MhwHjQCfXsEUntZJObtxAhgvxjeEpOdb
> AWIAnRky1mKRtMEt/ZfRWuIkYoC2Dv+s
> =fKUS
> -----END PGP SIGNATURE-----
Still me. (Sorry, no PGP here.)
Works like a charm. Thanks! The
==
(add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
==
is actually evaluated _once_ the message has been prepared for
delivery.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-20 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 16:53 Automatically executing a function at sending Merciadri Luca
2010-01-19 18:59 ` Richard Riley
[not found] ` <mailman.1719.1263927592.18930.info-gnus-english@gnu.org>
2010-01-20 17:43 ` Merciadri Luca
2010-01-20 17:57 ` Merciadri Luca
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).