emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Alexander Baier <lexi.baier@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Alfred workflow for org-capture
Date: Fri, 13 Sep 2013 11:19:55 +0200	[thread overview]
Message-ID: <m238p9yt6s.fsf@polytechnique.org> (raw)
In-Reply-To: <87wqmlqgtu.fsf@gmail.com>

lexi.baier@gmail.com writes:

> Hi Alan,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
> [...]
>
>> The question: is there a way to:
>> - present only the capture buffer in the new frame (right now it's split
>> with the scratch buffer)?
>> - delete the window at the end of capture?
>>
>
> How about `org-capture-after-finalize-hook'? What I can get from the
> pcumentation string it seems to be what you are looking for.  You could
> try something like this:
>
>   (add-hook org-capture-after-finalize-hook 'delete-frame)
>
> Just tried that, and on my machine this works.

Thanks, here is my modified version, if someone finds it useful. It
tests for the frame name (there may be a simpler way to get it, but I
could not find it) before deleting the frame.

--8<---------------cut here---------------start------------->8---
(add-hook 'org-capture-after-finalize-hook
          (lambda ()
            (when (equal
                   (cdr (assoc 'name (frame-parameters (selected-frame))))
                   "remember")
              (delete-frame))))
--8<---------------cut here---------------end--------------->8---

Alan

  reply	other threads:[~2013-09-13  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 14:27 Alfred workflow for org-capture Robert P. Goldman
2013-09-12 18:51 ` Haider Rizvi
2013-09-13  7:45   ` Alan Schmitt
2013-09-13  8:14     ` Alexander Baier
2013-09-13  9:19       ` Alan Schmitt [this message]
2013-09-13  9:30         ` Alan Schmitt
2013-09-13 18:41   ` Damon Haley

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=m238p9yt6s.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=lexi.baier@gmail.com \
    /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).