Gnus development mailing list
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: ding@gnus.org
Subject: gnorb: minor and mayor suggestions
Date: Fri, 25 Mar 2016 17:58:00 +0000	[thread overview]
Message-ID: <87k2kqcudz.fsf@mat.ucm.es> (raw)

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.





             reply	other threads:[~2016-03-25 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 17:58 Uwe Brauer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2kqcudz.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).