Skip to content

Instantly share code, notes, and snippets.

@takaxp
Created December 5, 2019 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takaxp/e8c06ab06e66d327e9ba919a4e5b95c7 to your computer and use it in GitHub Desktop.
Save takaxp/e8c06ab06e66d327e9ba919a4e5b95c7 to your computer and use it in GitHub Desktop.
patch to suppress error when quit the export
diff --git a/lisp/ox.el b/lisp/ox.el
index 5b4134ecc..98846540d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6929,8 +6929,8 @@ options as CDR."
(org-export--dispatch-ui options first-key expertp))
;; q key at first level aborts export. At second level, cancel
;; first key instead.
- ((eq key ?q) (if (not first-key) (error "Export aborted")
- (org-export--dispatch-ui options nil expertp)))
+ ((eq key ?q) (if first-key (org-export--dispatch-ui options nil expertp)
+ (message "Export aborted") '(ignore)))
;; Help key: Switch back to standard interface if expert UI was
;; active.
((eq key ??) (org-export--dispatch-ui options first-key nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment