emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

wrong number of argument when publish #155

Closed shelper closed 8 years ago

shelper commented 8 years ago

so, its me again, i switched to a mac computer osx 10.11, emacs 24.5, and run the sam process as shown here, and i got a different error:

Debugger entered--Lisp error: (wrong-number-of-arguments #[(templates) "\212eb\210\306\307\310\306\311#\205\\312 \313 !\314=\203X\315
\"\316\317 \"\211 \316\320 \"E\211\235\203<\321\322\316\323 \"\"\210\202W \203W B \316\324 \"b\210\325\306x\210`|\210\212 c\210)+)\202\207" [record object templates value begin signature nil re-search-forward "{{{[-A-Za-z0-9]" t org-element-context org-element-type macro org-macro-expand org-element-property :begin :args error "Circular macro expansion: %s" :key :end " "] 6 ("/opt/homebrew-cask/Caskroom/emacs-mac/emacs-24.5-z-mac-5.11/Emacs.app/Contents/Resources/lisp/org/org-macro.elc" . 3797)] 3) org-macro-replace-all((("modification-time" . "(eval (format-time-string \"$1\" '(22108 56124 0 0)))") ("input-file" . "about.org") ("time" . "(eval (format-time-string \"$1\"))") ("property" . "(eval (org-entry-get nil \"$1\" 'selective))")) nil ("SUBTITLE" "TITLE" "DATE" "AUTHOR")) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn (or (and (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result (funcall filter info backend-name))) (if result (progn (setq info result)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let_ ((date (plist-get info :date)) (value (or ... ""))) (if (and (consp date) (not ...) (eq ... ...)) (format "(eval (if (org-string-nw-p \"$1\") %s %S))" (format "(org-timestamp-format '%S \"$1\")" ...) value) value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if (not (functionp inner-template)) body (funcall inner-template body info)) info)) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (functionp template)) body-only) full-body (funcall template full-body info)) info)))) (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn (or (and ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result ...)) (if result (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let* ((date ...) (value ...)) (if (and ... ... ...) (format "(eval (if (org-string-nw-p \"$1\") %s %S))" ... value) value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if (not ...) body (funcall inner-template body info)) info)) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) full-body (funcall template full-body info)) info))))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn (or ... ...) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let (...) (if result ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let* (... ...) (if ... ... value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or ... ""))) (inner-template (cdr (assq ... ...))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if ... body ...) info)) (template (cdr (assq ... ...)))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) full-body (funcall template full-body info)) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or ... ...) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn ... ...))) (let ((--dolist-tail-- ...) filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq --dolist-tail-- ...)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data ...)) (cons "date" (let* ... ...)) (cons "email" (org-element-interpret-data ...)) (cons "title" (org-element-interpret-data ...)) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string ...)) (inner-template (cdr ...)) (full-body (org-export-filter-apply-functions ... ... info)) (template (cdr ...))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... full-body ...) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))) (let* ((org-export-current-backend (progn (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list (and subtreep ...) (and visible-only ...) (and body-only ...)))) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function (lambda (o) (and ... ...))) (append (org-export-get-all-options backend) org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or ... ...) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn ... ...))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info ...))) (let ((backend-name ...)) (let (... filter) (while --dolist-tail-- ... ... ...))) (org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons "email" ...) (cons "title" ...) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body ...) (inner-template ...) (full-body ...) (template ...)) (org-no-properties (org-export-filter-apply-functions ... ... info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))) (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn (or (and (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list ... ... ...))) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function (lambda ... ...)) (append (org-export-get-all-options backend) org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn ... ...)) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args ... ...)) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters ...)) (let (...) (let ... ...)) (org-macro-replace-all (list ... ... ... ... ...) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions ... tree info)) (setq info (org-combine-plists info ...)) (let* (... ... ... ...) (org-no-properties ...)))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))))) (save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn (or (and ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil ...)) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function ...) (append ... org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args ... ...) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info ...) (let ... ...) (org-macro-replace-all ... ... parsed-keywords) (setq tree ...) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree ...) (setq info ...) (let* ... ...))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer ... ...) (kill-buffer --buf-copy)))))))) org-export-as(html nil nil t nil) (progn (fset (quote org-html-fontify-code) vnew) (org-export-as (quote html) nil nil t nil)) (unwind-protect (progn (fset (quote org-html-fontify-code) vnew) (org-export-as (quote html) nil nil t nil)) (fset (quote org-html-fontify-code) old)) (let* ((vnew (function (lambda (code lang) (if code (progn (org-html-encode-plain-text code)))))) (old (symbol-function (quote org-html-fontify-code)))) (unwind-protect (progn (fset (quote org-html-fontify-code) vnew) (org-export-as (quote html) nil nil t nil)) (fset (quote org-html-fontify-code) old))) (progn (let* ((vnew (function (lambda (code lang) (if code (progn ...))))) (old (symbol-function (quote org-html-fontify-code)))) (unwind-protect (progn (fset (quote org-html-fontify-code) vnew) (org-export-as (quote html) nil nil t nil)) (fset (quote org-html-fontify-code) old)))) (cond ((eq op/highlight-render (quote js)) (progn (let* ((vnew (function (lambda ... ...))) (old (symbol-function (quote org-html-fontify-code)))) (unwind-protect (progn (fset (quote org-html-fontify-code) vnew) (org-export-as (quote html) nil nil t nil)) (fset (quote org-html-fontify-code) old))))) ((eq op/highlight-render (quote htmlize)) (org-export-as (quote html) nil nil t nil))) (ht-set! ht-temp "content" (cond ((eq op/highlight-render (quote js)) (progn (let* ((vnew (function ...)) (old (symbol-function ...))) (unwind-protect (progn (fset ... vnew) (org-export-as ... nil nil t nil)) (fset (quote org-html-fontify-code) old))))) ((eq op/highlight-render (quote htmlize)) (org-export-as (quote html) nil nil t nil)))) (let ((ht-temp (ht-create))) (ht-set! ht-temp "title" (or (op/read-org-option "TITLE") "Untitled")) (ht-set! ht-temp "content" (cond ((eq op/highlight-render (quote js)) (progn (let* ((vnew ...) (old ...)) (unwind-protect (progn ... ...) (fset ... old))))) ((eq op/highlight-render (quote htmlize)) (org-export-as (quote html) nil nil t nil)))) ht-temp) (or param-table (let ((ht-temp (ht-create))) (ht-set! ht-temp "title" (or (op/read-org-option "TITLE") "Untitled")) (ht-set! ht-temp "content" (cond ((eq op/highlight-render (quote js)) (progn (let* (... ...) (unwind-protect ... ...)))) ((eq op/highlight-render (quote htmlize)) (org-export-as (quote html) nil nil t nil)))) ht-temp)) (mustache-render (or (op/get-cache-item (if template (intern (replace-regexp-in-string ".mustache$" "-template" template)) :post-template)) (op/update-cache-item (if template (intern (replace-regexp-in-string ".mustache$" "-template" template)) :post-template) (funcall (function (lambda nil (message (concat "Read " ... " from file")) (file-to-string (concat ... ...))))))) (or param-table (let ((ht-temp (ht-create))) (ht-set! ht-temp "title" (or (op/read-org-option "TITLE") "Untitled")) (ht-set! ht-temp "content" (cond ((eq op/highlight-render (quote js)) (progn (let* ... ...))) ((eq op/highlight-render (quote htmlize)) (org-export-as (quote html) nil nil t nil)))) ht-temp))) op/render-content() op/get-org-file-options("~/.op-tmp/" ("/Users/zyuan/develop/shelper.github.io/about.org" "/Users/zyuan/develop/shelper.github.io/index.org"))

