[Top][All Lists]

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

[O] Bug: OrgMobile errors on push with custom functions in the agenda di

From: Tassilo Horn
Subject: [O] 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
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

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


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)
--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)
  call-interactively(org-mobile-push t 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 <address@hidden>
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 
                                  " " match "</after>"))
        (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.
        ;; a block agenda
--8<---------------cut here---------------end--------------->8---


Emacs  : GNU Emacs (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)

reply via email to

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