* Describing local-map/keymap in overlays/text properties
@ 2013-07-04 19:04 Lars Magne Ingebrigtsen
2013-07-05 9:01 ` Andreas Schwab
0 siblings, 1 reply; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-07-04 19:04 UTC (permalink / raw)
To: emacs-devel
When I hit `C-h b' to see the current key bindings, this apparently
doesn't include bindings from text properties/overlays, but only the
bindings done by the mode. Is this the way it's supposed to be? Or a
bug? Is there a different command to see text property key bindings?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-04 19:04 Describing local-map/keymap in overlays/text properties Lars Magne Ingebrigtsen
@ 2013-07-05 9:01 ` Andreas Schwab
2013-07-06 15:23 ` Lars Ingebrigtsen
0 siblings, 1 reply; 18+ messages in thread
From: Andreas Schwab @ 2013-07-05 9:01 UTC (permalink / raw)
To: emacs-devel
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Is there a different command to see text property key bindings?
C-u C-x =
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-05 9:01 ` Andreas Schwab
@ 2013-07-06 15:23 ` Lars Ingebrigtsen
2013-07-06 15:46 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Lars Ingebrigtsen @ 2013-07-06 15:23 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel
Andreas Schwab <schwab@linux-m68k.org> writes:
>> Is there a different command to see text property key bindings?
>
> C-u C-x =
That's kinda obscure. Anybody mind if I alter `C-h m' and `C-h b' to
display text prop keymaps (first)?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 15:23 ` Lars Ingebrigtsen
@ 2013-07-06 15:46 ` Eli Zaretskii
2013-07-06 15:56 ` Lars Ingebrigtsen
2013-07-06 19:47 ` James Cloos
2013-07-06 20:18 ` Drew Adams
2 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2013-07-06 15:46 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: schwab, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sat, 06 Jul 2013 17:23:38 +0200
> Cc: emacs-devel@gnu.org
>
> Anybody mind if I alter `C-h m' and `C-h b' to display text prop
> keymaps (first)?
There could be gazillions of them in a buffer. Which ones will you
display, and won't that make the *Help* buffer, which is already too
large, even more so?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 15:46 ` Eli Zaretskii
@ 2013-07-06 15:56 ` Lars Ingebrigtsen
2013-07-06 16:02 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Lars Ingebrigtsen @ 2013-07-06 15:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: schwab, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> There could be gazillions of them in a buffer.
We'd only display the map under point.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 15:56 ` Lars Ingebrigtsen
@ 2013-07-06 16:02 ` Eli Zaretskii
2013-07-06 16:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2013-07-06 16:02 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: schwab, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: schwab@linux-m68k.org, emacs-devel@gnu.org
> Date: Sat, 06 Jul 2013 17:56:59 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > There could be gazillions of them in a buffer.
>
> We'd only display the map under point.
Then how is that different from "C-u C-x ="?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 16:02 ` Eli Zaretskii
@ 2013-07-06 16:13 ` Lars Ingebrigtsen
2013-07-06 16:25 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Lars Ingebrigtsen @ 2013-07-06 16:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: schwab, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Then how is that different from "C-u C-x ="?
It's different in that people hit `C-h b' to learn what keystrokes are
available to them. `C-u C-x =' is a relatively obscure command, and
having to use both commands for doing something as basic as this is
pretty nonsensical.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 16:13 ` Lars Ingebrigtsen
@ 2013-07-06 16:25 ` Eli Zaretskii
2013-07-06 16:31 ` Lars Ingebrigtsen
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2013-07-06 16:25 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: schwab, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: schwab@linux-m68k.org, emacs-devel@gnu.org
> Date: Sat, 06 Jul 2013 18:13:17 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Then how is that different from "C-u C-x ="?
>
> It's different in that people hit `C-h b' to learn what keystrokes are
> available to them. `C-u C-x =' is a relatively obscure command, and
> having to use both commands for doing something as basic as this is
> pretty nonsensical.
Pushing the normal output of "C-h b" further down the buffer doesn't
make sense, either. How about a new "C-h" command, or perhaps an
argument to "C-h b" that would trigger this new display?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 16:25 ` Eli Zaretskii
@ 2013-07-06 16:31 ` Lars Ingebrigtsen
2013-07-06 17:42 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Lars Ingebrigtsen @ 2013-07-06 16:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: schwab, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Pushing the normal output of "C-h b" further down the buffer doesn't
> make sense, either. How about a new "C-h" command, or perhaps an
> argument to "C-h b" that would trigger this new display?
If you're pushing `C-h b', you want to know what commands are available
for you. That's the point of the command. The commands that are
available in the local text properties are the ones that matter to you
most, because you moved the cursor there.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 16:31 ` Lars Ingebrigtsen
@ 2013-07-06 17:42 ` Eli Zaretskii
2013-07-08 14:14 ` Lars Magne Ingebrigtsen
2013-07-06 20:06 ` Stephen Leake
2013-07-06 20:18 ` Drew Adams
2 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2013-07-06 17:42 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: schwab, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: schwab@linux-m68k.org, emacs-devel@gnu.org
> Date: Sat, 06 Jul 2013 18:31:20 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Pushing the normal output of "C-h b" further down the buffer doesn't
> > make sense, either. How about a new "C-h" command, or perhaps an
> > argument to "C-h b" that would trigger this new display?
>
> If you're pushing `C-h b', you want to know what commands are available
> for you. That's the point of the command. The commands that are
> available in the local text properties are the ones that matter to you
> most, because you moved the cursor there.
Would "C-u C-h b" be good enough? I'm not sure it's right to show
this information by default.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 17:42 ` Eli Zaretskii
@ 2013-07-08 14:14 ` Lars Magne Ingebrigtsen
2013-07-08 14:40 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-07-08 14:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: schwab, emacs-devel
After all this discussion, it turns out that there's already code for
outputting this data in `describe-buffer-bindings':
start1 = get_local_map (BUF_PT (XBUFFER (buffer)),
XBUFFER (buffer), Qkeymap);
if (!NILP (start1))
{
describe_map_tree (start1, 1, shadow, prefix,
"\f\n`keymap' Property Bindings", nomenu,
0, 0, 0);
shadow = Fcons (start1, shadow);
}
I only found this out after implementing just this again, in exactly the
same manner. :-/
However! It doesn't work. get_local_map seems to return Qnil always
when fed Qkeymap. And I don't quite understand why. I must be
overlooking something pretty obvious again...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-08 14:14 ` Lars Magne Ingebrigtsen
@ 2013-07-08 14:40 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-07-08 14:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: schwab, emacs-devel
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> However! It doesn't work. get_local_map seems to return Qnil always
> when fed Qkeymap. And I don't quite understand why. I must be
> overlooking something pretty obvious again...
D'oh. Again. The reason this doesn't work for me is that I've only
tested it in the Gnus article buffer, which does mighty voodoo to
emulate commands from the summary buffer. And that gets in the way of
`C-h b' on text properties.
Never mind... nothing to see here...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 16:31 ` Lars Ingebrigtsen
2013-07-06 17:42 ` Eli Zaretskii
@ 2013-07-06 20:06 ` Stephen Leake
2013-07-06 20:18 ` Drew Adams
2 siblings, 0 replies; 18+ messages in thread
From: Stephen Leake @ 2013-07-06 20:06 UTC (permalink / raw)
To: emacs-devel
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Pushing the normal output of "C-h b" further down the buffer doesn't
>> make sense, either. How about a new "C-h" command, or perhaps an
>> argument to "C-h b" that would trigger this new display?
>
> If you're pushing `C-h b', you want to know what commands are available
> for you. That's the point of the command. The commands that are
> available in the local text properties are the ones that matter to you
> most, because you moved the cursor there.
+1
--
-- Stephe
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: Describing local-map/keymap in overlays/text properties
2013-07-06 16:31 ` Lars Ingebrigtsen
2013-07-06 17:42 ` Eli Zaretskii
2013-07-06 20:06 ` Stephen Leake
@ 2013-07-06 20:18 ` Drew Adams
2 siblings, 0 replies; 18+ messages in thread
From: Drew Adams @ 2013-07-06 20:18 UTC (permalink / raw)
To: Lars Ingebrigtsen, Eli Zaretskii; +Cc: schwab, emacs-devel
> > Pushing the normal output of "C-h b" further down the buffer doesn't
> > make sense, either. How about a new "C-h" command, or perhaps an
> > argument to "C-h b" that would trigger this new display?
>
> If you're pushing `C-h b', you want to know what commands are available
> for you. That's the point of the command. The commands that are
> available in the local text properties are the ones that matter to you
> most, because you moved the cursor there.
No, that's one use case of `C-h b', and yes, it ignores text-property
bindings.
If you make `C-h b' take into account `point' then it no longer shows
you binding information about the current context (buffer) in general.
If `a' is bound in the current buffer/mode to `self-insert-command',
but there is a text-property binding of `a' to `ignore', then `C-h b'
output will show only the latter. You lose the general info.
Or if you choose to show both, and the fact that the text-property
bindings shadow other bindings, then why privilege text-property
bindings this way? We don't do that in `C-h b' for other bindings
that override bindings.
`C-h b' does not currently tell you, for example, that `a' is bound
in the `global-map' to `self-insert-command' AND that it is bound in
the current local keymap to `foobar' AND that it is bound in the
currently active minor mode `toto' to `toto-go-fish'... AND give you
information about the various binding shadowings. It simply gives
you the current effective binding of `a'.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 15:23 ` Lars Ingebrigtsen
2013-07-06 15:46 ` Eli Zaretskii
@ 2013-07-06 19:47 ` James Cloos
2013-07-07 6:43 ` Andreas Schwab
2013-07-06 20:18 ` Drew Adams
2 siblings, 1 reply; 18+ messages in thread
From: James Cloos @ 2013-07-06 19:47 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Andreas Schwab, emacs-devel
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> Andreas Schwab <schwab@linux-m68k.org> writes:
>>> Is there a different command to see text property key bindings?
>>
>> C-u C-x =
LI> That's kinda obscure. Anybody mind if I alter `C-h m' and `C-h b' to
LI> display text prop keymaps (first)?
I wouldn't call C-u C-x = exotic, but when this came up for me the other
day, it never occurred to me that asking emacs about the character under
point would be a useful method to discover the bindings then in effect.
I tried C-h b. I might have tried C-h m, except that when C-h b didn't
contain the info I needed, I presumed C-h m also wouldn't.
So please do update C-h m and C-h b to display text prop keymaps first.
(I'd also move Key translations last.)
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-06 19:47 ` James Cloos
@ 2013-07-07 6:43 ` Andreas Schwab
2013-07-07 19:20 ` James Cloos
0 siblings, 1 reply; 18+ messages in thread
From: Andreas Schwab @ 2013-07-07 6:43 UTC (permalink / raw)
To: James Cloos; +Cc: Lars Ingebrigtsen, emacs-devel
James Cloos <cloos@jhcloos.com> writes:
> (I'd also move Key translations last.)
That would be wrong, since they have the highest priority.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Describing local-map/keymap in overlays/text properties
2013-07-07 6:43 ` Andreas Schwab
@ 2013-07-07 19:20 ` James Cloos
0 siblings, 0 replies; 18+ messages in thread
From: James Cloos @ 2013-07-07 19:20 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Lars Ingebrigtsen, emacs-devel
>>>>> "AS" == Andreas Schwab <schwab@linux-m68k.org> writes:
JC>> (I'd also move Key translations last.)
AS> That would be wrong, since they have the highest priority.
OK. One'll just need to remember to next-page past it, rather
than always relying on scroll-up....
(Even after more than a quarter-century of Emacs C-x [ and C-x ] are not
integrated in to my muscle memory.)
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: Describing local-map/keymap in overlays/text properties
2013-07-06 15:23 ` Lars Ingebrigtsen
2013-07-06 15:46 ` Eli Zaretskii
2013-07-06 19:47 ` James Cloos
@ 2013-07-06 20:18 ` Drew Adams
2 siblings, 0 replies; 18+ messages in thread
From: Drew Adams @ 2013-07-06 20:18 UTC (permalink / raw)
To: Lars Ingebrigtsen, Andreas Schwab; +Cc: emacs-devel
> >> Is there a different command to see text property key bindings?
> >
> > C-u C-x =
>
> That's kinda obscure. Anybody mind if I alter `C-h m' and `C-h b'
> to display text prop keymaps (first)?
Yes, I mind. (But please submit an enhancement request via
`report-emacs-bug', if you like.)
`C-h m' is already very long, even for a short major-mode doc string.
This does not belong there at all, IMO.
`C-h b' is another story, but it refers to the current context (e.g.
buffer) generally, not only to a specific position.
(I assume you are speaking generally, and not just about the doc
for some particular mode.)
Better than messing with `C-h m' or `C-h b' might be to provide a
new command that lists only the text-property bindings at point.
(But that could also be said for other parts of the `C-u C-x =' output:
it is a mix of different kinds of info. One could imagine several
separate commands for the different kinds of info.)
My general reaction to your proposal is YAGNI. `C-u C-x =' is fine.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-07-08 14:40 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-04 19:04 Describing local-map/keymap in overlays/text properties Lars Magne Ingebrigtsen
2013-07-05 9:01 ` Andreas Schwab
2013-07-06 15:23 ` Lars Ingebrigtsen
2013-07-06 15:46 ` Eli Zaretskii
2013-07-06 15:56 ` Lars Ingebrigtsen
2013-07-06 16:02 ` Eli Zaretskii
2013-07-06 16:13 ` Lars Ingebrigtsen
2013-07-06 16:25 ` Eli Zaretskii
2013-07-06 16:31 ` Lars Ingebrigtsen
2013-07-06 17:42 ` Eli Zaretskii
2013-07-08 14:14 ` Lars Magne Ingebrigtsen
2013-07-08 14:40 ` Lars Magne Ingebrigtsen
2013-07-06 20:06 ` Stephen Leake
2013-07-06 20:18 ` Drew Adams
2013-07-06 19:47 ` James Cloos
2013-07-07 6:43 ` Andreas Schwab
2013-07-07 19:20 ` James Cloos
2013-07-06 20:18 ` Drew Adams
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).