[(org-file) "\306!r \206\f\307!\211q\210\310 \f\235\"\211@B\f\235\203.\311

A\312 @\313\"\"\210\235\2039\314!\210) \206A\315\n!\207" [org-file visiting file-buffer pub-root-dir upd-list attr-cell find-buffer-visiting find-file op/get-org-file-options op/publish-modified-file plist-get :pub-dir op/handle-deleted-file kill-buffer file-attr-list del-list] 6]("/Users/zyuan/develop/shelper.github.io/about.org") mapc(#(org-file) "\306!r \206\f\307!\211q\210\310 \f\235\"\211@B\f\235\203.\311 A\312 @\313\"\"\210\235\2039\314!\210) \206A\315\n!\207" [org-file visiting file-buffer pub-root-dir upd-list attr-cell find-buffer-visiting find-file op/get-org-file-options op/publish-modified-file plist-get :pub-dir op/handle-deleted-file kill-buffer file-attr-list del-list] 6) op/publish-changes(("/Users/zyuan/develop/shelper.github.io/about.org" "/Users/zyuan/develop/shelper.github.io/index.org") (:update ("/Users/zyuan/develop/shelper.github.io/about.org" "/Users/zyuan/develop/shelper.github.io/index.org") :delete nil) "~/.op-tmp/") op/do-publication(t nil nil t t) call-interactively(op/do-publication record nil) command-execute(op/do-publication record) helm-M-x(nil "op/do-publication") call-interactively(helm-M-x nil nil) command-execute(helm-M-x)

hope this is not a bug of my mac version emacs.

shelper commented 8 years ago

well, this is because the local and system org-mode copy conflicts i have Org-mode version 8.2.10 (release_8.2.10 @ /opt/homebrew-cask/Caskroom/emacs-mac/emacs-24.5-z-mac-5.11/Emacs.app/Contents/Resources/lisp/org/)

and i also installed a copy of org from elpa, which cause the error, deleting elpa copy solves the problem,

however, i still hope there is a way to avoid this case. 'cus the system copy should've been completely shadowed.