From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Bug: OrgMobile errors on push with custom functions in the agenda dispatcher [7.5 (release_7.5.580.g301b34)] Date: Wed, 06 Jul 2011 12:11:53 +0200 Message-ID: <87liwbsopi.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeP5R-00030F-SB for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 06:12:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeP5P-000087-P6 for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 06:12:05 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:48494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeP5P-00007o-Cu for emacs-orgmode@gnu.org; Wed, 06 Jul 2011 06:12:03 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 2CE88D231A for ; Wed, 6 Jul 2011 12:12:01 +0200 (CEST) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id shLTDcMIQ+Ym for ; Wed, 6 Jul 2011 12:11:54 +0200 (CEST) Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 42A63D2324 for ; Wed, 6 Jul 2011 12:11:54 +0200 (CEST) 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: emacs-orgmode@gnu.org Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ Org allows for adding custom functions into the agenda dispatcher. For example, to be able to fire up a calfw calendar from the agenda dispatcher, I use this: --8<---------------cut here---------------start------------->8--- (setq org-agenda-custom-commands '(("n" "Next 21 days" agenda "" ((org-agenda-span 21))) ("^" "Calfw Month Calendar" (lambda (&rest ignore) (cfw:open-org-calendar))))) --8<---------------cut here---------------end--------------->8--- That works, but when invoking M-x org-mobile-push RET, I get this error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (wrong-type-argument listp lambda) org-mobile-sumo-agenda-command() org-mobile-create-sumo-agenda() org-mobile-push() call-interactively(org-mobile-push t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) --8<---------------cut here---------------end--------------->8--- Here's a patch that fixes the issue. --8<---------------cut here---------------start------------->8--- >From 16b1025d13fa490c576ed12a391cfd365af63e8d Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Wed, 6 Jul 2011 12:10:16 +0200 Subject: [PATCH] Fix org-mobile-push with custom functions. --- lisp/org-mobile.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index 7b1bcbe..7654475 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -575,8 +575,9 @@ The table of checksums is written to the file mobile-checksums." " " match "")) settings)) (push (list type match settings) new)) - ((symbolp (nth 2 e)) - ;; A user-defined function, not sure how to handle that yet + ((or (functionp (nth 2 e)) (symbolp (nth 2 e))) + ;; A user-defined function, which can do anything, so simply + ;; ignore it. ) (t ;; a block agenda -- 1.7.6 --8<---------------cut here---------------end--------------->8--- Bye, Tassilo Emacs : GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-07-05 on thinkpad Package: Org-mode version 7.5 (release_7.5.580.g301b34)