From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: Key bindings for info in other window or frame Date: Fri, 26 Jul 2013 23:46:41 +0200 Message-ID: <87siz1kn9a.fsf@gmail.com> References: <87k3kfmyvz.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1374874980 15508 80.91.229.3 (26 Jul 2013 21:43:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Jul 2013 21:43:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 26 23:43:02 2013 Return-path: Envelope-to: ged-emacs-devel@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 1V2pmv-0003Z1-EZ for ged-emacs-devel@m.gmane.org; Fri, 26 Jul 2013 23:43:01 +0200 Original-Received: from localhost ([::1]:53597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2pmv-0000Jz-4I for ged-emacs-devel@m.gmane.org; Fri, 26 Jul 2013 17:43:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2pmS-00088R-53 for emacs-devel@gnu.org; Fri, 26 Jul 2013 17:42:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2pmP-0007tJ-QM for emacs-devel@gnu.org; Fri, 26 Jul 2013 17:42:32 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:44817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2pmP-0007t9-Jb for emacs-devel@gnu.org; Fri, 26 Jul 2013 17:42:29 -0400 Original-Received: by mail-wi0-f182.google.com with SMTP id m6so1360030wiv.3 for ; Fri, 26 Jul 2013 14:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WXDNC7ryxVHpVtFUT1JcPs7Nbk6mwrpTxPLIE47Xj2c=; b=0wO82Wx5aVjrAByhsw9Wg22IHLeQ+SCETsJJbewUwTu5+BcFSTkz4lIvkRSzWCmW3s EaD/oPoIyV5XGEiv0NIh58wguCcG6ZVjmrGm2dSl8huQhLCDYN+aBoIrvU/3pppiMUqZ zalNL5e9vySj9EqAuX6Qz+LOK0tOnrgf5Q02l/jLHI7iAcNkw6GRc7ZS0Oi1mIy5UphY iMrbs3+dNxIdCXYH8ttwG2Ndxq8NkHjR+Zek49kwTnjCmQVShap2qkB/x866AaAcN4Hc Aqaxb221AULJ6IjI8kTap+T2mwZHuhrbRJDVsTKH0ou8I0CTrsizqxRZOmvkpzmRxijC 5z5w== X-Received: by 10.180.211.233 with SMTP id nf9mr329655wic.41.1374874948886; Fri, 26 Jul 2013 14:42:28 -0700 (PDT) Original-Received: from choubidou.localdomain (jau31-3-82-239-20-84.fbx.proxad.net. [82.239.20.84]) by mx.google.com with ESMTPSA id ev19sm7367904wid.2.2013.07.26.14.42.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 26 Jul 2013 14:42:28 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 24 Jul 2013 21:09:08 -0400") 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: 2a00:1450:400c:c05::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162177 Archived-At: Stefan Monnier writes: > (...) But what I'm looking for is a C-x 4 command and a C-x 5 > command which work like prefix keys changing the subsequent > command to use a new window/frame (presumably using > display-buffer-overriding-action). Here is my 2c. It works as expected with the key bindings `C-x 5 C-h i', `C-x 5 C-x C-b' or `C-x 5 M-x compose-mail' but not with `C-x 5 C-x d' or `C-x 5 M-x gnus'... So I am not sure, I am doing it the right way... Please feel free to comment. (defun other-frame-visitor (_arg) (interactive "p") (let* ((key-seq (read-key-sequence "Other frame: ")) (display-buffer-alist (cons '(".*" (display-buffer-pop-up-frame)) display-buffer-alist)) (cmd (lookup-key (current-global-map) key-seq))) (call-interactively cmd))) (global-set-key "\C-x5" 'other-frame-visitor) -- Matthias