From: "Wright, Jason L" <jason.wright@inl.gov>
To: emacs-orgmode@gnu.org
Subject: batch saving patch for emacs 23/org 8.0.1
Date: Tue, 23 Apr 2013 15:15:13 -0600 [thread overview]
Message-ID: <CANCB7iZpDfngmXSGJwHiX8WYZXdvurhQ8BaBoMh7VTx5ZO=Utg@mail.gmail.com> (raw)
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)
next reply other threads:[~2013-04-23 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 21:15 Wright, Jason L [this message]
2013-04-25 5:31 ` batch saving patch for emacs 23/org 8.0.1 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:
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='CANCB7iZpDfngmXSGJwHiX8WYZXdvurhQ8BaBoMh7VTx5ZO=Utg@mail.gmail.com' \
--to=jason.wright@inl.gov \
--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).