From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: org-contacts: how to manage contacts; structure of meta data (was: No completion in Gnus)
Date: Wed, 5 Oct 2011 18:20:02 +0200 [thread overview]
Message-ID: <2011-10-05T18-01-46@devnull.Karl-Voit.at> (raw)
In-Reply-To: 86pqicblti.fsf@googlemail.com
* Thorsten <quintfall@googlemail.com> wrote:
>
> I have a org-contacts file with a few contacts with EMAIL property,
> taken from gnus using org-capture as described in the org-contacts
> manual. The contacts are tagged with some tags.
[...]
> PS
> One further org-contacts related question: there is a predefined
> property ADDRESS, without any inner structure. Am I supposed to write my own
> org-capture template for that property? How would that look like - just
> one single string? If I want something more structured (street, city,
> zip-code etc), I have to define one property for each info-piece, or is
> there something like a compound property?
I moved all of my approx. 1000 contacts from jPilot contacts to
org-contacts a few months ago. I faced the same questions you are
mentioning since org-contacts[1] does only mention the :EMAIL:
property.
A short research with my favourite search engine did not result in
any (ISO?) standard that relates to «how to define/describe contact
meta data».
Without describing further attempts, I ended up with following
yasnippet[2] template for a new contact:
,----
| # name : Org-contacts template for a person or a company
| # --
| ** $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
`----
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.
A very handy bonus feature is referencing my contacts. In my .emacs
I do have following:
,----[ .emacs (excerpt) ]
| (setq org-link-abbrev-alist
| '(
| ("contact" . "~/org/contacts.org::/\*.*%s/")
| ))
`----
Combined with following yasnippet template it results in very comfty
contact handling:
,----[ contact yasnippet ]
| # 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
`----
Basically, you have to enter the name of the snippet, press «TAB»
and then you type in the name (or anything of the heading line of a
contact). Then it results in [[contact:foo bar][foo bar]] which is a
clickable link to any contact which relates to «foo bar».
Whenever I rename my contacts.org or put it in another folder, I
just have to modify the line in my .emacs and not each link.
I like this system.
HTH
1. http://julien.danjou.info/org-contacts.html
2. http://code.google.com/p/yasnippet/
--
Karl Voit
next prev parent reply other threads:[~2011-10-05 16:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 19:26 [contacts] No completion in Gnus Thorsten
2011-10-04 20:03 ` Jambunathan K
2011-10-04 20:31 ` Thorsten
2011-10-05 7:20 ` Achim Gratz
2011-10-05 15:20 ` Thorsten
2011-10-05 14:44 ` Jason Dunsmore
2011-10-05 14:51 ` Julien Danjou
2011-10-05 15:03 ` jasondunsmore
2011-10-05 15:12 ` Julien Danjou
2011-10-05 15:35 ` Michael Markert
2011-10-05 16:20 ` Karl Voit [this message]
2011-10-05 20:48 ` org-contacts: how to manage contacts; structure of meta data (was: No completion in Gnus) Thorsten
2011-10-06 9:38 ` org-contacts: how to manage contacts; structure of meta data Karl Voit
2011-10-06 12:55 ` Thorsten
2011-10-06 14:20 ` Wes Hardaker
2011-10-06 14:53 ` Thorsten
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=2011-10-05T18-01-46@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).