A probably ridiculous thing to do, I know, but in hope of getting valuable help for you elisp expert guys out there (I’m all ears) I’m going ahead to show the unusual path I followed to simply bind the org-cicle invoked with an argument 64 (C-u C-u C-u)
(This is also a litle probe of how magnanimously flexible the emacs lisp environment can actually be to allow us to record processes we want automated for later reuse)
Anyway:
1) I started to record the macro “C-(“
2) made the call to org-cycle to reveal-all by previously pressing C-u three times “C-u C-u C-u M-x org-cycle“
3) stopped recording macro “C-)“
4) did “M-x kmacro-name-last-macro” (which provides the lambda form of the last created macro)
5) ran “M-x insert-kbd-macro“
6) assigned a key binding to it (global-set-key(kbd “C-+”) ‘my-org-reveal-all)
(fset 'my-org-reveal-all
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([21 21 21 134217816 111 114 103 45 99 121 99 108 101 return] 0 "%d")) arg)))
(global-set-key(kbd “C-+”) ‘my-org-reveal-all)
4 Comments
Three prefix args is equivalent to a prefix of 64, so you should just be able to bind “(lambda (nil) (interactive) (org-cycle 64))” to a key.
Oh, that’s dead simple! thanks a lot Ryan.
Gracias Ignacio… muy Ăștil.
Me alegro de que te sirva Alfredo.