emacs-orgmode
[Top][All Lists]
Advanced

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

[O] batch saving patch for emacs 23/org 8.0.1


From: Wright, Jason L
Subject: [O] batch saving patch for emacs 23/org 8.0.1
Date: Tue, 23 Apr 2013 15:15:13 -0600

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)



reply via email to

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