Subject: Re: bug#64868: 29.1; C-x O binding suggestion for (other-window -1)

From: Van Ly <[email-masked]>
Date: Wed, 2 Aug 2023 16:45:35 GMT

> Date: Wed, 02 Aug 2023 17:28:51 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > Date: Wed, 2 Aug 2023 13:07:42 GMT
> > From: Van Ly <[email-masked]>
> > Cc: [email-masked]
> > 
> > Is there a way to overlay ``b'' in the read-only modes such as
> > view-mode to function in the opposite direction to SPC.
> 
> I don't understand what you mean by "overlay".  The function in the
> opposite direction of SPC is View-scroll-page-backward, so if you want
> to bind it to some non-default key, you can (although it already has a
> convenient binding to S-SPC).
> 

As examples, in the occur-mode-hook and view-mode-hook I map "b" to
scroll-down-command and View-scroll-line-backward.  Can that be done
once by grouping occur-mode and view-mode as members in a read-only
mode for "b" to function that way to page in the opposite direction
SPC would scroll?

By overlay I mean how the meaning of keybindings are stacked.  At
bottom are the defaults.  A user interface lets an overlapping set to
stack above them, kind of how the visual themes work I imagine.

> > The ``self-insert'' default for keys in read-only modes feels like a
> > bug you step on, notice but don't squish by habit.
> 
> I don't understand what you are trying to say here.  What "self-insert
> default" are you alluding to?

Well, in view-mode there are many "self-insert-command" keys mapped
such as "b" or "i" or "j".  I expect the key bindings to
self-insert-command in read-only modes to be unused.