emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* batch saving patch for emacs 23/org 8.0.1
@ 2013-04-23 21:15 Wright, Jason L
  2013-04-25  5:31 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Wright, Jason L @ 2013-04-23 21:15 UTC (permalink / raw)
  To: emacs-orgmode

When running:
emacs -l ~/.emacs -eval '(org-batch-store-agenda-views)' -eval
'(org-mobile-push)'

It errors with:
(wrong-number-of-arguments called-interactively-p 1)

A proposed fix is below. What I don't know is whether the fix breaks
something else (i.e. it seems to work for me, but my elisp-fu is
woefully lacking).

-bash-4.1$ emacs --version
GNU Emacs 23.1.1
org-version: 8.0.1 (same potential error in git)

Backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments
called-interactively-p 1)
  (called-interactively-p (quote any))
  (if (called-interactively-p (quote any)) (not (y-or-n-p ...)))
  (and (file-exists-p file) (if (called-interactively-p ...) (not ...)))
  (or (not (file-writable-p file)) (and (file-exists-p file) (if ... ...)))
  (if (or (not ...) (and ... ...)) (user-error "Cannot write agenda to
file %s" file))
  org-agenda-write("/home/jason/mobile/theagenda.html" nil t "*Org Agenda*")
  (let nil (org-agenda-write (expand-file-name ... dir) nil t bufname))
  eval((let nil (org-agenda-write (expand-file-name ... dir) nil t bufname)))
  (org-eval-in-environment (append org-agenda-exporter-settings opts
pars) (org-agenda-write (expand-file-name ... dir) nil t bufname))
  (while files (org-eval-in-environment (append
org-agenda-exporter-settings opts pars) (org-agenda-write ... nil t
bufname)))
  (progn (org-eval-in-environment (append org-agenda-exporter-settings
opts pars) (org-agenda nil thiscmdkey)) (set-buffer bufname) (while
files (org-eval-in-environment ... ...)) (and (get-buffer bufname)
(kill-buffer bufname)))
  (if files (progn (org-eval-in-environment ... ...) (set-buffer
bufname) (while files ...) (and ... ...)))
  (when files (org-eval-in-environment (append
org-agenda-exporter-settings opts pars) (org-agenda nil thiscmdkey))
(set-buffer bufname) (while files (org-eval-in-environment ... ...))
(and (get-buffer bufname) (kill-buffer bufname)))
  (while cmds (setq cmd (pop cmds) thiscmdkey (car cmd) thiscmdcmd
(cdr cmd) match (nth 2 thiscmdcmd) bufname (if org-agenda-sticky ...
org-agenda-buffer-name) cmd-or-set (nth 2 cmd) opts (nth ... cmd)
files (nth ... cmd)) (if (stringp files) (setq files ...)) (when files
(org-eval-in-environment ... ...) (set-buffer bufname) (while files
...) (and ... ...)))
  (save-window-excursion (while cmds (setq cmd ... thiscmdkey ...
thiscmdcmd ... match ... bufname ... cmd-or-set ... opts ... files
...) (if ... ...) (when files ... ... ... ...)))
  (let ((cmds ...) (pop-up-frames nil) (dir default-directory) (pars
...) cmd thiscmdkey thiscmdcmd match files opts cmd-or-set bufname)
(save-window-excursion (while cmds ... ... ...)))
  (lambda (&rest parameters) "Run all custom agenda commands that have
a file argument." (let (... ... ... ... cmd thiscmdkey thiscmdcmd
match files opts cmd-or-set bufname) (save-window-excursion ...)))()
  (org-batch-store-agenda-views)
  eval((org-batch-store-agenda-views))
  command-line-1(("-l" "/home/jason/.emacs" "-eval"
"(org-batch-store-agenda-views)" "-eval" "(org-mobile-push)"))
  command-line()
  normal-top-level()

Patch:
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 754247a..1fd9ee8 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3307,7 +3307,7 @@ If AGENDA-BUFFER-NAME, use this as the buffer
name for the agenda
   (interactive "FWrite agenda to file: \nP")
   (if (or (not (file-writable-p file))
          (and (file-exists-p file)
-              (if (called-interactively-p 'any)
+              (if (org-called-interactively-p 'any)
                   (not (y-or-n-p (format "Overwrite existing file %s?
" file))))))
       (user-error "Cannot write agenda to file %s" file))
   (org-let (if nosettings nil org-agenda-exporter-settings)

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

end of thread, other threads:[~2013-04-25  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-23 21:15 batch saving patch for emacs 23/org 8.0.1 Wright, Jason L
2013-04-25  5:31 ` Bastien

Code repositories for project(s) associated with this 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).