unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 41438@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	Juri Linkov <juri@linkov.net>
Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix or modifiers
Date: Tue, 25 May 2021 15:31:43 +0200	[thread overview]
Message-ID: <AM9PR09MB4977EC9FF1898339BCD25CCE96259@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <87v977ghtr.fsf@icterid> (Philip Kaludercic's message of "Tue, 25 May 2021 11:42:56 +0000")

Philip Kaludercic <philipk@posteo.net> writes:

> Arthur Miller <arthur.miller@live.com> writes:
>
>> Philip Kaludercic <philipk@posteo.net> 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.






  reply	other threads:[~2021-05-25 13:31 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 16:56 bug#41438: [PATCH] Allow windmove keys to be bound without prefix or modifiers Philip K.
2020-05-21 22:18 ` Juri Linkov
2020-05-22 18:26   ` Philip K.
     [not found]   ` <(message>
     [not found]     ` <from>
     [not found]       ` <Juri>
     [not found]         ` <Linkov>
     [not found]           ` <on>
     [not found]             ` <Fri>
     [not found]               ` <22>
     [not found]                 ` <May>
     [not found]                   ` <2020>
     [not found]                     ` <04:01:05>
     [not found]                     ` <01:18:18>
     [not found]                       ` <+0300)>
     [not found]                         ` <87v9kn7rnk.fsf@bulbul>
2020-05-22 19:15                           ` Drew Adams
2020-05-23 22:12                           ` Juri Linkov
2020-06-26 19:46 ` Philip K.
2020-06-27 23:53   ` Juri Linkov
2020-06-28  8:30     ` Philip K.
2020-06-28 23:37       ` Juri Linkov
2020-08-05 18:05         ` Lars Ingebrigtsen
2020-08-05 23:40           ` Juri Linkov
2020-08-06  9:28             ` Philip K.
2020-08-06 23:43               ` Juri Linkov
2020-08-07 10:53                 ` Philip K.
2020-08-08 23:54                   ` Juri Linkov
2021-05-12 20:38                   ` Lars Ingebrigtsen
2021-05-12 21:27                     ` Philip Kaludercic
2021-05-22 20:29                     ` Philip Kaludercic
2021-05-22 21:09                       ` Philip Kaludercic
2021-05-23  6:49                         ` Eli Zaretskii
2021-05-23 12:36                           ` Philip Kaludercic
2021-05-25  5:12                       ` Lars Ingebrigtsen
2021-05-25  7:25                         ` Philip Kaludercic
2021-05-25  9:53                         ` Philip Kaludercic
2021-05-25 11:16                           ` Arthur Miller
2021-05-25 11:42                             ` Philip Kaludercic
2021-05-25 13:31                               ` Arthur Miller [this message]
2021-05-25 14:39                                 ` Philip Kaludercic
2021-05-25 11:36                           ` Arthur Miller
2021-05-25 11:46                             ` Philip Kaludercic
2021-05-25 13:58                               ` Arthur Miller
2021-05-25 19:13                             ` Lars Ingebrigtsen
2021-05-25 19:16                           ` Lars Ingebrigtsen
2021-05-25 19:25                             ` Philip Kaludercic
2021-05-25 20:18                           ` Juri Linkov
2021-05-25 21:45                             ` Philip Kaludercic
2021-05-26 21:35                               ` Juri Linkov
2021-05-27 11:09                                 ` Philip Kaludercic
2021-05-30 22:11                                   ` Juri Linkov
2021-05-31  8:50                                     ` Philip Kaludercic
2021-05-31 20:15                                       ` Juri Linkov
2021-05-31 21:27                                         ` Philip Kaludercic
2021-06-03 20:36                                           ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2020-07-30  4:01 bug#42611: 26.3; edit-abbrevs lets me type and commit, but doesn't store anywhere and abbrevs don't work Brett Randall
     [not found] ` <handler.42611.B.159608273314264.ack@debbugs.gnu.org>
     [not found]   ` <(Brett>
2020-10-17  8:41 ` Lars Ingebrigtsen
2020-10-27 10:36   ` brett.randall
     [not found]     ` <(brett>
     [not found]       ` <randall's>
     [not found]         ` <"Tue,>
     [not found]           ` <27>
     [not found]             ` <Oct>
2020-10-27 10:43     ` Lars Ingebrigtsen
2020-10-27 10:49       ` Brett Randall
2020-10-27 11:08         ` Lars Ingebrigtsen
     [not found]           ` <(Lars>
     [not found]             ` <Ingebrigtsen's>
     [not found]               ` <12:08:50>
2020-10-27 11:19           ` bug#42611: (no subject) Lars Ingebrigtsen
     [not found]             ` <877drbhq6c.fsf@gnus.org>
     [not found]               ` <handler.42611.C.160379757411378.notifdonectrl.0@debbugs.gnu.org>
2020-10-27 22:22                 ` bug#42611: 26.3; edit-abbrevs lets me type and commit, but doesn't store anywhere and abbrevs don't work Brett Randall
2019-04-21 19:30 bug#35367: 26.2; `dired-copy-how-to-fn' and HOW-TO arg of `dired-create-files' Drew Adams
2019-07-09 14:21 ` Lars Ingebrigtsen
2019-07-11  5:51   ` Mike Kupfer
2019-07-11 14:04     ` Lars Ingebrigtsen
2019-07-11 14:18     ` Drew Adams
2019-07-12  3:20       ` Mike Kupfer
2019-07-12  3:33         ` Drew Adams
2022-01-22 14:43     ` Lars Ingebrigtsen
     [not found] <Your>
     [not found] ` <message>
     [not found]   ` <of>
     [not found]     ` <"Tue>
     [not found]       ` <09>
     [not found]         ` <Jul>
     [not found]           ` <2019>
     [not found]             ` <16:21:24>
     [not found]             ` <07:18:26>
     [not found]     ` <"Thu>
     [not found]     ` <"Thu,>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9PR09MB4977EC9FF1898339BCD25CCE96259@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=41438@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).