From: Nick Dokos <nicholas.dokos@hp.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Cc: nicholas.dokos@hp.com
Subject: Re: Getting rid of split frame with org-capture
Date: Sat, 12 Nov 2011 23:13:11 -0500 [thread overview]
Message-ID: <1377.1321157591@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Gregor Zattler <telegraph@gmx.net> of "Sat, 12 Nov 2011 16:57:31 +0100." <20111112155731.GA5939@shi.workgroup>
Gregor Zattler <telegraph@gmx.net> wrote:
> Hi Thomas, org-mode community,
> * Thomas Lockney <thomas@lockney.net> [10. Nov. 2011]:
> > I'm attempting to get some code working that should create a new frame
> > with *just* org-capture,
>
> this is something I also tried hard to achive.
>
> > but when I run it, I keep getting a split
> > despite various attempts at running delete-other-windows. I'm running
> > on "GNU Emacs 24.0.90.1 (i386-apple-darwin10.8.0, NS
> > apple-appkit-1038.36)" so perhaps this is a 24 specific issue. Here's
> > the code I've currently got:
> >
> > (defadvice org-capture-finalize (after delete-capture-frame activate)
> > "Advise capture-finalize to close the frame if it is the capture frame"
> > (if (equal "capture" (frame-parameter nil 'name))
> > (delete-frame)))
> >
> > (defadvice org-capture-destroy (after delete-capture-frame activate)
> > "Advise capture-destroy to close the frame if it is the capture frame"
> > (if (equal "capture" (frame-parameter nil 'name))
> > (delete-frame)))
> >
> > (defun make-capture-frame ()
> > "Create a new frame and run org-capture."
> > (interactive)
> > (make-frame '((name . "Capture")
> > (width . 100)
> > (height . 15)))
> > (select-frame-by-name "Capture")
> > (delete-other-windows)
> > (org-capture))
>
> I played a bit with your code. I also use emacs24. I also get a
> split frame. I think it's org-capture which splits the frame.
>
> I want to run this with emacsclient. But when there is no
> graphical (X11) frame then emacsclient -e '(make-capture-frame)'
> does nothing, no frame pops up.
>
> > I've also tried this using the org-capture-mode-hook to call
> > delete-other-windows and I've tried placing delete-other-windows after
> > the call to org-capture (both of those based on solutions I've seen
> > posted to this list at various times). Anyone have any clues on this?
> > I'm stumped, but I'm also fairly inexperienced at programming
> > emacs.
>
> me too. For my capture needs I would like to automatically open a frame for
> org-capture and also automatically close it when finishing the
> capture. This should happen regardless of other frames or the
> lack of other frames.
>
AFAICT, this is not possible with the current code. The above is
attacking the problem at the wrong level: you can't change that behavior
from the outside; you need to change the existing code in order to
implement it.
If you wish to hack, the relevant function is
org-capture-place-template: changing the
org-switch-to-buffer-other-window to org-switch-to-buffer-other-frame
(and adding a definition for the latter function in analogy to the
former) would indeed pop up a frame and you can enter your capture and
finalize it - that's the easy part.
But note that org-capture-finalize would need a tweak too in order to
delete the now useless frame.
And of course all of this would need to be done conditionally based
on a new user option, perhaps org-capture-in-new-frame (nil by default).
And don't forget to make it customizable.
Not worth the bother IMO[fn:1], but if you wish to implement it and submit
a patch, I'd be happy to review it.
Nick
Footnotes:
[fn:1] Remember, capture is supposed to be as unobtrusive as possible:
you just want to squirrel away something for future
reference. Bells and whistles (which, IMO, this change would be)
are not the point: you want to get in, record the data and get
out and back to work as fast as possible. Popping up frames slows
things down but more importantly jolts you away from what you
were doing. At least, it would me (I think): that's why I don't
think it's worth it, but you may very well disagree.
next prev parent reply other threads:[~2011-11-13 4:13 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 19:08 Getting rid of split frame with org-capture Thomas Lockney
2011-11-12 15:57 ` Gregor Zattler
[not found] ` <telegraph@gmx.net>
2011-11-13 4:13 ` Nick Dokos [this message]
2011-11-13 16:48 ` Tom Prince
2011-11-13 17:57 ` Nick Dokos
2011-11-20 16:16 ` Tom Prince
2011-12-13 23:11 ` Andreas Leha
2011-12-14 16:37 ` Tom Prince
2013-10-04 4:33 ` Alexander Vorobiev
2013-10-04 7:06 ` Alan Schmitt
2011-11-25 16:35 ` Eric S Fraga
2012-01-12 22:12 ` How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" Nick Dokos
2012-01-12 22:56 ` Nick Dokos
2012-01-14 16:16 ` [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) " Gregor Zattler
2012-01-15 15:33 ` How to debug "org-clock-display: Args out of range: [48230 48230 " Stefan Nobis
2012-01-14 18:49 ` [BUG] org-clock-sum cannot handle headings with more than 29 stars (was: Re: How to debug "org-clock-display: Args out of range: [48230 48230) " Nick Dokos
2012-01-22 12:50 ` [BUG][PATCH] document number of stars limitation with respect to org-clock-sum (was: Re: org-clock-sum cannot handle headings with more than 29 stars) Gregor Zattler
2012-01-22 13:15 ` [PATCH 2/3] Document max number of stars in headings in manual Gregor Zattler
2012-01-24 16:10 ` [Accepted] [O, " Bastien Guerry
2012-01-22 13:15 ` [PATCH 1/3] Document max number of stars in headings in docstring of org-inlinetask-minlevel Gregor Zattler
2012-01-24 16:10 ` [Accepted] [O, " Bastien Guerry
2012-01-22 13:30 ` [PATCH 3/3] Document max number of stars in clocking section Gregor Zattler
2012-01-24 16:11 ` [Accepted] [O, " Bastien Guerry
2012-01-24 16:16 ` [BUG][PATCH] document number of stars limitation with respect to org-clock-sum Bastien
2012-10-14 5:31 ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] Nick Dokos
2013-01-24 18:10 ` How to track down "No heading for this item in buffer or region."? Nick Dokos
2013-01-24 18:31 ` Nick Dokos
2011-11-13 20:41 ` Getting rid of split frame with org-capture Nick Dokos
-- strict thread matches above, loose matches on Subject: below --
2012-01-06 0:21 How to debug "org-clock-display: Args out of range: [48230 48230 48230 38618 38618 0 0 0 0 0 ...], 61" Gregor Zattler
2012-01-06 1:01 ` Bernt Hansen
2012-01-12 21:41 ` Gregor Zattler
2012-01-15 23:07 ` Bernt Hansen
2012-10-11 12:51 how to customise Emacs to recognise 13.10. as 13th of October this year instead of 2010-10-13? Gregor Zattler
2012-10-11 14:13 ` Memnon Anon
2012-10-11 15:20 ` Gregor Zattler
2012-10-12 15:14 ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] (was: Re: how to customise Emacs to recognise 13.10. as 13th of October this year instead of 2010-10-13?) Gregor Zattler
2012-10-12 16:24 ` Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] Nicolas Goaziou
2012-10-13 8:12 ` Gregor Zattler
2012-10-13 10:10 ` Nicolas Goaziou
2012-10-13 18:44 ` Gregor Zattler
2012-10-14 6:01 ` Carsten Dominik
2012-10-14 7:57 ` Nicolas Goaziou
2012-10-15 6:39 ` Carsten Dominik
2012-10-15 11:06 ` Nicolas Goaziou
2013-01-24 12:32 How to track down "No heading for this item in buffer or region."? Gregor Zattler
2013-01-24 12:44 ` Bastien
2013-01-24 16:23 ` Gregor Zattler
2013-01-24 19:07 ` Bastien
2013-01-24 19:24 ` Bastien
2013-01-24 19:35 ` Nick Dokos
2013-01-24 20:29 ` Bastien
2013-01-25 5:20 ` Nick Dokos
2013-01-25 16:11 ` J. David Boyd
2013-01-26 10:51 ` Bastien
2013-01-26 16:45 ` Nick Dokos
2013-01-31 10:43 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377.1321157591@alphaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.