emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* sending an email to an orgmode file?
@ 2016-12-21 10:36 Xebar Saram
  2016-12-21 17:18 ` Richard Lawrence
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xebar Saram @ 2016-12-21 10:36 UTC (permalink / raw)
  To: org mode

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi

im looking for a simple solution that will allow me to send an email from
my mobile phone and habr that email either be appended to a txt(org) file
or perhaps another solution to get my mobile on the go notes onto my laptop
orgmode file. i tried orgzly and mobile org but i would prefer a simple
solution as to send an email

anyone have any thoughts on this?

best

Z

[-- Attachment #2: Type: text/html, Size: 493 bytes --]

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

* Re: sending an email to an orgmode file?
  2016-12-21 10:36 sending an email to an orgmode file? Xebar Saram
@ 2016-12-21 17:18 ` Richard Lawrence
       [not found] ` <20b6df15a79842e094d01fcc2ed2eda8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2016-12-22 10:21 ` Karl Voit
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Lawrence @ 2016-12-21 17:18 UTC (permalink / raw)
  To: Xebar Saram, org mode

Hi Xebar,

Xebar Saram <zeltakc@gmail.com> writes:

> im looking for a simple solution that will allow me to send an email from
> my mobile phone and habr that email either be appended to a txt(org) file
> or perhaps another solution to get my mobile on the go notes onto my laptop
> orgmode file. i tried orgzly and mobile org but i would prefer a simple
> solution as to send an email
>
> anyone have any thoughts on this?

I'd say a lot depends on the mail setup you use on the machine where
you use Org.  Emacs-based mail clients will be easier to integrate with
Org.  But really you're just limited by how much effort you want to sink
into this, at least if you store your mail in some format that is easy
to read with various tools.

If you use Gnus, one solution (I think?) is Gnorb:

https://elpa.gnu.org/packages/gnorb.html

I don't actually use this or know much about it but other people on this
list can tell you more about it.

In my own setup, I've settled on just making it easy to linking to an
email from a new TODO entry.  This is a very general mechanism that
works well for me, even though it is not completely automatic.  I
describe my setup below.

I use the Emacs interface for notmuch as my mail client.  I integrate it
with Org via org-notmuch and Org capturing.  Basically, I have a key that
automates capturing an email as a TODO item, containing a link to the
relevant mail:

#+BEGIN_SRC elisp
;; in my Org setup:

(require 'org-notmuch)

(setq org-capture-templates
        ; ...
      `(("t" "Task, Note, Project, etc.")
	("tm" "Mail" entry
	 (file ,(concat org-directory "/refile.org"))
	 (file ,(concat org-template-directory "/mail-with-link.txt")))))

;; in my notmuch setup:
  (define-key notmuch-search-mode-map "P"
    (lambda ()
      "postpone message (remove inbox tag, create task to reply)"
      (interactive)
      (notmuch-search-tag '("-inbox" "-unread"))
      (notmuch-search-show-thread)
      (org-capture nil "tm")))
#+END_SRC

The mail-with-link.txt template is simple:

#+BEGIN_SRC org
* %a			:MAIL:
  :PROPERTIES:
  :Entered: %U
  :END:
  %? 
#+END_SRC

I mostly use this to record emails that I need to *reply* to as TODO
items, so a link to the original mail is enough for me.  

This probably isn't quite what you're looking for, but with more effort
on the notmuch side, a setup like this could be used to extract the
content of the email into the Org capture.  And you could also automate
this by looping over the messages that match a certain notmuch query,
etc.  
 
HTH,
Richard

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

* Re: sending an email to an orgmode file?
       [not found] ` <20b6df15a79842e094d01fcc2ed2eda8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-12-21 17:36   ` Eric S Fraga
  0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2016-12-21 17:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

On Wednesday, 21 Dec 2016 at 17:18, Richard Lawrence wrote:

[...]

> In my own setup, I've settled on just making it easy to linking to an
> email from a new TODO entry.  This is a very general mechanism that
> works well for me, even though it is not completely automatic.  I
> describe my setup below.


I do the same thing, using the following template for org-capture which
creates a task:

#+begin_src emacs-lisp
  ("mt"
   "mailtodo"
   entry (file+datetree "~/s/notes/tasks.org")
   "* TODO %^{Task} : %:subject %^G\nSCHEDULED: %t\n- From :: %:from\n- Subject :: %:subject\n- Email :: %a\n\n%?"
   :kill-buffer t)
#+end_src 

I have an equivalent capture template for notes based on emails.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: sending an email to an orgmode file?
  2016-12-21 10:36 sending an email to an orgmode file? Xebar Saram
  2016-12-21 17:18 ` Richard Lawrence
       [not found] ` <20b6df15a79842e094d01fcc2ed2eda8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-12-22 10:21 ` Karl Voit
  2 siblings, 0 replies; 4+ messages in thread
From: Karl Voit @ 2016-12-22 10:21 UTC (permalink / raw)
  To: emacs-orgmode

In case you do have access to your mail server:

* Xebar Saram <zeltakc@gmail.com> wrote:
>
> im looking for a simple solution that will allow me to send an email from
> my mobile phone and habr that email either be appended to a txt(org) file
> or perhaps another solution to get my mobile on the go notes onto my laptop
> orgmode file. i tried orgzly and mobile org but i would prefer a simple
> solution as to send an email

Since I do not use an Emacs-based mail setup, I created a workaround
by bouncing relevant emails to a special email address I use for
forwarding emails to Org-mode. I am maintaining my own email server
and I am using procmail[1] to filter/preprocess emails.

When an email is found to that specific email address the following
rule applies:

,----
| :0
| * ^(Resent-To|X-Original-To|To|Bcc|Cc): orgmode@MY-DOMAIN.AT
| {
|     :0
|     |/home/karl/src/vk-add-email-to-org.sh
| }
`----

With the script:

,----[ vk-add-email-to-org.sh ]
| #!/bin/sh
|
| ## generates an org-file-entry from the email sent through stdin
|
| ORGFILE="/home/karl/org/inbox.org"
|
| ## build email by adding input from stdin line by line:
| while IFS= read -r line
| do
| email="${email}
| ${line}"
| done
|
| subject=`echo "${email}"|formail -x "Subject"`
| header=`echo "${email}"|formail -X "From" -X "Subject" -X "Date" -X "Message-ID" -X "To"`
| body=`echo "${email}"| sed -e '1,/^$/ d'`
|
| echo "* TODO Email:"${subject} >> ${ORGFILE}
| echo >> ${ORGFILE}
| echo "#+BEGIN_QUOTE" >> ${ORGFILE}
| echo "${header}" >> ${ORGFILE}
| echo "#+END_QUOTE" >> ${ORGFILE}
| echo  >> ${ORGFILE}
`----

Refiling from my inbox.org is the same process as refiling my input from
MobileOrg.

HTH

[1] Please start with mailfilter instead if you do a fresh start.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github

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

end of thread, other threads:[~2016-12-22 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 10:36 sending an email to an orgmode file? Xebar Saram
2016-12-21 17:18 ` Richard Lawrence
     [not found] ` <20b6df15a79842e094d01fcc2ed2eda8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-21 17:36   ` Eric S Fraga
2016-12-22 10:21 ` Karl Voit

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).