emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] phone links...


From: Daimrod
Subject: Re: [O] phone links...
Date: Sat, 20 Apr 2013 17:59:39 +0200

Michael Strey <address@hidden> writes:

>> - You should use `org-link-display-format' instead of
>>   `org-contacts-strip-link'.
>
> I don't think so.  `org-link-display-format' returns the description of
> the link if there is one.  My `org-contacts-strip-link' always returns
> the target.  Using `org-link-display-format' would lead to wrong results
> with links like
>      [[mailto:address@hidden (at) bar (dot) com]]
>      [[tel:+49 351 4129535][+49 (0)351 4129535]]

You're right, I had misunderstood the function.

>> - You have done some unrelated changes (fix some typos, ...), could you
>>   provide a separated patches for them?
>
> Oh =:-|, another struggle with Git.  I'm still learning and will do my best.

If you're not already using magit[1] I highly recommend it to you. You
can use it to commit only a portion of the changes (you can also do it
with "git commit --interactive" but I find it easier with magit).

>> Regarding `org-contacts-split-property', I haven't found anything about
>> multiple values within a node property in `org-element' and the syntax
>> description doesn't mention it, so you were right to roll your own. :)
>
> That wasn't me.  This (disputable) feature was already there for the
> :EMAIL: proprerty.  Actually, I don't like multiple values within a node
> property and would prefer a VCard-like syntax like
>
> #+BEGIN_SRC org
> *** Strey, Michael
> :PROPERTIES:
> :KIND:     individual
> :ORG:      STREY Consult
> :FN:       Michael Strey
> :N:        Strey;Michael;;
> :ADR;TYPE=home:;;my street;my city;federal state;post code;my country
> :EMAIL:           mailto:address@hidden
> :EMAIL;PREF=1:    mailto:address@hidden
> :TEL;TYPE="fax,work":[[tel:0321 21104568]]
> :TEL;TYPE="fax,home":[[tel:0351 4129535]]
> :TEL;TYPE="voice,home":[[tel:0351 4129535]]
> :LANG:     de
> :ICON:     ~/GTD/Icons/icon-strey_michael.jpg
> :END:
> #+END_SRC

I must admit I am unsure about this. On one side it does solve some
problems, on the other side I don't really like the idea of adding this
extra syntax on top of properties.

I think it's fine to use semicolons to separate values in node
properties, but I would like to expose a clean API to manipulate users
and user's properties so that we don't have to use `*-split-*'
everywhere.

For example it could expose your previous example into this:
#+BEGIN_SRC lisp
  '((kind "individual")
    (org "STREY Consult")
    (fn "Michael Strey")
    (n ("Stry" "Michael" ""))
    (adr ("" "" "my street" "my city" "federal state" "post code" "my country") 
:type home)
    (email "mailto:address@hidden";)
    (email "mailto:address@hidden"; :pref 1)
    (tel "[[tel:0321 21104568]]" :type "fax,work")
    (tel "[[tel:0351 4129535]]" :type "fax,home")
    (tel "[[tel:0351 4129535]]" :type "voice,home")
    (lang "de")
    (icon "~/GTD/Icons/icon-strey_michael.jpg"))  
#+END_SRC

>> However, I think it would be better to store the separators in a
>> variable (like `org-contacts-property-values-separator') and maybe even
>> to use it by default instead of `split-string-default-separators'
>> because we use it more and because it's easy to forget.
>
> That was already hard-coded before in Feng's
> `org-contacts-vcard-format'.  But yes, you are right.  Since it is
> limited by some constraints we should make it an extra variable.
>
>> 
>> > +                (loop for email in (org-contacts-split-property 
>> > email-list)
>>                                                                            
>> ^^^^
>> > +                      for gravatar = (gravatar-retrieve-synchronously 
>> > (org-contacts-strip-link email))
>
> This should be correctly and worked for me during my tests.
> Confusingly `email-list' is not a list but a string here.

My bad (again :/).

Regards,

1. https://github.com/magit/magit

-- 
Daimrod/Greg

Attachment: pgpHGLZka5wgX.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]