emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-capture quitting and make-capture-frame


From: Nicolas Goaziou
Subject: Re: [O] org-capture quitting and make-capture-frame
Date: Mon, 23 Oct 2017 22:03:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Tyler Smith <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]