From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Re: VCard export problems Date: Sun, 07 Apr 2013 00:33:39 +0200 Message-ID: <5160A2C3.9010007@gmx.de> References: <51602B3A.2080203@gmx.de> <87sj33754o.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UObg7-0005Fv-7t for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 18:33:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UObg5-0006RQ-Tc for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 18:33:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:65112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UObg5-0006RK-KC for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 18:33:41 -0400 Received: from mailout-de.gmx.net ([10.1.76.4]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LpihM-1V3jes2OHe-00fPZ0 for ; Sun, 07 Apr 2013 00:33:40 +0200 In-Reply-To: <87sj33754o.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode Hi Bastien, Thanks for the fast response! I now get: Debugger entered--Lisp error: (void-variable tel) (if tel (progn (progn (setq phones-list (split-string tel "[,;: ]+")) (setq result "") (while phones-list (setq result (concat result "TEL:" (car phones-list) "\n")) (setq phones-list (cdr phones-list))) result))) (when tel (progn (setq phones-list (split-string tel "[,;: ]+")) (setq result "") (while phones-list (setq result (concat result "TEL:" (car phones-list) "\n")) (setq phones-list (cdr phones-list))) result)) (concat head (when email (progn (setq emails-list (split-string email "[,;: ]+")) (setq result "") (while emails-list (setq result (concat result "EMAIL:" (car emails-list) "\n")) (setq emails-list (cdr emails-list))) result)) (when addr (format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr))) (when tel (progn (setq phones-list (split-string tel "[,;: ]+")) (setq result "") (while phones-list (setq result (concat result "TEL:" (car phones-list) "\n")) (setq phones-list (cdr phones-list))) result)) (when bday (let ((cal-bday (calendar-gregorian-from-absolute (org-time-string-to-absolute bday)))) (format "BDAY:%04d-%02d-%02d\n" (calendar-extract-year cal-bday) (calendar-extract-month cal-bday) (calendar-extract-day cal-bday)))) (when nick (format "NICKNAME:%s\n" nick)) (when note (format "NOTE:%s\n" note)) "END:VCARD\n\n") (let* ((properties (caddr contact)) (name (org-contacts-vcard-escape (car contact))) (n (org-contacts-vcard-encode-name name)) (email (cdr (assoc-string org-contacts-email-property properties))) (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties)))) (addr (cdr (assoc-string org-contacts-address-property properties))) (nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties)))) (head (format "BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n" n name))) (concat head (when email (progn (setq emails-list (split-string email "[,;: ]+")) (setq result "") (while emails-list (setq result (concat result "EMAIL:" (car emails-list) "\n")) (setq emails-list (cdr emails-list))) result)) (when addr (format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr))) (when tel (progn (setq phones-list (split-string tel "[,;: ]+")) (setq result "") (while phones-list (setq result (concat result "TEL:" (car phones-list) "\n")) (setq phones-list (cdr phones-list))) result)) (when bday (let ((cal-bday (calendar-gregorian-from-absolute (org-time-string-to-absolute bday)))) (format "BDAY:%04d-%02d-%02d\n" (calendar-extract-year cal-bday) (calendar-extract-month cal-bday) (calendar-extract-day cal-bday)))) (when nick (format "NICKNAME:%s\n" nick)) (when note (format "NOTE:%s\n" note)) "END:VCARD\n\n")) org-contacts-vcard-format(... On 04/06/2013 10:53 PM, Bastien wrote: > Hi Simon, > > Simon Thum writes: > >> I suspect some require >> is missing in org-contacts. > > In fact, `org-install-letbind' was called while not existing in > current Org. So org-contacts.el tried to load the org-exp.el file > that comes with your Emacs and that we never want to load when > using pre-8.0. > > I removed this function. > >> Anyway, if I invoke this line now it fails, although interactively things >> load fine with the org file on the command line: >> >> emacs someOrg.org -batch -l ~/.emacs.d/init.el >> [...] >> Symbol's value as variable is void: org-list-allow-alphabetical >> >> To me, all of this points to some incorrect dependencies of load logic to >> -batch. Unfortunately I don't know how to diagnose such problems. >> >> It's not urgent but seems like a clear bug to me. > > Indeed. Thanks for reporting this. Please test again and let me know > if something else needs to be fixed. > > Best, >