emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: emacs-orgmode@gnu.org
Cc: nicholas.dokos@hp.com
Subject: Re: org-mobile-push
Date: Sat, 01 Oct 2011 02:40:35 -0400	[thread overview]
Message-ID: <3311.1317451235@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Vikas Rawal <vikaslists@agrarianresearch.org> of "Fri, 30 Sep 2011 05:04:40 +0530." <20110929233440.GA17073@panahar>

Vikas Rawal <vikaslists@agrarianresearch.org> wrote:

> Thanks Nick and Jambunathan for taking the trouble to respond.
> 
> > 
> > So pretty please: when you get an error, *at the very least*, do
> > 
> >    M-x toggle-debug-on-error
> 
> Thanks nick for teaching my how to use back-trace. Here is the
> output. May I request you to help identify what could be causing the
> problem.
> 

The backtrace shows (you read it from the bottom up) that the following sequence
of calls took place:

   org-mobile-push -> org-mobile-create-sumo-agenda ->
     org-store-agenda-views -> org-batch-store-agenda-views ->
       org-agenda(nil "X") -> org-agenda-run-series("SUMO" ...) ->
         org-agenda-list -> org-get-entries-from-diary ->
           diary-list-entries -> run the diary-hook ->
             appt-make-list

In trying to call this last function, emacs gets an error: the function
is not defined.

Basically what happens is that org-mobile-push calculates the agenda, by
calling org-agenda-list. This function checks the value of the variable
org-agenda-include-diary, which in your case must be t, so it tries to
add agenda entries from the diary.  It calls org-get-entries-from-diary
to do that, which calls diary-list-entries. This one runs the diary-hook
and somewhere in your init files you must have done something like
this:

  (add-hook 'diary-hook (function appt-make-list))

When the hook is run, emacs tries to call the function, does not find it and
complains.

To fix it, change the above line to

  (require 'appt)
  (add-hook 'diary-hook (function appt-make-list))

The (require 'appt) makes sure that the file that defines this function is
loaded, the function is defined when emacs needs to call it and the problem
is resolved.

Strictly speaking, the function does not need to be defined that early:
it only needs to be defined before it is called, but if you are going to
call it, you might as well do it early. If that's not desirable for some
reason, you can use the autoload mechanism (see the emacs manual for
that).

Note that there are two customizations (the setting of
org-agenda-include-diary to t and the setting of diary-hook) that caused
your problem. I don't include the diary in my agenda, so I would not
have seen the problem at all. That's one of the reasons why it's
important for everybody to have the Pavlovian response:

	  error --> must get backtrace

It can pinpoint where *your* problem is and show the way to a solution.

HTH,
Nick


> Debugger entered--Lisp error: (void-function appt-make-list)
>   appt-make-list()
>   run-hooks(diary-hook)
>   diary-list-entries((9 26 2011) 1)
>   byte-code("\301\302!\203\nfter>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=t TITLE: ALL TODO </after>"))) (agenda "" ((org-agenda-title-append "<after>KEYS=n#1 TITLE: Agenda and all TODO's </after>"))) (alltodo nil ((org-agenda-title-append "<after>KEYS=n#2 TITLE: Agenda and all TODO's </after>")))) ((org-agenda-compact-blocks nil)) ("/home/vikas/Dropbox/MobileOrg/agendas.org")))
>   ...
>   org-agenda(nil "X")
>   (let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey))
>   eval((let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey)))
>   ...
>   ...
>   (org-batch-store-agenda-views)
>   eval((org-batch-store-agenda-views))
>   org-store-agenda-views()
>   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)
> 
> > which means that you can load the file and therefore define the function
> > by inserting
> > 
> >     (require 'appt)
> 
> Thanks Jambunathan and Nick. This indeed solves the problem.
> 
> Vikas
> 

  parent reply	other threads:[~2011-10-01  6:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 16:13 org-mobile-push Vikas Rawal
2011-09-29 16:48 ` org-mobile-push Jambunathan K
     [not found] ` <vikaslists@agrarianresearch.org>
2011-09-29 16:54   ` org-mobile-push Nick Dokos
2011-09-29 23:34     ` org-mobile-push Vikas Rawal
2011-10-01  6:40   ` Nick Dokos [this message]
2011-10-02  3:09     ` org-mobile-push Vikas Rawal
2011-12-07 16:49   ` Batch export to html Nick Dokos
2012-11-06 21:23   ` error: Execution of bibtex2html Nick Dokos
2012-11-07  3:51     ` Vikas Rawal
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07 11:16 Batch export to html Vikas Rawal
2011-12-08 19:49 ` Achim Gratz
2012-11-05 20:54 error: Execution of bibtex2html Vikas Rawal
2012-11-06 16:43 ` Suvayu Ali
2012-11-06 21:09   ` Vikas Rawal
2012-11-06 21:24     ` Myles English
2012-11-07  2:57       ` Vikas Rawal
2012-11-07  3:24         ` Yagnesh Raghava Yakkala
2012-11-07  4:10           ` Nick Dokos
2012-11-07  9:02             ` Renaming the thread: orgmode-bibtex/html-export issues Vikas Rawal
2012-11-09 21:32               ` Vikas Rawal
2012-11-09 22:16                 ` Vikas Rawal
2012-11-06 21:26   ` error: Execution of bibtex2html Vikas Rawal

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=3311.1317451235@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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