Gnus development mailing list
 help / color / mirror / Atom feed
* gnorb: minor and mayor suggestions
@ 2016-03-25 17:58 Uwe Brauer
  2016-03-26  4:53 ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2016-03-25 17:58 UTC (permalink / raw)
  To: ding

Hi

First of all thanks to Eric for providing that package.[1] I thought of
sending him a private mail with some questions/suggestions but may be this
newsgroup is the better place.

Now I have 1 minor and two mayor suggestions (maybe they are already
implemented and I failed to find them).

* minor: right now my org template looks like
("r" "Reply" entry (file+headline "~/Mail/TODO-email.org" "Emails")
	 "** REPLY %a %?" :gnus-attachments t)

which is fine for the reply mails, but I would like to have something
similar for *composing messages*. So the idea would be to start from the
bbdb and then add a similar entry to TODO-email.org.


* mayor: editing emails in an org buffer and later send them.

  For some emails it turns out to be better to edit them in an
  org mode buffer, for example if I would like to edit a table and
  orgtbl-mode in message would not be enough. Right now I start editing
  those message in an org-file and then use the following function 

which I found in

http://kitchingroup.cheme.cmu.edu/blog/2014/06/08/Better-integration-of-org-mode-and-email/

(defun email-heading ()
  "Send the current org-mode heading as the body of an email,
  with headline as the subject. use these properties TO
OTHER-HEADERS is an alist specifying additional header fields.
Elements look like (HEADER . VALUE) where both HEADER and VALUE
are strings. save when it was sent as s SENT property. this is
overwritten on subsequent sends. could save them all in a
logbook?"
  (interactive)
  ; store location.
  (setq *email-heading-point* (set-marker (make-marker) (point)))
  (org-mark-subtree)
  (let ((content (buffer-substring (point) (mark)))
	(TO (org-entry-get (point) "TO" t))
	(CC (org-entry-get (point) "CC" t))
	(BCC (org-entry-get (point) "BCC" t))
	(SUBJECT (nth 4 (org-heading-components)))
	(OTHER-HEADERS (eval (org-entry-get (point) "OTHER-HEADERS")))
	(continue nil)
	(switch-function nil)
	(yank-action nil)
	(send-actions '((email-send-action . nil)))
	(return-action '(email-heading-return)))
    
    (compose-mail TO SUBJECT OTHER-HEADERS continue switch-function yank-action send-actions return-action)
    (message-goto-body)
    (insert content)
    (when CC
      (message-goto-cc)
      (insert CC))
    (when BCC
      (message-goto-bcc)
      (insert BCC))
    (if TO
	(message-goto-body)
      (message-goto-to))))

Could gnorb provide a similar functionality?

Whats about replying email? The above functions will copy all the text
below the org header into a message-buffer.

I modified it so that if I already hit the reply button but switch to
the org buffer, then the modified function copies the content below the
org header in that reply buffer.

Could gnorb provide a similar functionality?


Thanks

Uwe Brauer 


Footnotes: 
[1]   Till I got gnorb to work, I usually produced my TODO emails (TODO
      replies) by calling message-mail or reply and saved the message in
      the draft group. Now I run the org-template and save by TODO
      replies in on org buffer.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-27  2:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-25 17:58 gnorb: minor and mayor suggestions Uwe Brauer
2016-03-26  4:53 ` Eric Abrahamsen
2016-03-26  8:57   ` Uwe Brauer
2016-03-27  2:37     ` Eric Abrahamsen
2016-03-26 16:23   ` Uwe Brauer

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).