From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: launch a program in an arbitrary frame Date: Fri, 17 Jul 2015 22:22:35 -0700 (PDT) Message-ID: <70d9811c-76aa-4eb1-98a9-15c71e2c89c9@default> References: <8xxwpxyducd.fsf@village.keycorner.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1437197035 30309 80.91.229.3 (18 Jul 2015 05:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 05:23:55 +0000 (UTC) To: Hikaru Ichijyo , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 07:23:33 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 1ZGKaw-0007s7-KQ for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 07:23:30 +0200 Original-Received: from localhost ([::1]:47220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGKaw-0002eF-2D for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 01:23:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGKah-0002bO-EZ for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 01:23:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGKac-0005fv-Dj for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 01:23:15 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGKaK-0005aX-3T for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 01:23:10 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6I5Mo89014133 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 18 Jul 2015 05:22:51 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t6I5MckC004960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 18 Jul 2015 05:22:50 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t6I5MbhO021392; Sat, 18 Jul 2015 05:22:37 GMT In-Reply-To: <8xxwpxyducd.fsf@village.keycorner.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:105802 Archived-At: > 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.) >=20 > Anyway, it's redundant to have to manually put ERC in its own frame > every time I launch it. >=20 > I have somethink like this bound to a key: >=20 > (erc :server "localhost") >=20 > 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? Here is one possibility perhaps (I don't use ERC). Find out what the name of the buffer is that you want to have its own frame. Then just customize option `special-display-buffer-names' to include that name. (If there are multiple such buffers then either add each of their names to that option value or, if the buffer names follow a simple pattern, add a regexp that matches those names to the value of option `special-display-regexps'.) `C-h v' will tell you info about these user options. It will also tell you that Emacs considers them to be deprecated in favor of (hyper-complex) option `display-buffer-alist'. If you prefer to wrestle with that option then go ahead. To me, `special-display-buffer-names' is super simple, and it does just what it says it does. And of course "deprecated" does not mean "unsupported" - it still works fine, thank goodness. Anyway, it's your choice. If you need help with `display-buffer-alist', hopefully someone else will have some advice. My 2 cents is bet on `special-display-buffer-names'. By default, a "special-display" buffer is shown in its own frame. Specifically, as `C-h v special-display-buffer-names' tells you, it: "displays the buffer in a way specified by `special-display-function'. `special-display-popup-frame' (the default for `special-display-function') usually displays the buffer in a separate frame made with the parameters specified by `special-display-frame-alist'. So try customizing option `special-display-buffer-names'. You can also customize `special-display-frame-alist', if you want the frame to have certain properties (e.g. different background color or whatever).