emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: OrgMobile errors on push with custom functions in the agenda dispatcher [7.5 (release_7.5.580.g301b34)]
@ 2011-07-06 10:11 Tassilo Horn
  2011-07-08  6:31 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Tassilo Horn @ 2011-07-06 10:11 UTC (permalink / raw)
  To: emacs-orgmode

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 <tassilo@member.fsf.org>
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 "</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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-08  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06 10:11 Bug: OrgMobile errors on push with custom functions in the agenda dispatcher [7.5 (release_7.5.580.g301b34)] Tassilo Horn
2011-07-08  6:31 ` Bastien

Code repositories for project(s) associated with this public inbox


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).