Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 3.79 KB

memacs-mbox.org

File metadata and controls

105 lines (77 loc) · 3.79 KB

## Time-stamp: <2011-10-08 11:08:45 vk> ## This file is best viewed with GNU Emacs Org-mode: http://orgmode.org/

memacs-mbox

Current status

This module currently is a quick hack with status «works for me». Feel free to improve this module.

Data Source

mbox is a widely used format to store emails. This module parses a valid mbox file directly.

Some usenet clients such as slrn are using mbox style files to store usenet postings. This module can handle those files as well. Please use the «-n» option for those mbox files since there is no «To:» header but a «Newsgroups:» header instead.

Example Invocation

The simplest example is when you are processing only one mbox file:

~/bin/memacs-mbox.py -f ~/mails/inbox >>~/org-mode/mbox.org

If you have multiple mbox files you want to process, you can stick to following example. First, the old Memacs file is removed. Then several files are parsed and the stdout is written to the new Memacs file:

rm ~/org-mode/mbox.org; for file in ~/emails/mails* ; do ~/bin/memacs-mbox.py -f "${file}" >>~/org-mode/mbox.org ; done

For usenet postings please choose the command line switch «-n» accordingly:

~/bin/memacs-mbox.py -f ~/.slrn/My_Posts -o ~/org-mode/news.org -w -n

Example Orgmode entries

* Memacs mbox of /home/user/inbox                                :Memacs:mbox:email:
** <2010-05-07 Fri 13:54> [[contact:John Connor][John Connor]]: [[file:/home/user/inbox::4BE40D77.9040457@gmx.at][Re: Review process]]
** <2010-05-19 Wed 09:58> [[contact:guy@server.example.com][guy@server.example.com]]: [[file:/home/user/inbox::2010-05-19T10-57-03@devnull.example.com][Re: Future project]]

For usenet postings it looks like that:

* newsgroup Memacs module of /home/user/.slrn/My_Posts                    :Memacs:news:email:
** <2003-04-30 Wed 11:19> tu-graz.test: [[file:/home/user/.slrn/My_Posts::slrnbav59k.pr5.devnull@homeunix.com][Re: |z| jkladsfj]]
** <2003-04-30 Wed 12:45> tu-graz.test: [[file:/home/user/.slrn/My_Posts::slrnbavaa6.s8k.devnull@homeunix.com][Re: |z| jkladsfj]]

Add-on: organizing contacts with Orgmode

As you can see, this module generates links to contacts like

[[contact:John Connor][John Connor]]

This does not work out of the box at your side!

Let me explain how I am organizing my contacts and how you could activate this functionality:

I do have «contacts.org» where each contact (person or company) has its header like:

** John Connor                         :movie:fictional:JohnConnor:
:PROPERTIES:
:TYPE: person
:TITLE: 
:EMAIL: john.connor@example.com
:URL: http://john-connor.com
:MOBILE: 00436696917585
:HOMEPHONE: 
:WORKPHONE: 
:PHONE: 
:COMPANY: 
:STREET: 
:POSTALCODE: 
:CITY: 
:COUNTRY: USA
:CREATED: <2011-09-15 Thu 17:16>
:END:

first contact: in the movie theatre <1984-11-20 Tue>

*** <1985-05-08 Wed +1y> Birth Day (probably)
:PROPERTIES:
:CREATED: <2011-09-13 Tue 14:28>
:END:

In order to get those «contact:» working, you have to add this to your .emacs configuration:

(setq org-link-abbrev-alist
      '(
	("contact" . "~/org-mode/contacts.org::/\*.*%s/")
	("tsfile" . "~/org-mode/files.org_archive::/\*.*%s/")
	))

The line with «tsfile» is not related to contacts: with this line you can access entries for files in the memacs-filenametimestamp module :-)

Whenever you are on a «contact:» link, you can use the primary mouse button or «C-c C-o» to follow the link.

You can find a more detailed description on how to efficiently organize contact information in this post on the Org-mode mailing list archive.