From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takaaki Ishikawa Subject: Re: Quit and Error in org-export--dispatch-action Date: Thu, 5 Dec 2019 22:59:47 +0900 Message-ID: References: <87a787gj9h.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icrfm-0003iR-B6 for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 09:00:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icrfk-00043S-87 for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 09:00:01 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:37564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icrfj-0003yw-Sq for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 09:00:00 -0500 Received: by mail-qk1-x731.google.com with SMTP id m188so3388803qkc.4 for ; Thu, 05 Dec 2019 05:59:59 -0800 (PST) In-Reply-To: <87a787gj9h.fsf@kyleam.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kyle Meyer Cc: orgmode list Dear Kyle and all, Using user-error is another way, but it does not work for me because user-error stops the org-export-dispatch. I would like to keep the session to do an action after the completing org-export-dispatch something like this: (defun my-org-export-dispatch (f ARG) (interactive "P") (if (< (frame-width) 160) (apply f ARG) (split-window-right) (apply f ARG) (delete-window))) (advice-add 'org-export-dispatch :around #'my-org-export-dispatch) So I still prefer to replace the error function with a simple message funct= ion. If you agree with this idea, I'll produce an appropriate patch for this as you kindly instructed. Best, Takaaki -- Takaaki ISHIKAWA 2019=E5=B9=B412=E6=9C=885=E6=97=A5(=E6=9C=A8) 19:27 Kyle Meyer : > > Hi Takaaki, > > Takaaki Ishikawa writes: > > > The org-export provides a quitting option for user by typing `q`. > > This is nice feature but it is implemented with an error function. > > For me, it is not actually an error, it is one of the user actions, > > and when `debug-on-error` is `t`, the Backtrace buffer will be > > popped up every time. It is annoying. > > True, that shouldn't be treated as a plain error. > > > Please find a patch to replace error function with a simple message. > > What do you think? > > > >[...] > > > > --- 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 e= xpertp) > > + (message "Export aborted") '(ignore))) > > Hmm, what about instead replacing the call to `error' with a call to > `user-error'? If that works for you, could you send an updated patch > with a commit message? (Org's commit message conventions are described > at .)