emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Tyler Smith <tyler@plantarum.ca>
Cc: Emacs Org-Mode Help <emacs-orgmode@gnu.org>
Subject: Re: org-capture quitting and make-capture-frame
Date: Mon, 23 Oct 2017 22:03:23 +0200	[thread overview]
Message-ID: <87wp3lr5ro.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <1508770777.115397.1148043056.71AE2BBC@webmail.messagingengine.com> (Tyler Smith's message of "Mon, 23 Oct 2017 10:59:37 -0400")

Hello,

Tyler Smith <tyler@plantarum.ca> 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

  reply	other threads:[~2017-10-23 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 14:59 org-capture quitting and make-capture-frame Tyler Smith
2017-10-23 20:03 ` Nicolas Goaziou [this message]
2017-10-23 20:41   ` Tyler Smith
2017-10-23 21:11     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wp3lr5ro.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=tyler@plantarum.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).