From: Rusi <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: If arg, open in new frame
Date: Wed, 10 Sep 2014 20:28:09 -0700 (PDT) [thread overview]
Message-ID: <de791977-885e-46ba-9719-2db2460c53dd@googlegroups.com> (raw)
In-Reply-To: <mailman.8608.1410350561.1147.help-gnu-emacs@gnu.org>
On Wednesday, September 10, 2014 5:32:30 PM UTC+5:30, Tory S. Anderson wrote:
> So, that half answered my question: thanks for showing me how to use optional args. My function is now:
> (defun go-or-make-agenda (&optional new-frame) (interactive "P")
> (let ((buffer "\*Org Agenda\*"))
> (if (get-buffer buffer)
> (switch-to-buffer buffer)
> (org-agenda-list))))
Does this help?
(defun go-or-make-agenda (&optional new-frame)
(interactive "P")
(let ((buffer "\*Org Agenda\*"))
(if (get-buffer buffer)
(if new-frame
(switch-to-buffer-other-frame buffer)
(switch-to-buffer buffer))
(org-agenda-list))))
next prev parent reply other threads:[~2014-09-11 3:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.8608.1410350561.1147.help-gnu-emacs@gnu.org>
2014-09-10 22:09 ` If arg, open in new frame Emanuel Berg
2014-09-11 3:28 ` Rusi [this message]
2014-09-11 10:58 ` Tory S. Anderson
2014-09-10 12:02 Tory S. Anderson
[not found] <mailman.8567.1410299333.1147.help-gnu-emacs@gnu.org>
2014-09-09 22:44 ` Emanuel Berg
-- strict thread matches above, loose matches on Subject: below --
2014-09-09 21:48 Tory S. Anderson
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=de791977-885e-46ba-9719-2db2460c53dd@googlegroups.com \
--to=rustompmody@gmail.com \
--cc=help-gnu-emacs@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.