From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix or modifiers Date: Tue, 25 May 2021 15:31:43 +0200 Message-ID: References: <87imgpw7k3.fsf@warpmail.net> <87mu36enhl.fsf@posteo.net> <8735uru1py.fsf@gnus.org> <871r9yjyv5.fsf@posteo.net> <87h7irqtvf.fsf@gnus.org> <87im37p2b4.fsf@icterid> <87v977ghtr.fsf@icterid> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="808"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) Cc: 41438@debbugs.gnu.org, Lars Ingebrigtsen , Juri Linkov To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 15:33:31 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1llXBa-000AZd-NY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 15:33:30 +0200 Original-Received: from localhost ([::1]:42786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llXBZ-0000LV-OY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 09:33:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llXAA-0006sO-3X for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 09:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llXA9-0005nC-RM for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 09:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llXA9-0006Z8-NI for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 09:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 13:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41438 X-GNU-PR-Package: emacs Original-Received: via spool by 41438-submit@debbugs.gnu.org id=B41438.162194951725226 (code B ref 41438); Tue, 25 May 2021 13:32:01 +0000 Original-Received: (at 41438) by debbugs.gnu.org; 25 May 2021 13:31:57 +0000 Original-Received: from localhost ([127.0.0.1]:45028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llXA4-0006Yn-TY for submit@debbugs.gnu.org; Tue, 25 May 2021 09:31:57 -0400 Original-Received: from mail-vi1eur05olkn2094.outbound.protection.outlook.com ([40.92.90.94]:9441 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llX9z-0006YV-MI for 41438@debbugs.gnu.org; Tue, 25 May 2021 09:31:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PLgjq/UMlUVNuGCcdiSli32Od5UgcQp2fhtw/2prGm3ROfFZyzi3HBUkrulTzUV2ZHrtPoGTVsE67oOfcGQPIPfVx6ToJhqQcBMzEm575O1xjXBRZu9hYnUChYkkJF7hHgRpvECVFQpFDrwFbaTWzojWwnncds0+iVP6SMondFT1tB+D1GR8kSBZzYI5xyCcYpZqu1Hag+1/JbOOL+QSz8hQpsX4OU1e0/PXmR9LEQzNlJvD6J0hQe+8BuycOKYcIUL/4EKrJN4/bG2ytQmnA7mJMzeycufpCAVCILQ/P1jjlqjj8V4CH/vdn875RifHLCsK1osjpOGN9e7Or/9+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ICWV4hX+wlacKyvhXJgu8ptQa99OZ7Q8IZKYPvErtG4=; b=C6KM9DBJZryiw84Zpp0FUvgy6kjx6S45xrhlRwYl3PpY/yfNoZmMcV+lTgmexhvtR1JYK17D4MYjnurUo/AO4n3m4meqjsvOplj8/YaaLQYGsPIwRcqitiDRfz5KErgs7sccKoCWmMGc7InaU8az0hAchfApaARitMwqvQE+ONrGocKsv2cCigYcxeWGVzAfZFsnj35lORbBsFUgcOsutCFVV5ttt6ogn5y7BmHcupeEXk3KfcIFS5WFQg4ShKpITyWrjNeprppk4JLYmMdLeuA1doGxea9g/ig1rbzgkHC4yR+3Td6lg7Zh7vaAM9zuHeMBxGYDEWfxWjZ8x9exEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ICWV4hX+wlacKyvhXJgu8ptQa99OZ7Q8IZKYPvErtG4=; b=JH9lLmFP/kfss2wXgqOC/dtfw2IZE1b4Qh5impX89wNpe1ZI0rCZTczOFZxrHhax9E41r09heIpdbxzzwq5PUnW/1VyEbqERSmv7jCD4BVGZuvAv4fQI2gjO0/hdgRHlmZ1gR+4OjH/FXDtSHITjnDwSR3vDQ/vAwxYgiG24ea3IzD2nw+7uOqnfpPlAhnMdKOAprBYbiCuOeZ0YB3Le4PlErtDTAuXgmxW9Zv5UpJ/sPsYrnOi9aWr5sOK6jWShUMYAdF+Q0KY/7278WaGMRGOnDOruh/zGl0csjKJmLQXU3VbqXtRClMXbi8ZPv1XHne2raxN9UqeAX/fe24DojA== Original-Received: from AM6EUR05FT057.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::49) by AM6EUR05HT208.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Tue, 25 May 2021 13:31:44 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc11::41) by AM6EUR05FT057.mail.protection.outlook.com (2a01:111:e400:fc11::78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 25 May 2021 13:31:44 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0F6BFF8DF6123C048F2AEAA8F5D1013B65B39DAE225C38FA3359AFDB9EE80290; UpperCasedChecksum:9F70C3F10DED9F288D7D775E88282189D954978598575E9EDF66B3902CF14A0B; SizeAsReceived:7756; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::d1c1:2a0d:3b2b:4591]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::d1c1:2a0d:3b2b:4591%7]) with mapi id 15.20.4173.020; Tue, 25 May 2021 13:31:44 +0000 In-Reply-To: <87v977ghtr.fsf@icterid> (Philip Kaludercic's message of "Tue, 25 May 2021 11:42:56 +0000") X-TMN: [5BOSIlKlPNnGFQ7UXfpu7Aa5Q91AnpRk] X-ClientProxiedBy: AS8PR04CA0138.eurprd04.prod.outlook.com (2603:10a6:20b:127::23) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82lf83ndmo.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from HP-Laptop.homepc (81.232.177.30) by AS8PR04CA0138.eurprd04.prod.outlook.com (2603:10a6:20b:127::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.24 via Frontend Transport; Tue, 25 May 2021 13:31:43 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: c2e78fc3-28bd-459c-a835-08d91f81700d X-MS-TrafficTypeDiagnostic: AM6EUR05HT208: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XIzSMZwXBUTqI0AXZC3faQhyT0Vcs6K34HA84ZzBzW9o1dxEFu+TIoNT22CzBPgxtvMKyoiEnpRbqhNfugpAb3CEgZbm+x9TSiFN6AKLAJoGwsltpo0rhrRd1InbGfw+tlNfsIMqVealeGfvdPHQ24//PwXRnx+moxFI/a1XEaaUcfdiMrynfw/SrWWMZH+3PWzp4uvCSoxSvRa2f5VAr27rO04HuNmnAohdSgBwx6A/dQckSVrgu0PCwsPEvEuH3FWn62ajvzFP2l94M4XcLJHkhYxiVJUiaLXaN7uhTOiAdqS8LoY1UsG6Ch302LbzQ5f5XQEl+EgQ57JhgVCqUQ2lJkR4Ma/ZDHreNqbzWtHHRbZnF8b8iJ+g8k37gWnG X-MS-Exchange-AntiSpam-MessageData: 8VyF22cyVQ/ayvOo8NBbLpBk7iAIEUfS9lkyWoSj/ydyDzkwc55Np1c9xX5YsGO1Qu8AECfha5kLzGam0wYvOndVEFZiR+AGUnf5NEnd5LYbKZ9GvLrnPM2caduahXLVmyfoASBMOFhu5v6qj7JS8A== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2e78fc3-28bd-459c-a835-08d91f81700d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2021 13:31:44.4913 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT057.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT208 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207214 Archived-At: Philip Kaludercic writes: > Arthur Miller writes: > >> Philip Kaludercic writes: >>> +(defvar windmove-default-map (make-sparse-keymap) >>> + "Map used by `windmove-install-defaults'.") >> >> Sorry if I ask, but wouldn't ordinary windmove-mode-map do here? > > You are probably right -- my thought was that the minor mode exists for > the sake of the map. Yeah, exactly in this case. I am not sure if I understand correctly, you mean people will set new map for the mode to change bindings? I just remarked on the name you choose for the mode map, most peeps like me probably expect it to be names after the convention 'modename-mode-map'. >> Since it is a convention to have mode maps called modename-mode-maps, >> if people would like to change, or add a binding in the windmove mode >> they would probably automatically try to alter windmove-mode-map instead >> of windmove-default-map. > > That's the question: should windmove-default-map be accessed by default > or only via the -default-keybindings functions? Either way something I think you are thinking about default keybindings reather than default map. If I assume correctly. If I understand corectly you would like to preserve some default bindings, the map is just a mean to accomplish it. > should be changed, if windmove-default-map it should be renamed to > windmove--default-map to explicitly mark it as an internal > map. Otherwise it shsould be renamed to windmove-mode-map as you suggest. Either use default map stored some "default var", and add a function that restores mode map, or just add a function that resets keybindings into mode map directly, which might be sufficient. I don't know matter of taste? A default mode map in a variable is cleaner but more costly? Emacs provides windows, so I think there should also be a default way of moving cursor between them, manipulate them and so on. Thus I think windmove operations should be on by default, I don't think C-x 1/2/3/o are satisfying when we have more then 2 widows. A minor mode is probably a good balance between altering Emacs defaults, so not break someones config, and to give people an option to easily turn on some useful feature/configuration.