We are following different design principles. In my view, or, in eev's
view, Hyperbole uses an awful amount of markup syntax, and it keeps
the Elisp code too far from the user.
Yes, it is designed for people not familiar with Elisp and to be used in many contexts where Elisp is not apparent or exposed. Those who do know Elisp can gain even more power.
Let me give you two examples,
and ask you a question about a technical point in which I am stuck.
I am watching your video
"Bring Your Text to Life the Easy Way with GNU Hyperbole"
http://www.youtube.com/watch?v=nC1eTgZE1oA
and I am indexing it with the tricks described here:
http://angg.twu.net/eev-intros/find-audiovideo-intro.html#4.3
The video made me understand that Hyperbole's action key works on
{Implicit Buttons}, <(Explicit Buttons)>, and <(Global Buttons)> -
from 17:00 in the video onwards - and from 19:06 onwards you show that
the action key also works on pathnames enclosed in double quotes, in a
way that supports lots of abbreviations. That's REALLY nice - but let
me point to you that eev's hyperlinks can to point to arbitrary
positions in files, manpages, PDFs, etc, and I don't know if the "#"
syntax in Hyperbole's hyperlinks can do that... see:
http://angg.twu.net/eev-intros/find-refining-intro.html
http://angg.twu.net/eev-intros/find-pdf-like-intro.html#4
I'll have to have a look at that.
Ok, time for my technical question. Apparently this Hyperbole button
{C-h h d a}
should have essentially the same action as:
(eek "C-h h d a")
but my `eek' sexp just inserts an "a". It's trivial to inspect the
innards of how the function eek works - we just have to search for its
source code, and it is just this:
(defun eek (str) (interactive "sKeys: ")
"Execute STR as a keyboard macro. See `edmacro-mode' for the exact format.\n
An example: (eek \"C-x 4 C-h\")"
(execute-kbd-macro (read-kbd-macro str)))
Your key sequence buttons work well on key sequences like {C-h h d a},
but I couldn't find a function that on receiving the string like "C-h
h d a" would execute it as a key sequence, like this would do,
(execute-kbd-macro (read-kbd-macro "C-h h d a")))
You want this:
(actypes::kbd-key "C-h h d a")
because to translate the 'defact' 'kbd-key' to an actual function, you prefix it with 'actypes::'.
Or you could simply use the generalized form of an implicit button which replaces the outer parens of an sexp with angle brackets:
<kbd-key "C-h h d a">
Hyperbole keeps it simple.
but without the bugs... I grepped for "key sequence" in the Hyperbole
source directory and created a link to the result of that grep,
(find-hyperbolegrep "grep --color -niH --null -e 'key sequence' *.el")
to be able to go back to that easily. I guess that the function that I
am looking for is in:
(find-hyperbolefile "hib-kbd.el")
You got half-way there.
but I couldn't find it... and typing C-h A didn't help me much. I have
the feeling that C-h A would be better if it would say which function
the action key would call - I mean, something more precise than saying
"hui:hbut-act".
Hmm. When I use {C-h A} on {C-h h d a} it shows me both the implicit button type:
categ: ibtypes::kbd-key
Maybe we should show the actypes:: prefix too so you can more easily know what function to run manually but in the Hyperbole world you invoke actypes with the hact macro, as in:
(hact 'kbd-key "C-h h d a")
Bob