From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Can I use 'C-x o o o o o' instead of C-x o C-x o C-x o C-x o C-x o? Date: Tue, 28 Apr 2015 15:47:57 +0200 Message-ID: <87r3r4s6sy.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1430228928 10950 80.91.229.3 (28 Apr 2015 13:48:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 13:48:48 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: =?utf-8?B?5by15ZyL6Imv?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 28 15:48:40 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 1Yn5sG-0003CN-4n for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 15:48:32 +0200 Original-Received: from localhost ([::1]:33455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn5sF-0007ec-EX for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 09:48:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn5rt-0007RJ-5B for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 09:48:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn5rj-0005zr-Vr for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 09:48:09 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn5rj-0005zb-P6 for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 09:47:59 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0313920AC6 for ; Tue, 28 Apr 2015 09:47:59 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 28 Apr 2015 09:47:59 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=CDoQtuk4/yX1kTX ac7hrgnjsPpE=; b=iOB8GQ6HGmrRtAkKD/6sSg4/wxH3kfqG2bMZX1jPWrc86aP B9z+G0c2MP3LH07zUCVd2qkV7Ac+jdooDPjvGegY0SqI+hGPBlJ0+tcAXqBY1IcJ k0OnbTKXQQ7a+n9Bqxg+Po3THFz/bgdPccUncQ1PnvIHNK253QTcDS5jU4ZU= X-Sasl-enc: oiIA2fQJMtH+jnIvFCMXIE7zk+R7lRMoYPQeJknd0WxY 1430228878 Original-Received: from thinkpad-t440p (unknown [141.26.71.91]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F55DC00019; Tue, 28 Apr 2015 09:47:58 -0400 (EDT) Mail-Followup-To: =?utf-8?B?5by15ZyL6Imv?= , "help-gnu-emacs\@gnu.org" In-Reply-To: (=?utf-8?B?IuW8teWci+iJryIncw==?= message of "Tue, 28 Apr 2015 10:56:20 +0000") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.25 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:104025 Archived-At: =E5=BC=B5=E5=9C=8B=E8=89=AF writes: Hi! I don't think there is (nor can there be) a generic way to do that. > Scenario 1 > - I split many windows. > - I wish to switch to some other windows. > - I type C-x o, C-x o, C-x o repeatedly until the cursor landed on the > desired window. > Is there a way to use C-x o o o instead? What if you want to switch to the other window and insert some "o"s there? With your suggested approach, you cannot do that. > I aware that I can use C-u num C-x o, if I know the desired window is num > step away. But there are times that I do not know 'num'. > > Scenario 2 > - I use the windmove package. > - I bind the windmove-up/down/left/right to C-o i, C-o k, C-o j, C-o l > respectively. Now, if I want to windmove to up-left, I type C-o i, C-o j. > Is there a way to use C-o i j instead? If you wanted to, you could define some `windmove-minor-mode' with a keymap binding i, k, j, and l to the respective windmove commands, and a binding for return and/or escape which deactivates this mode. Then you could bind C-o to `windmove-minor-mode'. Using that, you could do C-o i j j l RET where the RET would signal that you've finished moving around. Alternatively, you could remap `self-insert-command' to deactivating that mode. In this case, any key you press except for i/j/k/l would exit this "movement mode". HTH, Tassilo