From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vaidheeswaran C Newsgroups: gmane.emacs.help Subject: Re: launch a program in an arbitrary frame Date: Sat, 18 Jul 2015 09:42:52 +0530 Message-ID: <55A9D244.9010502@gmail.com> References: <8xxwpxyducd.fsf@village.keycorner.org> Reply-To: vaidheeswaran.chinnaraju@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437192797 30367 80.91.229.3 (18 Jul 2015 04:13:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 04:13:17 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 06:13:08 2015 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 1ZGJUp-0007TG-LZ for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 06:13:07 +0200 Original-Received: from localhost ([::1]:46808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJUo-0001Sn-Tz for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 00:13:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJUb-0001Rg-DU for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 00:12:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGJUY-0004t5-5k for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 00:12:53 -0400 Original-Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:34406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJUX-0004sz-UH for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 00:12:50 -0400 Original-Received: by pacan13 with SMTP id an13so70909066pac.1 for ; Fri, 17 Jul 2015 21:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=V6U0eSvUHlt0REdSiE+7F7q1jZiCKCefWREudfr4Jqc=; b=Ulh0e1ReIsWQhzA21y6dvB6uCrj0V1rAh3ARHBrffiwjxZ0w5t0j5eBGoHMyorLF6y xzrlRKBgqV1/V8JaGMqiipS6aV1bp5bfjPqdd1zzyqO97Qu/TQ+0WJ6OPjUKKe7jK/yn Ef5ErU2pWLSnLeJ+qgEJmVn1OvHflh2lzbDf7WEL4ZwuQa9EMO5HQj4kLQ7qfanIqKIJ vmx14vMx8LYdDG7r9fHfjJHI9UA+2MVl6pn4cluBFLjqwcnjUCsY4VXwzX7EIzwSYE/w P2YjP1RnQrdNyC8HvjxTuvlvWqUarRGYrOg8awOlTFcvz9sQ698UaXv6TlCudFf+ZQm4 16MQ== X-Received: by 10.68.206.7 with SMTP id lk7mr35274068pbc.52.1437192768480; Fri, 17 Jul 2015 21:12:48 -0700 (PDT) Original-Received: from [192.168.43.83] ([106.206.146.80]) by smtp.gmail.com with ESMTPSA id yp5sm12880483pbb.22.2015.07.17.21.12.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jul 2015 21:12:47 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: <8xxwpxyducd.fsf@village.keycorner.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::230 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:105800 Archived-At: On Saturday 18 July 2015 08:51 AM, Hikaru Ichijyo wrote: > A newbie question (getting more hooked on Emacs): > > I often run ERC to connect to IM services via a local Bitlbee daemon. > It works best running in its own frame, so I know when people are > talking to me without having to flip through all my buffers. (A window > doesn't seem to be sufficient, since Gnus keeps changing the window > layout to its Summary/Article split, and the only way I've found to deal > with that is to keep programs whose layout I care about in separate > frames.) > > Anyway, it's redundant to have to manually put ERC in its own frame > every time I launch it. > > I have somethink like this bound to a key: > > (erc :server "localhost") > > Some programs have the ability to launch in a new frame built into them, > but shouldn't you be able to do that with almost any program? If I > wanted to run the above in an 80x24 frame at a particular X coordinate, > how would I say that in Elisp? > I don't use erc or frames. But this is how I would go about exploring more on the topic. ---------------------------------------------------------------- Did you try #emacs on irc.freenode.net? They are likely to have a ready solution for you. http://www.emacswiki.org/emacs?ErcBasics ---------------------------------------------------------------- M-x load-library erc M-x apropos erc frame I get Type RET on a type label to view its full documentation. erc-frame-alist User option: Alist of frame parameters for creating erc frames. Properties: standard-value custom-type custom-requests variable-documentation erc-frame-dedicated-flag User option: Non-nil means the erc frames are dedicated to that buffer. Properties: standard-value custom-type custom-requests variable-documentation erc-reuse-frames User option: Determines whether new frames are always created. Properties: standard-value custom-type custom-requests variable-documentation supercite-frames Properties: custom-loads ---------------------------------------------------------------- 1. Create a new frame. 2. Open erc there. Or use the following which more or less does the same thing. (defun erc-other-frame (&optional server) (interactive (list "irc.freenode.net")) (switch-to-buffer-other-frame (erc :server server))) M-x erc-other-frame ---------------------------------------------------------------- Once you have hand-adjusted the new frame, get it's configuration. If you do M-x pp-eval-expression RET (current-frame-configuration) RET it tells you about your current frame. You may want to steal top, left, width, height and name parameters. ---------------------------------------------------------------- Once you have obtained the configuration, plug those values in to erc frame alist. ---------------------------------------------------------------- You can also experiment with what are called framesets. Try doing what these nodes tell you C-h k C-x r f C-h K C-x r f (Note the case of letter `k') ----------------------------------------------------------------