Re: [O] org-contacts: how to manage contacts; structure of meta data

2011-10-06 Thread Karl Voit
* Thorsten quintf...@googlemail.com wrote:
 Karl Voit devn...@karl-voit.at writes:

 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?

Oh, first I started with org-capture. One week later I started to
use yasnippet. I have to mention that I was using Emacs a decade ago
when I switched to vim. For Org-mode I returned to GNU Emacs. Now I
have to re-orienteer again what is available and how it works :-)

yasnippet is superior to org-capture and it is not :-)

What is missing with yasnippet is a quick capture method which
includes the destination for the new item.

What is great with yasnippet is, that you can define certain input
values that have to be entered. Those values can be re-used. So when
you take a look at my snippet, you recognize $1, $2, ...

And you recognize that $1 and $2 a re-used. I do have to enter $1
only once and it is inserted multiple times - depending on the
occurrence of $1 in the rest.

For the :TYPE: property I let yasnippet ask me, whether it is a
person or a company I am entering now. Handy.

 ,
 | # 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. 

You loose meta information and semantic description.

With my method you can generate sparse trees with people living in a
certain street, town or such things.

 So there is not something like a nested property,
 each piece of information needs its own property. 

I do think so. But I am new to Org-mode and might still miss certain
details.

 I think your list is pretty complete and usable. 

Thanks.

 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?]

As an Emacs user, you might not be delighted with my answer: I am
using mutt[3] as MUA[4]. There I can choose my editor freely. For
this purpose I am using vim 7.1. In vim I can use «boxes»[5]:

,[ a line from my .vimrc ]
| map ;1 ESC:','!boxes -d boxquote
`

But I also used to use Emacs for mail composing years ago and I do
recall a similar method there.

 Thanks for your help

You're welcome!

  3. http://www.mutt.org/
  4. http://en.wikipedia.org/wiki/Mail_user_agent
  5. http://boxes.thomasjensen.com/
  6. As I recognize here, the vim referencing mechanism seem to be
 confused by the $1 and $2 from above and started with [3]. Cute.
-- 
Karl Voit




Re: [O] org-contacts: how to manage contacts; structure of meta data

2011-10-06 Thread Thorsten
Karl Voit devn...@karl-voit.at writes:

 yasnippet is superior to org-capture and it is not :-)

So considering both and choosing the most suited for the problem might
be a good idea. 

 As an Emacs user, you might not be delighted with my answer: I am
 using mutt[3] as MUA[4]. There I can choose my editor freely. For
 this purpose I am using vim 7.1. 

Uhhh ... I shouldn't have asked ;)

 But I also used to use Emacs for mail composing years ago and I do
 recall a similar method there.

I'm sure there are, since I have seen some elaborated emails here, but
I'm not sure where to look for them. In the Gnus and the Message manuals
I did not find anything related so far. 

Cheers
-- 
Thorsten




Re: [O] org-contacts: how to manage contacts; structure of meta data

2011-10-06 Thread Wes Hardaker
 On Thu, 6 Oct 2011 11:38:26 +0200, Karl Voit devn...@karl-voit.at said:

KV yasnippet is superior to org-capture and it is not :-)

Well summarized :-).  The right tool for the right job definitely
matters here.

 [how do you produce this nice insertions in your email?]

KV As an Emacs user, you might not be delighted with my answer: I am
KV using mutt[3] as MUA[4]. There I can choose my editor freely. For
KV this purpose I am using vim 7.1. In vim I can use «boxes»[5]:

FYI, the emacs package you're looking for with similar functionality is
rebox2 ( http://www.emacswiki.org/emacs/rebox2 )
-- 
Wes Hardaker 
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/



Re: [O] org-contacts: how to manage contacts; structure of meta data

2011-10-06 Thread Thorsten
Wes Hardaker wjhns...@hardakers.net writes:

 FYI, the emacs package you're looking for with similar functionality is
 rebox2 ( http://www.emacswiki.org/emacs/rebox2 )

I knew - or at least expected - that there must be something like
that. Thanks for the link.
-- 
Thorsten




[O] org-contacts: how to manage contacts; structure of meta data (was: No completion in Gnus)

2011-10-05 Thread Karl Voit
* Thorsten quintf...@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




Re: [O] org-contacts: how to manage contacts; structure of meta data (was: No completion in Gnus)

2011-10-05 Thread Thorsten
Karl Voit devn...@karl-voit.at 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