* Moving image commands to one submap
@ 2022-09-23 15:38 Lars Ingebrigtsen
2022-09-23 15:56 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-23 15:38 UTC (permalink / raw)
To: emacs-devel
When the image keymap was introduced, it only had a couple of commands,
so triggering something by accident wasn't a major worry. But it's now
grown a large number of bindings, so people are hitting these commands
more by accident.
So I think we should move them all under one prefix, to make this less
likely, and also then make the applicable commands use repeat-map. For
instance, `+ + +' would become `<something> + + +' etc (to increase the
size of an image).
But what should <something> be? Something with "image" mnemonics and
simple to type, but `C-i' isn't an option (because of confusion with
`TAB').
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-23 15:38 Moving image commands to one submap Lars Ingebrigtsen
@ 2022-09-23 15:56 ` Stefan Monnier
2022-09-23 17:37 ` Augusto Stoffel
2022-09-24 18:36 ` Juri Linkov
2022-10-04 13:10 ` Lars Ingebrigtsen
2 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2022-09-23 15:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> But what should <something> be? Something with "image" mnemonics and
> simple to type, but `C-i' isn't an option (because of confusion with
> `TAB').
C-c C-i C-m C-a C-g C-e ?
Stefan "always happy to help"
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-23 15:56 ` Stefan Monnier
@ 2022-09-23 17:37 ` Augusto Stoffel
2022-09-24 9:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Augusto Stoffel @ 2022-09-23 17:37 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Lars Ingebrigtsen, emacs-devel
On Fri, 23 Sep 2022 at 11:56, Stefan Monnier wrote:
>> But what should <something> be? Something with "image" mnemonics and
>> simple to type, but `C-i' isn't an option (because of confusion with
>> `TAB').
>
> C-c C-i C-m C-a C-g C-e ?
>
>
> Stefan "always happy to help"
This seems to be a more general question than just image commands.
There should be a prefix available for all keymaps which are used as a
text property and want to be polite, I think.
How about “C-x .”, “C-c .” or something like that?
PS: I put the Python import commands under “C-c C-i”, which, among
potential issues, display as “C-c TAB” on the menus. So if someone
finds that bad, please complain in due time.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-23 17:37 ` Augusto Stoffel
@ 2022-09-24 9:29 ` Lars Ingebrigtsen
0 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-24 9:29 UTC (permalink / raw)
To: Augusto Stoffel; +Cc: Stefan Monnier, emacs-devel
Augusto Stoffel <arstoffel@gmail.com> writes:
>> C-c C-i C-m C-a C-g C-e ?
>>
>> Stefan "always happy to help"
Thanks, thanks.
> This seems to be a more general question than just image commands.
> There should be a prefix available for all keymaps which are used as a
> text property and want to be polite, I think.
>
> How about “C-x .”, “C-c .” or something like that?
It's a bit awkward to type `C-x . +' for instance...
> PS: I put the Python import commands under “C-c C-i”, which, among
> potential issues, display as “C-c TAB” on the menus. So if someone
> finds that bad, please complain in due time.
Our long term plan is to try to fix this issue (so that things show up
as intended for `C-i' and `C-m') -- there's several ideas, but nobody's
gone ahead and done it yet. So I think it's fine to use `C-c C-i' even
if it's currently a bit wonky.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-23 15:38 Moving image commands to one submap Lars Ingebrigtsen
2022-09-23 15:56 ` Stefan Monnier
@ 2022-09-24 18:36 ` Juri Linkov
2022-09-24 19:09 ` Lars Ingebrigtsen
2022-09-24 22:33 ` Stefan Monnier
2022-10-04 13:10 ` Lars Ingebrigtsen
2 siblings, 2 replies; 13+ messages in thread
From: Juri Linkov @ 2022-09-24 18:36 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> When the image keymap was introduced, it only had a couple of commands,
> so triggering something by accident wasn't a major worry. But it's now
> grown a large number of bindings, so people are hitting these commands
> more by accident.
>
> So I think we should move them all under one prefix, to make this less
> likely, and also then make the applicable commands use repeat-map. For
> instance, `+ + +' would become `<something> + + +' etc (to increase the
> size of an image).
>
> But what should <something> be? Something with "image" mnemonics and
> simple to type, but `C-i' isn't an option (because of confusion with
> `TAB').
I can't imagine a need to use self-inserting keys while point is on an image.
So why not just 'i' and then the image keymap with '+ - + - ...'
Or the same keymap directly without 'i'.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 18:36 ` Juri Linkov
@ 2022-09-24 19:09 ` Lars Ingebrigtsen
2022-09-24 19:54 ` Juri Linkov
2022-09-24 22:33 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-24 19:09 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
Juri Linkov <juri@linkov.net> writes:
> I can't imagine a need to use self-inserting keys while point is on an image.
> So why not just 'i' and then the image keymap with '+ - + - ...'
> Or the same keymap directly without 'i'.
I'm not quite sure I understand what you mean -- just use `i' as the
prefix key? That'd be possible.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 19:09 ` Lars Ingebrigtsen
@ 2022-09-24 19:54 ` Juri Linkov
2022-09-24 20:12 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2022-09-24 19:54 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
>> I can't imagine a need to use self-inserting keys while point is on an image.
>> So why not just 'i' and then the image keymap with '+ - + - ...'
>> Or the same keymap directly without 'i'.
>
> I'm not quite sure I understand what you mean -- just use `i' as the
> prefix key? That'd be possible.
Maybe I don't understand the problem. For example, Dired and many other
modes have keymaps with a lot of plain letters, but there is no problem
with hitting these letters by accident.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 19:54 ` Juri Linkov
@ 2022-09-24 20:12 ` Lars Ingebrigtsen
2022-09-25 7:23 ` Juri Linkov
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-24 20:12 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
Juri Linkov <juri@linkov.net> writes:
> Maybe I don't understand the problem. For example, Dired and many other
> modes have keymaps with a lot of plain letters, but there is no problem
> with hitting these letters by accident.
The problem is in buffers like Gnus article buffers, where keys like `r'
and `h' have bindings. And then if you've happened to scroll so that
point is over an image, the commands don't work like you'd expect.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 20:12 ` Lars Ingebrigtsen
@ 2022-09-25 7:23 ` Juri Linkov
2022-09-25 9:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2022-09-25 7:23 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
>> Maybe I don't understand the problem. For example, Dired and many other
>> modes have keymaps with a lot of plain letters, but there is no problem
>> with hitting these letters by accident.
>
> The problem is in buffers like Gnus article buffers, where keys like `r'
> and `h' have bindings. And then if you've happened to scroll so that
> point is over an image, the commands don't work like you'd expect.
`i' is unbound in Gnus article buffers, so it could be used
for the image keymap. But still this problem remains for other modes
where it clashes with e.g. Info-index, dired-maybe-insert-subdir...
Ideally, the image commands deserve to have own prefix key 'C-x i'.
Currently it's bound to 'insert-file' that is a file-related command.
But file commands also could have own prefix key 'C-x f'.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-25 7:23 ` Juri Linkov
@ 2022-09-25 9:58 ` Lars Ingebrigtsen
0 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-25 9:58 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
Juri Linkov <juri@linkov.net> writes:
> Ideally, the image commands deserve to have own prefix key 'C-x i'.
> Currently it's bound to 'insert-file' that is a file-related command.
> But file commands also could have own prefix key 'C-x f'.
It's fine to steal some key bindings over certain elements (buttons and
the like) as long as there's not too many of the key bindings -- then it
becomes gradually more and more annoying, as people hit the commands by
accident more and more.
So stealing `C-x i' on images is fine, but something shorter would be
nicer. Uhm... `#'? Looks like a frame for a painting if you squint,
like, a lot.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 18:36 ` Juri Linkov
2022-09-24 19:09 ` Lars Ingebrigtsen
@ 2022-09-24 22:33 ` Stefan Monnier
2022-09-25 9:52 ` Lars Ingebrigtsen
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2022-09-24 22:33 UTC (permalink / raw)
To: Juri Linkov; +Cc: Lars Ingebrigtsen, emacs-devel
> I can't imagine a need to use self-inserting keys while point is on an image.
When point is right between the "text before the image" and the image
itself, is it "on" the image? If the answer is "no", then I agree with
you, but if it's "yes", then I disagree before it's very legitimate to
want to insert text right before an image.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-24 22:33 ` Stefan Monnier
@ 2022-09-25 9:52 ` Lars Ingebrigtsen
0 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-25 9:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juri Linkov, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I can't imagine a need to use self-inserting keys while point is on an image.
>
> When point is right between the "text before the image" and the image
> itself, is it "on" the image? If the answer is "no", then I agree with
> you, but if it's "yes", then I disagree before it's very legitimate to
> want to insert text right before an image.
To insert a character before an image, you need to have point on the
image, yes.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Moving image commands to one submap
2022-09-23 15:38 Moving image commands to one submap Lars Ingebrigtsen
2022-09-23 15:56 ` Stefan Monnier
2022-09-24 18:36 ` Juri Linkov
@ 2022-10-04 13:10 ` Lars Ingebrigtsen
2 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-04 13:10 UTC (permalink / raw)
To: emacs-devel
Lars Ingebrigtsen <larsi@gnus.org> writes:
> So I think we should move them all under one prefix, to make this less
> likely, and also then make the applicable commands use repeat-map. For
> instance, `+ + +' would become `<something> + + +' etc (to increase the
> size of an image).
>
> But what should <something> be? Something with "image" mnemonics and
> simple to type, but `C-i' isn't an option (because of confusion with
> `TAB').
I went for `i'. I tried `M-i' a bit first, but it was a bit hard to
type `M-i + +'.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-10-04 13:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 15:38 Moving image commands to one submap Lars Ingebrigtsen
2022-09-23 15:56 ` Stefan Monnier
2022-09-23 17:37 ` Augusto Stoffel
2022-09-24 9:29 ` Lars Ingebrigtsen
2022-09-24 18:36 ` Juri Linkov
2022-09-24 19:09 ` Lars Ingebrigtsen
2022-09-24 19:54 ` Juri Linkov
2022-09-24 20:12 ` Lars Ingebrigtsen
2022-09-25 7:23 ` Juri Linkov
2022-09-25 9:58 ` Lars Ingebrigtsen
2022-09-24 22:33 ` Stefan Monnier
2022-09-25 9:52 ` Lars Ingebrigtsen
2022-10-04 13:10 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.