emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daimrod <daimrod@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-contacts development
Date: Sun, 25 May 2014 01:51:11 +0900	[thread overview]
Message-ID: <87ioovf7cw.fsf@tanger.home> (raw)
In-Reply-To: 8761kxnno5.fsf@gmail.com

Alexis <flexibeast@gmail.com> writes:

> Hi all,
Hi,

> [snip...]
>
> Fleshing out an extended spec for org-contacts data could be part of the
> process of making org-contacts a first-class citizen of org-mode, and
> provide a more solid foundation on which people can build (and share)
> the org-contacts functionality they're after. And in my own particular
> case, it would greatly facilitate my work in org-contacts / Android
> Contacts integration. :-)
>
> What do people think?

IMHO, the "problem" with org-contacts isn't that it isn't part of
org-mode, but that its format isn't well defined enough.

Some fields accept only one value, some multiple values, with different
separators, etc... And on top of that, there is no easy way to access
the database (`car', `cadr', `caddr', ...) which makes it difficult to
read and write code.


So, as you said, we would need to define and document a specification
for org-contacts. And we need to be clear from the beginning about
what it can do and what it can not do. For example, it is unlikely
that org-contacts will be a 1:1 mapping with the vCard format in its
current form because vCard properties can have values.

e.g.
PROP1;PROP2=VAL:FOO BAR
      ^^^^^^^^^

And AFAIK we can't do that with org-mode properties.

An approach would be to keep using properties whenever it's possible
to keep the format simple when possible and use subtree instead of
properties when necessary.

e.g.
#+BEGIN_SRC org
  ,* Contact Name
  ,** PHONE
     :PROPERTIES:
     :TYPE:     WORK
     :END:
  - num1
  - num2
#+END_SRC

But then we would need a special property to indicate that a subtree
is a contact and ignore subtree without this property (just like it
does with the EMAIL property ATM).

#+BEGIN_SRC org
  ,* Contact Name
    :PROPERTIES:
    :TYPE:     org-contacts
    :END:

  ,** PHONE
     :PROPERTIES:
     :TYPE:     WORK
     :END:
  - num1
  - num2
#+END_SRC

And of course it would be nice if we could keep as much compatibility
with the current format :)

-- 
Daimrod/Greg

  parent reply	other threads:[~2014-05-24 16:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23  4:07 org-contacts development Alexis
2014-05-23  9:06 ` Rasmus
2014-05-23 10:30 ` Alexander Baier
2014-05-24  4:02   ` Xebar Saram
2014-05-24 10:27     ` Alexis
2014-05-24 10:15   ` Alexis
2014-05-24 14:18     ` Alexander Baier
2014-05-24 14:55       ` Bastien
2014-05-24 15:05       ` Alexis
2014-05-24 15:43         ` Rasmus
2014-05-24 16:10           ` Alexis
2014-05-23 12:45 ` Bastien
2014-05-23 15:46   ` Rasmus
2014-05-24 10:04   ` Alexis
2014-05-24 12:17     ` Bastien
2014-05-24 14:07       ` Alexis
2014-05-24  9:00 ` Org-contacts standardization (was: org-contacts development) Karl Voit
     [not found] ` <878ups27km.fsf@gmx.us>
2014-05-24  9:59   ` org-contacts development Alexis
2014-05-24 16:51 ` Daimrod [this message]
2014-05-24 17:48   ` Alexis
2014-05-26  3:21     ` Daimrod
2014-05-26  4:06       ` Alexis
2014-05-26 15:20 ` Michael Strey
2014-05-27  9:27   ` Michael Strey
2014-05-29  3:19     ` Daimrod
2014-06-03 10:23       ` Michael Strey
2014-06-05  4:26         ` Daimrod
2014-07-23 13:40 ` Karl Voit

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=87ioovf7cw.fsf@tanger.home \
    --to=daimrod@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).