emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: How I am organizing contacts (was: BBDB Sync)
Date: Sat, 23 Jun 2012 11:58:01 +0200	[thread overview]
Message-ID: <2012-06-23T11-19-19@devnull.Karl-Voit.at> (raw)
In-Reply-To: CAFkt3UMRQOhvme2i2SS5AZZRgY-6vANHbQkq3E_PbsrEatxxnQ@mail.gmail.com

* Sriram Karra <karra.etc@gmail.com> wrote:
>
> On Sat, Jun 23, 2012 at 1:33 AM, Karl Voit <devnull@karl-voit.at> wrote:
>
>> I am using Org-mode to organize my contacts following
>> org-contacts.el[1] and a *lot* of additional properties. Those
>> things are so far =BBby convention=AB and I always wanted to sum it up
>> on WORG but did not find time for that.
>
> Even with BBDB there are only few "standard" fields, and a tonne of custom
> fields. If conventions are only in naming the property fields that is
> trivially fixed through a config file (something I do already for the BBDB
> handlers).

Oh, I am certain that for mapping purposes there are technical
solutions.

Originally I wanted to sum up my method (my convention) to spare
other peoples time to come up with their own. I looked at other
software solutions and meta-data standards to get a convention that
reflects a «general» attempt.

To be fair: I could not find any common ISO or something other
standard for that purpose which overrules other conventions.

So a *common* convention could spare users to create those
(optional) mappings by themselves.

> I am a beginner level org-mode user -  I was away from Emacs for nearly 8
> years and returned to find this fascinating and gigantic new development in
> the Emacs world :) 

This paragraph I could have written on my own one year ago :-)

> But if you can document your contact structure, I could
> potentially implement it some point in the future.

It's fairly simple: I do have an Org-mode file named «contact.org»
with a tree: no flat structure, since I tend to map family trees to
Org-mode headline hierarchies:

- groups
  - relatives
    - families sharing the last name A
      - family of person A
        - person A
        - [other members of family of person A]
  - friends
    - [same concept as above with relatives]
  - job B
    - [more or less flat list of people I got in touch with while
      working for company B]

For less tight connections that do not belong to the sub-hierarchies
above, I do have separate headlines which contain only a flat
sub-hierarchy each: 

- people (people which are not friends, family, or other categories)
- passing acquaintances (people I hardy know but want to store info)
- companies (I am using tags to differ between entries of companies)

Each and every entry is created using a yasnippet[2] template like
this:

,----[ vkcontact ]
| # name : Org-contacts template for a person
| # --
| ** $1 $2  :$1$2:
| :PROPERTIES:
| :TYPE: ${3:$$(yas/choose-value '("person" "company"))}
| :TITLE:
| :EMAIL: $4
| :URL:
| :MOBILE: 0043/
| :HOMEPHONE:
| :WORKPHONE:
| :PHONE:
| :COMPANY:
| :STREET:
| :POSTALCODE:
| :CITY:
| :COUNTRY: Österreich
| :END:
|
| first contact: $0
`----

This ends up in entries like:

,----[ vkcontentry ]
| ** John Smith       :JohnSmith:
| :PROPERTIES:
| :TYPE: person
| :TITLE: Dr.
| :EMAIL: john.smith@example.com
| :URL: http://john.smith.com/
| :MOBILE: 0043/6123/12345678
| :HOMEPHONE:
| :WORKPHONE:
| :PHONE: 
| :COMPANY: Graz University of Technology
| :STREET: Herrengasse 1
| :POSTALCODE: 8010
| :CITY: Graz
| :COUNTRY: Österreich
| :END:
|
| first contact: we met at CHI2012 conference
`----

One minor flaw is that I have to modify the level of the headline
resulting from the template according to the level where it belongs.
Maybe somebody has a solution to that little but annoying thing?

Below the «first contact»-line, I start to write all things related
to a contact starting with an active time-stamp: changes in phone
numbers or addresses, little things I do want to track (favourite
sport, links to other friends of mine, what I gave for birthday,
...).

At the bottom of every contact, I add (repeating) events for
birthday and other anniversaries. When I am doing something with
only one person (going out for lunch, doing a biking tour, ...) I am
creating entries for those events directly in this contacts.org
file. Also handy: keeping track of doctor visits and any health
related information right at the entry of this doctor.


My current tags for contacts are defined in the header of my
contacts.org:

,----[ first line of my contacts.org ]
| #+TAGS: job(j) friends(f) health(e) hotels(o) restaurants_bars(r) \
|         sport(s) students_TU(t) relatives(r) company(c)
`----

... but this is pretty much related to my previous system
(jPilot/datebk6/PalmOS) which offered only one single category for
each contact. I might re-think these tags in future.


I am using the following yasnippet template to generate a link to an
entry of my contact list:

,----[ vkcontact ]
| # name : expand link to contact
| # --
| [[contact:$1][${2:$$(unless yas/modified-p
|  (let ((field (nth 0 (yas/snippet-fields (first (yas/snippets-at-point))))))
|    (concat (buffer-substring (yas/field-start field) (yas/field-end field)))))}]] $0
`----

So when I am invoking «vkcontact» + TAB, and I enter «John Smith» +
TAB, it ends up in: «[[contact:John Smith][John Smith]]».

Of course there has to be an entry in my .emacs which enables the
custom link:

,----[ snippet from .emacs: the line with «contact» is the one relevant ]
| (setq org-link-abbrev-alist
|       '(
|     ("bib" . "~/archive/papers_from_web/%s.bib")
|     ("ref" . "file:~/share/all/org-mode/references.org::/%s/")
|     ("pdf" . "~/archive/papers_from_web/%s.pdf")
|     ("notes" . "~/archive/papers_from_web/%s-notes.pdf")
|     ("contact" . "~/share/all/org-mode/contacts.org::/\*.*%s/")
|     ("vktsfile" . "~/share/all/org-mode/memacs/files.org_archive::/\*.*%s/")
|     ))
`----


> Do you use any import/export/sync code with org-contacts?

Not yet.

I did not have time to implement something on my own and so far the
desire to do so was almost non existent (time!). But if there will
be a solution which helps me syncing my phone contacts (again), I am
willing to give it a try.

Personally I do want to have control over this process: I store
*everything* about a contact in Org-mode but I just want to have
synced phone numbers, email addresses, and names to my Android
device. Nothing more, nothing less.

  2. http://emacswiki.org/emacs/Yasnippet
-- 
Karl Voit

  reply	other threads:[~2012-06-23  9:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22  6:21 BBDB Sync (Was: Re: [Orgmode] Re: contact management in org-mode?) Sriram Karra
2012-06-22 20:03 ` Karl Voit
2012-06-23  3:21   ` Sriram Karra
2012-06-23  9:58     ` Karl Voit [this message]
2012-06-24 13:43       ` Customizing org-contacts Was: Re: How I am organizing contacts Simon Thum
2012-06-24 15:21         ` Case insensitive search (was: Customizing org-contacts) Karl Voit
2012-06-24 20:17           ` Case insensitive search Simon Thum
2012-06-24 20:33             ` Nick Dokos
2012-06-23 21:14   ` BBDB Sync John Wiegley

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=2012-06-23T11-19-19@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /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.
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).