From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christian Lynbech Newsgroups: gmane.emacs.devel Subject: Re: frame names on tty are different than the ones on X-frames Date: Tue, 27 Feb 2018 14:13:57 +0100 Message-ID: References: <87r2p78qy0.fsf@gmail.com> <83fu5n1on3.fsf@gnu.org> <87po4r8o8l.fsf@gmail.com> <83bmgb1mwm.fsf@gnu.org> <87o9kb8b15.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1519738775 6923 195.159.176.226 (27 Feb 2018 13:39:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Feb 2018 13:39:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?Q?andr=C3=A9s_ram=C3=ADrez?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 27 14:39:31 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqfTe-0001Gj-KB for ged-emacs-devel@m.gmane.org; Tue, 27 Feb 2018 14:39:30 +0100 Original-Received: from localhost ([::1]:37195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqfVg-0005Q5-WB for ged-emacs-devel@m.gmane.org; Tue, 27 Feb 2018 08:41:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqfUa-0004a9-Mn for emacs-devel@gnu.org; Tue, 27 Feb 2018 08:40:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqfUY-0000Ym-SB for emacs-devel@gnu.org; Tue, 27 Feb 2018 08:40:27 -0500 Original-Received: from cph1.spamfilter.cc ([2001:67c:3c0:12::198]:48744) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eqfUU-0000VS-Dy; Tue, 27 Feb 2018 08:40:22 -0500 Original-Received: from mail01.mxhotel.dk ([91.221.196.236]) by cph1.spamfilter.cc with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eqf50-000Ffq-0n; Tue, 27 Feb 2018 14:14:03 +0100 Original-Received: from Christians-iMac (dhcp-5-186-77-199.ip.fibianet.dk [5.186.77.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: christian@defun.dk) by mail01.mxhotel.dk (Postfix) with ESMTPSA id 98D8C194C07; Tue, 27 Feb 2018 14:14:41 +0100 (CET) X-Report-Abuse-To: abuse@mxhotel.dk In-Reply-To: <87o9kb8b15.fsf@gmail.com> (=?utf-8?Q?=22andr=C3=A9s_ram?= =?utf-8?Q?=C3=ADrez=22's?= message of "Mon, 26 Feb 2018 19:40:54 -0600") X-Originating-IP: 91.221.196.236 X-SpamExperts-Domain: smtp.mxhotel.dk X-SpamExperts-Username: 91.221.196.236 Authentication-Results: spamfilter.cc; auth=pass smtp.auth=91.221.196.236@smtp.mxhotel.dk X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.07) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5la6adxVStz0WStj5P5SU65602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO/0jmYawgi5RCA+c+skOw+NRweGjdx2QhRFb6aw1iY8ToSW0xuybnDuCVwCNd06vvtEF OAeJhx6u8Ie5BNKaY5pIWszBtjhxEU9cs2lF+ufleuSfEct4gPCWtadRz12qUeRGCpPXj4Fxm7ec bjIQCpvQr5gGfAUlC9wICubeGiC4sju+a5Y5fQxOHSOfjBgIvAvQwJlZfSchi68l9K48DiyWZvJ8 2v5qqDoKQEdlLW3+b/AoN4S5gHOjMzaHYZgjUtDWTVv12QvahznSqMqV7gqbr/PgCQLOTlVXRsO4 805pBD/rR3YhaWb7w+IqzfFaZTIfQ1gg65A/AFWV1l+oLLkgxzzO1T66wN9PVWh9raPqhKWTHxmv a/0jGhMJkUzPpoTCfLKeOgnc5hoKuzU1JR8Z8oeVCIPzgMkbAPj3kjNxnPdBq39B9a4H4c8Offc8 mSu9dwRN5ITu/E8HHHrUDqhheyJUXnB99bIX9h11Era+oCAFsr62jIhMICnYUnDeXwLXIeHXZV6h sF+vRw+Jb5Sjues8r8gNbtZnK3DuGWdIBCeJ12L/kfYAKkRyfR6mUWCDZy4kHnMSea9dtMTjQ6Hc j/NEtrjfvMo7CQibgsLkSUkUTb6P3jbe6TUWrw05IOMRZOqWznTWYsnDz/791Nu638Be7nrPIKSe /ba92MTQvOzP6K8d3yg1l8vOrsSir2wjiDiUVv6T/Uf2fvFhH0WHqoD0gUf0K5LJs2odGawbUV8S hebT8U8Xw9HTDfreWVA+Kk3lyfwHp X-Report-Abuse-To: spam@cph1.spamfilter.cc X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:67c:3c0:12::198 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223121 Archived-At: I too have a multi-frame setup, though it has not got quite as many frames and I use it mostly in graphical environments. I define my frames with frame paramaters such as: ((name . "((MAIN))") (icon-name . "((MAIN))") ...) and then I have functions such as (defun my-select-main (&optional arg) "Fast select of main buffer. Optional argument ARG (prefix arg.) means iconify current frame." (interactive "P") (my-select-frame 'main arg)) This I bind to keys (in my case for the main frame: F8 2) It calls `my-select-frame' which is defined as: (defun my-select-frame (name &optional discard) "Select, raise and show frame NAME. NAME may be either a frame object or a symbol that will then be interpreted by `my-frame-configuration'. Optional argument DISCARD means get rid of current frame." (interactive) (let* ((current-frame (selected-frame)) (frame-conf (my-frame-configuration name)) (frame-exists t)) (cond ((framep name) (make-frame-visible name) (raise-frame (select-frame name)) (and discard (iconify-frame current-frame))) ((not frame-conf) (warn "No definition for %s" name)) ((stringp frame-conf) (switch-to-buffer frame-conf)) (t (condition-case nil (select-frame-by-name (cdr (assq 'name frame-conf))) (error (setq frame-exists nil))) (if (not frame-exists) (raise-frame (select-frame (funcall 'make-frame frame-conf)))) (and discard (iconify-frame current-frame))))) (sit-for 0.1) (frame-reposition) (other-frame 0) ;hack to place mouse cursor in corner (sit-for 0.1) (setq current-prefix-arg nil)) The function `my-frame-configuration' just is a small utility function to return the desired configuration of a certain frame (using the symbol 'main to signify the main frame) such that I can select the frame if it exists or create it on demand if not. Some window managers are diligent about putting the icon name under the icon, others are not, but I mostly use the keyboard shortcuts anyway. ------------------------+----------------------------------------------------- Christian Lynbech | christian #\@ defun #\. dk ------------------------+----------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic@hal.com (Michael A. Petonic)