From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: RE: Just o after C-x o (other-window) Date: Fri, 21 Apr 2017 22:55:58 +0200 Message-ID: <871ssl5vkx.fsf@debian.tompa.tv> References: <87mvbaj1r4.fsf@debian.tompa.tv> <543fc5f1-8d63-4c75-b6c7-85d4ed25caac@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492807909 31546 195.159.176.226 (21 Apr 2017 20:51:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 20:51:49 +0000 (UTC) To: Drew Adams , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 21 22:51:41 2017 Return-path: Envelope-to: geh-help-gnu-emacs@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 1d1fWm-0007yd-9k for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 22:51:40 +0200 Original-Received: from localhost ([::1]:33167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1fWq-0008BQ-Hz for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 16:51:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1fWL-0008Ay-RI for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 16:51:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1fWH-0005V6-S3 for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 16:51:13 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:54910) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d1fWH-0005Up-L3 for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 16:51:09 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 9995120BA2 for ; Fri, 21 Apr 2017 22:51:05 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3w8nvX0glxzyqC; Fri, 21 Apr 2017 22:51:04 +0200 (CEST) In-Reply-To: <543fc5f1-8d63-4c75-b6c7-85d4ed25caac@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112848 Archived-At: Drew Adams writes: >> I would like the other-window function to behave like text-scale-adjust. >> I mean, after hitting `C-x o` to select next window, I want `o` to mean >> next-window again. Any other key would escape this minor mode. Did >> somebody here by any chance implement that already? >> >> The text-scale-adjust function behaves like that, after `C-x C-+` it is >> enough to hit `+` or `-` to further adjust the scaling, which I think is >> excellent. > > (defun other-window-repeat () > "Repeatable `other-window'." > (interactive) > (require 'repeat) > (repeat-command 'other-window)) > > (defun repeat-command (command) > "Repeat COMMAND." > (let ((repeat-message-function 'ignore)) > (setq last-repeatable-command command) > (repeat nil))) > > (global-set-key [remap other-window] 'other-window-repeat) > > Then just use `C-x o o o o o ...' Nice, exactly the answer I was hoping for. Thanks, this behaviour fits my brain somehow.