From b22ed4854e7776effa62f01af47691800a76a9ff Mon Sep 17 00:00:00 2001
From: Takaaki ISHIKAWA <takaxp@ieee.org>
Date: Mon, 9 Dec 2019 13:08:56 +0900
Subject: [PATCH] ox.el: Replace error with user-error to exit
 org-export-dispatch

* lisp/ox.el (org-export--dispatch-action): Replace error with user-error
(org-export--dispatch-action): Replace an error function with a user-error so that user can quit `org-export-dispatch' without entering debugging mode.

Modified from a patch proposal by Takaaki Ishikawa.
---
 lisp/ox.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 5b4134ecc..10286e18f 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6929,7 +6929,7 @@ 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")
+     ((eq key ?q) (if (not first-key) (user-error "Export aborted")
 		    (org-export--dispatch-ui options nil expertp)))
      ;; Help key: Switch back to standard interface if expert UI was
      ;; active.
-- 
2.21.0 (Apple Git-122.2)

