From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Subject: Re: org-contacts: how to manage contacts; structure of meta data (was: No completion in Gnus) Date: Wed, 05 Oct 2011 22:48:04 +0200 Message-ID: <86k48jcghn.fsf@googlemail.com> References: <86pqicblti.fsf@googlemail.com> <2011-10-05T18-01-46@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBYO0-0000zX-9j for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 16:48:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBYNy-0006OF-N0 for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 16:48:16 -0400 Received: from lo.gmane.org ([80.91.229.12]:52613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBYNy-0006OA-D6 for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 16:48:14 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RBYNx-00033F-3D for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 22:48:13 +0200 Received: from g231234062.adsl.alicedsl.de ([92.231.234.62]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Oct 2011 22:48:12 +0200 Received: from quintfall by g231234062.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Oct 2011 22:48:12 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Karl Voit writes: >> 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: Do you think that yasnippet is superior to org-capture or is it just a casuality that you prefered it to org-capture? > ,---- > | # 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 > `---- Thats what I thought, that a single :ADDRESS: property is not very usefull or practical. So there is not something like a nested property, each piece of information needs its own property. I think your list is pretty complete and usable. > 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) > `---- [how do you produce this nice insertions in your email?] > 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». Great, I'll give that a try too. Thanks for your help Cheers -- Thorsten