1

I get Invalid function: org-with-silent-modifications in the minibuffer when I try to do any sort of export (C-c C-e h o or M-x org-html-export-to-html etc.)

I'm in emacs 24.3.1 on Ubuntu 14. I have gotten this error before in various other things I can't remember, but ignored it because it wasn't critical.

Any ideas what this error is from and how to fix it?


I'm using org-mode version 8.2.10.

Here is the traceback:

Debugger entered--Lisp error: (invalid-function org-with-silent-modifications)
org-with-silent-modifications(nil)
org-refresh-category-properties()
org-get-category()
org-entry-properties(nil standard)
org-element-headline-parser(6161 nil)
org-element--current-element(6161 nil first-section nil)
org-element--parse-elements(1 6161 first-section nil nil nil (org-data nil))
org-element-parse-buffer(nil nil)
(org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)
(setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info))
(progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (vectorp backend) (>= (length backend) 8) (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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (vectorp backend) (>= (length backend) 8) (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)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let ((file (plist-get info :input-file))) (if file (file-name-sans-extension (file-name-nondirectory file)) (plist-get info :input-buffer))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or (and (vectorp backend) (>= ... 8) (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)))) (progn (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--)))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (if (not (functionp inner-template)) body (funcall inner-template body 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 (vectorp backend) (>= (length backend) 8) (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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (vectorp backend) (>= ... 8) (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)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let ((file (plist-get info :input-file))) (if file (file-name-sans-extension (file-name-nondirectory file)) (plist-get info :input-buffer))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (progn (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--)))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (if (not (functionp inner-template)) body (funcall inner-template body 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 (vectorp backend) (>= ... 8) (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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (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)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let ((file ...)) (if file (file-name-sans-extension ...) (plist-get info :input-buffer))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or ... ...) (aref backend 1)))) (progn (let ((--dolist-tail-- ...) filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq --dolist-tail-- ...))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (if (not ...) body (funcall inner-template 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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (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)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let (...) (if file ... ...)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data ...)) (cons "date" (org-element-interpret-data ...)) (cons "email" (or ... "")) (cons "title" (org-element-interpret-data ...)))) (let ((backend-name (progn ... ...))) (progn (let (... filter) (while --dolist-tail-- ... ... ...)))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (if ... body ...)) (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 (vectorp backend) (>= (length backend) 8) (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))) 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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn ... ...))) (setq info (org-export-install-filters (org-combine-plists info ...))) (if (plist-get info :title) nil (plist-put info :title (let ... ...))) (org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons "email" ...) (cons "title" ...))) (let ((backend-name ...)) (progn (let ... ...))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (vectorp backend) (>= ... 8) (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))) 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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args ... ...)) (setq info (org-export-install-filters ...)) (if (plist-get info :title) nil (plist-put info :title ...)) (org-macro-replace-all (list ... ... ... ...)) (let (...) (progn ...)) (setq tree (org-export-filter-apply-functions ... ... 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))) 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-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (setq info ...) (if ... nil ...) (org-macro-replace-all ...) (let ... ...) (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 nil (:output-file "./Literature_summary.html"))
(let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ((coding-system-for-write encoding)) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))
(if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message (current-message)) (message "%s" with-temp-message))) (let ((--copy-fun (org-export--generate-copy-script ...)) (--temp-file (make-temp-file "org-export-process")) (--coding buffer-file-coding-system)) (let ((temp-file --temp-file) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))) (let* ((process-connection-type nil) (--proc-buffer ...) (--process ...)) (org-export-add-to-stack (get-buffer --proc-buffer) nil --process) (let (...) (set-process-sentinel --process ...))))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let (...) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file)))
(let ((ext-plist (org-combine-plists (list (quote :output-file) file) ext-plist)) (encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message ...) (message "%s" with-temp-message))) (let ((--copy-fun ...) (--temp-file ...) (--coding buffer-file-coding-system)) (let (... ...) (unwind-protect ... ...)) (let* (... ... ...) (org-export-add-to-stack ... nil --process) (let ... ...)))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))))
(if (not (file-writable-p file)) (error "Output file not writable") (let ((ext-plist (org-combine-plists (list (quote :output-file) file) ext-plist)) (encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn ... ...)) (let (... ... ...) (let ... ...) (let* ... ... ...))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ...) (and ... ...)))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))))) org-export-to-file(html "./Literature_summary.html" nil nil nil nil nil)
(let* ((extension (concat "." org-html-extension)) (file (org-export-output-file-name extension subtreep)) (org-export-coding-system org-html-coding-system)) (org-export-to-file (quote html) file async subtreep visible-only body-only ext-plist)) org-html-export-to-html(nil nil nil nil) (org-open-file (org-html-export-to-html nil s v b)) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b)))
(lambda (a s v b) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b))))(nil nil nil nil) funcall((lambda (a s v b) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-to-html nil s v b)))) nil nil nil nil) (save-excursion (if arg (progn (if (eq (marker-buffer org-export-dispatch-last-position) (org-base-buffer (current-buffer))) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t)))
(cond ((eql action (quote template)) (org-export-insert-default-template nil optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote publish-current-file)) (org-publish-current-file (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-current-project)) (org-publish-current-project (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc (org-icompleting-read "Publish project: " org-publish-project-alist nil t) org-publish-project-alist) (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq (marker-buffer org-export-dispatch-last-position) (org-base-buffer ...)) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t)))))
(let* ((input (cond ((equal arg (quote (16))) (quote (stack))) ((and arg org-export-dispatch-last-action)) (t (let ((wconfig ...)) (unwind-protect (progn ...) (set-window-configuration wconfig)))))) (action (car input)) (optns (cdr input))) (if (memq (quote subtree) optns) nil (move-marker org-export-dispatch-last-position nil)) (cond ((eql action (quote template)) (org-export-insert-default-template nil optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote publish-current-file)) (org-publish-current-file (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-current-project)) (org-publish-current-project (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc (org-icompleting-read "Publish project: " org-publish-project-alist nil t) org-publish-project-alist) (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq ... ...) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t)))))) org-export-dispatch(nil) call-interactively(org-export-dispatch nil nil)

