From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-capture quitting and make-capture-frame Date: Mon, 23 Oct 2017 22:03:23 +0200 Message-ID: <87wp3lr5ro.fsf@nicolasgoaziou.fr> References: <1508770777.115397.1148043056.71AE2BBC@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6iwb-0007A5-9z for emacs-orgmode@gnu.org; Mon, 23 Oct 2017 16:03:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6iwY-0007Si-5q for emacs-orgmode@gnu.org; Mon, 23 Oct 2017 16:03:29 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48476) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6iwX-0007SB-WB for emacs-orgmode@gnu.org; Mon, 23 Oct 2017 16:03:26 -0400 In-Reply-To: <1508770777.115397.1148043056.71AE2BBC@webmail.messagingengine.com> (Tyler Smith's message of "Mon, 23 Oct 2017 10:59:37 -0400") 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: Tyler Smith Cc: Emacs Org-Mode Help Hello, Tyler Smith writes: > Hi, > > I use org-capture with a new frame, so I can call it quickly when from > the OS (see > http://www.windley.com/archives/2010/12/capture_mode_and_emacs.shtml). > > This works well, except that if I quit a capture, the frame is left > hanging. I looked through the code, and this is due to org-capture > calling `(user-error "Abort")` in response to my entering 'q' to > indicate I want to cancel my capture. > > It would be nice to allow for some configuration here. In my case, I > have replaced this line: > > ((equal entry "q") > (user-error "Abort")) > > (source: > http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org-capture.el?h=emacs-sync#n632 > ) > > with > > ((equal entry "q") > (if (equal "capture" (frame-parameter nil 'name)) > (delete-frame)) > > That will work for my use case, until org-mode is updated at least. > Would it be possible to do something like this instead: > > ((equal entry "q") > (funcall org-capture-quite-function)) Wouldn't it make more sense to turn it into (message "Abort") ? After all, it is not an error. It also allow to call other functions, e.g., `delete-frame' after exiting capture. WDYT? Regards, -- Nicolas Goaziou