From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: If arg, open in new frame Date: Tue, 09 Sep 2014 17:48:18 -0400 Message-ID: <87bnqoh3dp.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410299350 12634 80.91.229.3 (9 Sep 2014 21:49:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 21:49:10 +0000 (UTC) To: emacs list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 23:49:04 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XRTHc-0002NH-0q for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 23:49:04 +0200 Original-Received: from localhost ([::1]:52069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRTHb-0001Wk-Lw for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 17:49:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRTHG-0001Rm-Gp for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 17:48:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRTH5-0005jo-K9 for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 17:48:42 -0400 Original-Received: from mail-yk0-x229.google.com ([2607:f8b0:4002:c07::229]:54612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRTH5-0005jb-Fe for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 17:48:31 -0400 Original-Received: by mail-yk0-f169.google.com with SMTP id 20so1293465yks.28 for ; Tue, 09 Sep 2014 14:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=RYmd5aQEZnsfl7rXzOlrRWNieNPVgEU1s/vIC1YFFWA=; b=JVjsKC/e/Ha0GfxLO+P1QFdDTEAitxG1/+xssmw6rgkvwJPGGT2mLZtk6bxUtnXoEN mx88IAIfR119qDzCg/eAG5ixFPi+kQ77MthacoM1dNKkD4OyqCE5HAKsE4JeIHnY01+x Sfs52geibBkFi/aazDzZQrvfR5Fq8OQ3l3h0FwMoMmkXbjFnZVvw4ASv6RrZ/3LuBekr nrfnun2/AquiSissmwzkoEAkmAvO2xRzKso0GuURNN7A/gwn4xn9f5aVYpZqoNqYEOwr zPhy4WHo5MtPUQcbOxYlj3/IsBKkNjJqix2oIasTEGF+ajjBA/N+8u5c9nq566CHjVDh 1PuQ== X-Received: by 10.236.189.163 with SMTP id c23mr3879572yhn.128.1410299310702; Tue, 09 Sep 2014 14:48:30 -0700 (PDT) Original-Received: from localhost.localdomain (lawn-143-215-53-191.lawn.gatech.edu. [143.215.53.191]) by mx.google.com with ESMTPSA id l64sm6089776yhq.22.2014.09.09.14.48.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 14:48:30 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99753 Archived-At: I have a function that checks for a buffer and either switches to it or creates it. I want it to optionally take an arg, and if an arg is supplied, open/find said buffer in a new frame. My elisp-fu is still young; can you help? Function: (defun go-or-make-agenda () (interactive) (if (get-buffer "\*Org Agenda\*") (switch-to-buffer "\*Org Agenda\*") (org-agenda-list)))