[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`find-elocus-links' (`M-h M-l')
From: |
Eduardo Ochs |
Subject: |
`find-elocus-links' (`M-h M-l') |
Date: |
Wed, 6 Mar 2024 02:37:19 -0300 |
Hi list,
I finally implemented a feature that has been in my todo-list for
CENTURIES - a way to discover in which keymap a certain key sequence
is defined!...
Here's an example of how to use it. In recent versions of Emacs `C-h
b' - i.e., `describe-bindings' - uses outline mode, and if you type
RET or TAB in some places this "cycles the visibility" of certain
blocks. For example, type `C-h b' and look for the line that looks
like this,
> `eev-mode' Minor Mode Bindings:
and put the point on the ">". Type RET several times there; that line
will switch between these two states,
> `eev-mode' Minor Mode Bindings:
v `eev-mode' Minor Mode Bindings:
and the block below it will switch between visible and hidden. In my
version of Emacs the ">" and the "v" will look super stylish, because
they are SVG thingies.
Anyway: RETs in some places of that buffer toggle the visibility of
certain blocks, and RETs in other places give the error
Buffer is read-only: #<buffer *Help*>
and a beep. Put the point on the ">" or "v", and type `M-h M-l RET'.
You will get a temporary buffer with these contents:
;; (find-elocus-links "RET" 'outline-inserted-button-map)
;; (find-efunction 'find-elocus-links)
;; (require 'helpful)
;; (find-evariable 'outline-inserted-button-map)
;; (find-evardescr 'outline-inserted-button-map)
;; (find-hkeymap-links 'outline-inserted-button-map)
;; (find-hkeymap-links 'outline-inserted-button-map 2 "RET" "outline-cycle")
;; (find-efunction-links 'outline-cycle)
;; (find-efunctiondescr 'outline-cycle)
;; (find-efunction 'outline-cycle)
Super neat!!!
Then of course I tried to use that on a part of Org that I remembered
as being very hacker-unfriendly... I opened an Org file and typed `C-c
C-e'; this opened a buffer named "*Org Export Dispatcher*", in which
almost every key gives the error "Invalid key" - my `M-h M-l' doesn't
work there, the obvious tricks to switch to another window also don't
work, and I don't have idea of what major mode is that, what keymap is
that, or what code generates that buffer...
Well, to be honest at one point I learned a bit about how to set a
breakpoint there, for some value of "there",
(find-es "org" "org-export-dispatch-2023-01")
http://anggtwu.net/e/org.e.html#org-export-dispatch-2023-01
but then I was already so frustrated and so burned out with Org that I
didn't do much with that information...
Cheers,
Edrx
P.S.: at this moment `M-h M-l' is only on the git repository - I still
need to clean up several things before updating the version on ELPA...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- `find-elocus-links' (`M-h M-l'),
Eduardo Ochs <=