Hopefully I didn't butcher the indentation so that it's unreadable.

2
  • What version of org-mode are you using? – erikstokes Oct 22 '15 at 2:57
  • 1
    I guess you updated from ELPA. If so, try removing org, starting a fresh emacs session where org mode is not loaded and installing org from there. – YoungFrog Oct 22 '15 at 5:21
1

Turn on debug-on-error (non-nil). Search the source code for org-with-silent-modifications.

Typically names with with- in them are macros, not functions. If you are using code that tries to invoke that macro without the file that defines the macro having been loaded, you might see this error.

Find the file that has the defmacro for the macro, and require it before using the file that invokes the macro. Or at least load that defining file and then byte-compile the file that uses it -- IOW, load the defining file at byte-compile time, at least.


The macro is defined in org-compat.el. It seems that the Org files already require that file. Probably some other library you are using tries to use that macro without first requiring org-compat.el. Turning on debug-on-error should help you find that problematic library. After you find it, just add this to it, at the beginning:

(eval-when-compile (require 'org-compat)) ; org-with-silent-modifications
6
  • I got the debug trace, but I don't know much elisp so it doesn't make much sense to me, so I guess I'm still stuck. – salotz Oct 22 '15 at 21:39
  • Show what you found, and perhaps we can help you. – Drew Oct 23 '15 at 1:19
  • I think it's too much but I'll post traceback in question – salotz Oct 23 '15 at 13:49
  • Can you show the lower part of the backtrace, to see how org-element-parse-buffer gets called? Grepping for that function shows that, at least in the normal Org files, it is defined in org-element.el and called in org.el, ox.el, and ox-odt.el. I see that ox.el does not load org-compat.el. Maybe it should (contact the Org maintainer). But if you cannot find the exact caller then just consider putting (require 'org-compat) early in your init file, so it is loaded (hopefully) before any code that needs it. – Drew Oct 23 '15 at 17:47
  • That was the full backtrace. It only gets called like this (org-element-parse-buffer nil visible-only). I put (require org-compat) at the very beginning of my init.el file and it breaks org-mode. I'm going to try updating with guix. – salotz Oct 28 '15 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.