emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87liwbsopi.fsf@member.fsf.org> (raw)

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)

             reply	other threads:[~2011-07-06 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 10:11 Tassilo Horn [this message]
2011-07-08  6:31 ` Bug: OrgMobile errors on push with custom functions in the agenda dispatcher [7.5 (release_7.5.580.g301b34)] Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87liwbsopi.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).