From: Josiah Schwab <jschwab@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Changing capture frame/window behavior depending on source
Date: Mon, 16 Dec 2013 16:56:45 -0800 [thread overview]
Message-ID: <87sitsjnw2.fsf@gmail.com> (raw)
In-Reply-To: <87wqjhus0v.fsf@gmail.com>
Josiah Schwab writes:
> When I invoke the capture from my bookmark, I also want capture to be
> the only window in the frame. I can make all captures act that way by
> setting (add-hook 'org-capture-mode-hook 'delete-other-windows)
>
> But when I tried to have this part be source dependent with
>
> (defun jws/org-capture-initialize ()
> (if (jws/org-protocol-capture-p) 'delete-other-windows))
>
> (add-hook 'org-capture-mode-hook 'jws/org-capture-initialize)
>
> it still gave me a frame with two windows, for reasons I don't
> understand. I stepped through the code with edebug and confirmed that
> jws/org-protocol-capture-p was evaluating to true.
Just to follow up, in case someone searches for this thread,
(defun jws/org-capture-initialize ()
(if (jws/org-protocol-capture-p) (delete-other-windows)))
works fine. It helps to actually evaluate the function...
Josiah
prev parent reply other threads:[~2013-12-17 0:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 5:52 Changing capture frame/window behavior depending on source Josiah Schwab
2013-12-17 0:56 ` Josiah Schwab [this message]
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=87sitsjnw2.fsf@gmail.com \
--to=jschwab@gmail.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 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).