From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Customizing org-contacts Was: Re: How I am organizing contacts Date: Sun, 24 Jun 2012 15:43:52 +0200 Message-ID: <4FE71998.7050803@gmx.de> References: <2012-06-22T22-00-43@devnull.Karl-Voit.at> <2012-06-23T11-19-19@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sin6d-0006Ab-Nk for emacs-orgmode@gnu.org; Sun, 24 Jun 2012 09:44:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sin6b-0008Sh-0y for emacs-orgmode@gnu.org; Sun, 24 Jun 2012 09:43:59 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:60124) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Sin6a-0008S7-M9 for emacs-orgmode@gnu.org; Sun, 24 Jun 2012 09:43:56 -0400 In-Reply-To: <2012-06-23T11-19-19@devnull.Karl-Voit.at> 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: news1142@Karl-Voit.at Cc: Karl Voit , emacs-orgmode@gnu.org Hi, thanks for sharing your setup. Piggybacking on this thread, I'm just starting with org-contacts and wonder how I could get it to perform case-insensitive searches? (This would make it easier to search for parts of names) Cheers, Simon On 06/23/2012 11:58 AM, Karl Voit wrote: > * Sriram Karra wrote: >> >> On Sat, Jun 23, 2012 at 1:33 AM, Karl Voit 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