From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jose E. Marchesi" Newsgroups: gmane.emacs.devel Subject: Re: POLL: make C-x o transient Date: Mon, 25 Jan 2021 18:27:16 +0100 Message-ID: <87r1m97wqz.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14528"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "condy0919@gmail.com" , Zhiwei Chen , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 25 18:28:03 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l45ek-0003dP-QJ for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jan 2021 18:28:02 +0100 Original-Received: from localhost ([::1]:40600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l45ej-0005Hj-QJ for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jan 2021 12:28:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l45e8-0004nO-Gv for emacs-devel@gnu.org; Mon, 25 Jan 2021 12:27:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56179) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l45e5-0001iD-Ef; Mon, 25 Jan 2021 12:27:21 -0500 Original-Received: from [141.143.193.76] (port=48900 helo=termi.gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l45e4-0000P4-Br; Mon, 25 Jan 2021 12:27:20 -0500 In-Reply-To: (Stefan Monnier's message of "Mon, 25 Jan 2021 09:39:00 -0500") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263400 Archived-At: >> Which will make `C-x o` invoke a transient version of `other-window' >> like `text-scale-adjust=E2=80=99 does. > > I think the pattern is clear: `C-x ` are good candidates ;-) > >> (defcustom transient-other-window nil) >> >> (defun other-window-backward () >> (interactive) >> (other-window -1)) >> >> (defun transient-other-window () >> (interactive) >> (let ((echo-keystrokes nil)) >> (other-window 1) >> (set-transient-map >> (let ((map (make-sparse-keymap))) >> (define-key map "o" #'other-window) >> (define-key map "O" #'other-window-backward) >> map) >> t))) >> >> (if transient-other-window >> (global-set-key (kbd "C-x o") #'transient-other-window) >> (global-set-key (kbd "C-x o") #'other-window)) > > It needs work, but I agree with the intention. +1