* Re: Capturing outgoing gnus e-mail
@ 2014-06-14 14:43 Marvin Doyley
0 siblings, 0 replies; 9+ messages in thread
From: Marvin Doyley @ 2014-06-14 14:43 UTC (permalink / raw)
Cc: eric, emacs-orgmode
I love it
Thanks
Cheers,
M
Sent from my iPhone
** May contain typos**
^ permalink raw reply [flat|nested] 9+ messages in thread
* Capturing outgoing gnus e-mail
@ 2014-06-14 8:32 Ivan Kanis
2014-06-14 9:05 ` Bastien
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ivan Kanis @ 2014-06-14 8:32 UTC (permalink / raw)
To: Gnus General, org mode
Hi,
I would like to capture outgoing e-mail in my org file.
I use the gcc mechanism in gnus with a nnml backend.
I think I have read on the org mailing list that someone has implemented
that feature. I did a search but could not find the article.
I tried implementing it myself. I had a look at the function
gnus-inews-do-gcc. It has the group and the article number. However org
link expect the Message-ID header. How do I get it?
Thanks,
Ivan
--
Software uses US measurements, but the OS is in metric...
-- BOFH excuse #24
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Capturing outgoing gnus e-mail
2014-06-14 8:32 Ivan Kanis
@ 2014-06-14 9:05 ` Bastien
2014-12-15 12:08 ` Uwe Brauer
2014-06-14 10:06 ` Eric Abrahamsen
2014-09-24 21:04 ` Ted Zlatanov
2 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2014-06-14 9:05 UTC (permalink / raw)
To: Ivan Kanis; +Cc: org mode, Gnus General
Hi Ivan,
this is what I use :
========================================================================
;; Hack to store Org links upon sending Gnus messages
(defun bzg-message-send-and-org-gnus-store-link (&optional arg)
"Send message with `message-send-and-exit' and store org link to message copy.
If multiple groups appear in the Gcc header, the link refers to
the copy in the last group."
(interactive "P")
(save-excursion
(save-restriction
(message-narrow-to-headers)
(let ((gcc (car (last
(message-unquote-tokens
(message-tokenize-header
(mail-fetch-field "gcc" nil t) " ,")))))
(buf (current-buffer))
(message-kill-buffer-on-exit nil)
id to from subject desc link newsgroup xarchive)
(message-send-and-exit arg)
(or
;; gcc group found ...
(and gcc
(save-current-buffer
(progn (set-buffer buf)
(setq id (org-remove-angle-brackets
(mail-fetch-field "Message-ID")))
(setq to (mail-fetch-field "To"))
(setq from (mail-fetch-field "From"))
(setq subject (mail-fetch-field "Subject"))))
(org-store-link-props :type "gnus" :from from :subject subject
:message-id id :group gcc :to to)
(setq desc (org-email-link-description))
(setq link (org-gnus-article-link
gcc newsgroup id xarchive))
(setq org-stored-links
(cons (list link desc) org-stored-links)))
;; no gcc group found ...
(message "Can not create Org link: No Gcc header found."))))))
(define-key message-mode-map [(control c) (control meta c)]
'bzg-message-send-and-org-gnus-store-link)
========================================================================
Then, in a message, I use C-c C-M-c instead of C-c C-c to send the
message and create a link to it that I can reinsert later one. This
is not really capturing, but it's good enough for my needs.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Capturing outgoing gnus e-mail
2014-06-14 9:05 ` Bastien
@ 2014-12-15 12:08 ` Uwe Brauer
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2014-12-15 12:08 UTC (permalink / raw)
To: emacs-orgmode; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
>> "Bastien" == Bastien <bzg@gnu.org> writes:
Hi Bastien
I just saw your code
> Hi Ivan,
> this is what I use :
> ========================================================================
> ;; Hack to store Org links upon sending Gnus messages
> (defun bzg-message-send-and-org-gnus-store-link (&optional arg)
> (define-key message-mode-map [(control c) (control meta c)]
> 'bzg-message-send-and-org-gnus-store-link)
> ========================================================================
> Then, in a message, I use C-c C-M-c instead of C-c C-c to send the
> message and create a link to it that I can reinsert later one. This
> is not really capturing, but it's good enough for my needs.
I tried it out and it is nice, the only thing which is missing is to
insert automatically the link into an org file or the diary if you want.
When I call org-insert-link an interactive query started which is nice
but in this case time consuming
regards
Uwe Brauer
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Capturing outgoing gnus e-mail
2014-06-14 8:32 Ivan Kanis
2014-06-14 9:05 ` Bastien
@ 2014-06-14 10:06 ` Eric Abrahamsen
2014-06-16 2:08 ` Esben Stien
2014-09-24 21:04 ` Ted Zlatanov
2 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2014-06-14 10:06 UTC (permalink / raw)
To: emacs-orgmode; +Cc: ding
Ivan Kanis <ivan@kanis.fr> writes:
> Hi,
>
> I would like to capture outgoing e-mail in my org file.
>
> I use the gcc mechanism in gnus with a nnml backend.
>
> I think I have read on the org mailing list that someone has implemented
> that feature. I did a search but could not find the article.
>
> I tried implementing it myself. I had a look at the function
> gnus-inews-do-gcc. It has the group and the article number. However org
> link expect the Message-ID header. How do I get it?
>
> Thanks,
>
> Ivan
Hi Ivan,
That's something that Gnorb[1] can do. Make a capture template that
you want to use for outgoing mail TODOs, and identify it:
(setq gnorb-gnus-new-todo-capture-key "O")
Then, while you're composing the email, call
`gnorb-gnus-outgoing-do-todo' in the message buffer, which I have bound
to "C-c t".
You can also call it *after* sending the message, if you forgot, and it
will initiate the same process from the last sent message.
It works best when you're using Gcc, as that means Org is able to make a
real link to the sent message. Gnorb will try to fake it, if you're not.
If you set (setq gnorb-gnus-hint-relevant-article t), Gnorb will even
notify you when you get a reply to your sent message.
It's early days for Gnorb, but this part of it works well for me. I'd
love a little more road-testing, if you're interested!
I'm going to stick it in ELPA in a month or so, but for now:
[1]: https://github.com/girzel/gnorb
Hope it helps!
E
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Capturing outgoing gnus e-mail
2014-06-14 8:32 Ivan Kanis
2014-06-14 9:05 ` Bastien
2014-06-14 10:06 ` Eric Abrahamsen
@ 2014-09-24 21:04 ` Ted Zlatanov
2014-12-14 22:58 ` Uwe Brauer
2 siblings, 1 reply; 9+ messages in thread
From: Ted Zlatanov @ 2014-09-24 21:04 UTC (permalink / raw)
To: ding; +Cc: emacs-orgmode
On Sat, 14 Jun 2014 10:32:49 +0200 Ivan Kanis <ivan@kanis.fr> wrote:
IK> I would like to capture outgoing e-mail in my org file.
IK> I use the gcc mechanism in gnus with a nnml backend.
IK> I think I have read on the org mailing list that someone has implemented
IK> that feature. I did a search but could not find the article.
IK> I tried implementing it myself. I had a look at the function
IK> gnus-inews-do-gcc. It has the group and the article number. However org
IK> link expect the Message-ID header. How do I get it?
Well, I use the following to maintain a diary file. It's probably
equally easy to use a Org file:
(defun message-to-diary ()
(make-diary-entry (concat
(format-time-string "%B %d, %Y %H:%M" (gnus-date-get-time (message-fetch-field "date")))
(if (message-fetch-field "newsgroups")
(concat " Sent news To: " (message-fetch-field "newsgroups"))
(concat " Sent mail To: " (message-fetch-field "to")))
" Subject: \"" (message-fetch-field "subject") "\""
" Message-ID: " (message-fetch-field "message-id")))
(save-buffer "diary"))
(add-hook 'message-sent-hook 'message-to-diary)
HTH
Ted
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-12-15 12:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-14 14:43 Capturing outgoing gnus e-mail Marvin Doyley
-- strict thread matches above, loose matches on Subject: below --
2014-06-14 8:32 Ivan Kanis
2014-06-14 9:05 ` Bastien
2014-12-15 12:08 ` Uwe Brauer
2014-06-14 10:06 ` Eric Abrahamsen
2014-06-16 2:08 ` Esben Stien
2014-06-16 13:29 ` Eric Abrahamsen
2014-09-24 21:04 ` Ted Zlatanov
2014-12-14 22:58 ` Uwe Brauer
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.