From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alan E. Davis" Subject: A crummy little popup for org keybindings help Date: Sun, 1 Mar 2009 08:46:11 +1000 Message-ID: <7bef1f890902281446k7a292a2bvb77c1522e7fa382@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001636e90d461c8c190464025aa9 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdXwl-0002kn-CZ for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 17:46:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdXwj-0002jV-Pe for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 17:46:14 -0500 Received: from [199.232.76.173] (port=48191 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdXwj-0002jO-MM for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 17:46:13 -0500 Received: from wf-out-1314.google.com ([209.85.200.175]:57294) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LdXwi-0007Hg-Vw for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 17:46:13 -0500 Received: by wf-out-1314.google.com with SMTP id 28so1840560wfc.24 for ; Sat, 28 Feb 2009 14:46:12 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Mailinglist --001636e90d461c8c190464025aa9 Content-Type: multipart/alternative; boundary=001636e90d461c8c120464025aa7 --001636e90d461c8c120464025aa7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Some time ago, the idea of an instant reference card was bantered about on the list. I presented a file called org-help.org. I have worked on it from time to time, and it's changed quite a bit. My most recent idea is to have it available on a keystroke, completely folded, and each line would instantly display some of the most commonly used keys for that topic, then by opening that headline, a tree would be revealed with more detailed keybindings. I've played with it, and it's helpful, and I'll make it available RSN, hoping others will find ways to make it more useful. My final touch would be to incorporate a link for each topic to the relevant topics in the org-mode info manual. What's missing is the convenience of info mode, of being able to stuff it away with "q" and call it up again at the same point. That would be more convenient. I'm unable to go forth on that part of the quest, because I haven't gotten my head around texinfo (yet?). Meanwhile, I remembered a little help popup I made to remember all my keybindings, long years ago. Here's a quick popup to get a transient display of some keybindings above the current line. I didn't understand how to wire it into org-mode-map's keybindings, so I bound it, for now, to \C-cp. The beauty of this gem is to be able to type the keys right away, and they work. Please feel free to improve it. Maybe another two or three of these would provide a person with his own frequently used keys. ;;;;;; org-popup-help ;;---------------- ;; Org Popup Help ;;---------------------- (defun org-popup-help () "Inserts a reminder of my org keybindings momentarily above the current line, until the next keystroke." (interactive) (save-excursion (momentary-string-display org-keys (save-excursion (beginning-of-line) (point)) nil "Type SPC or any command to erase help."))) ;; (defvar org-keys (concat " | \n" " | \n" ;;; " | Visibility Cycling TAB C-i \n" " | Motion C-c C-n/p / C-c C-f/b / C-c C-u / C-c C-j \n" " | Structure Editing M-RET / M-L/R / M-S-L/R \n" " | Sorting C-c ^ \n" " | Converting to headlines/removing stars C-c * \n" " | Checkboxes M-S-RET\n" " | Archiving [manual] C-c C-x a \n" " | Filtering and Sparse Trees C-c / \n" " | Links C-c l / C-c C-l \n" " | TODO Items M-S-RET C-c C-t \n" " | Tags C-c C-q / C-c C-c / C-c \\n" " | Properties and Column View C-c C-x p \n" " | Timestamps C-c . / C-c ! \n" " | *Schedule and Deadline* C-c C-s / C-c C-d\n" " | Clocking time C-c C-x C-i / C-c C-x C-o \n" " | Relative time clock C-c C-x . / C-c C-x - \n" " | Exporting and Publishing C-c C-e \n" " | Attachments Dispatcher Commands: C-c C-a \n" ) "*String displayed above current line by \\org-popup-help].") ;(define-key org-mode-map "p" 'org-popup-help) (global-set-key "\C-cp" 'org-popup-help) ;;;;;;;;;;;;;END org-popup-help. I'll provide it as a file as well, in case the tabs/spaces get blown away in the mail. Alan -- Alan Davis It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. ---- Bertrand Russell They are ill discoverers that think there is no land, when they can see nothing but sea. ---- Sir Francis Bacon --001636e90d461c8c120464025aa7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Some time ago, the idea of an instant reference card was bantered about on = the list.=A0 I presented a file called org-= help.org.=A0 I have worked on it from time to time, and it's change= d quite a bit.=A0 My most recent idea is to have it available on a keystrok= e, completely folded, and each line would instantly display some of the mos= t commonly used keys for that topic, then by opening that headline, a tree = would be revealed with more detailed keybindings.=A0 I've played with i= t, and it's helpful, and I'll make it available RSN, hoping others = will find ways to make it more useful.=A0 My final touch would be to incorp= orate a link for each topic to the relevant topics in the org-mode info man= ual.=A0 What's missing is the convenience of info mode, of being able t= o stuff it away with "q" and call it up again at the same point.= =A0 That would be more convenient.=A0 I'm unable to go forth on that pa= rt of the quest, because I haven't gotten my head around texinfo (yet?)= .=A0

Meanwhile, I remembered a little help popup I made to remember all my k= eybindings, long years ago.=A0 Here's a quick popup to get a transient = display of some keybindings above the current line.=A0 I didn't underst= and how to wire it into org-mode-map's keybindings, so I bound it, for = now, to \C-cp.=A0 The beauty of this gem is to be able to type the keys rig= ht away, and they work.

Please feel free to improve it.=A0 Maybe another two or three of these = would provide a person with his own frequently used keys.
=
;;;;;; org-popup-help
;;----------------
;; Org Popup Help
;;-= ---------------------
(defun org-popup-help ()
=A0 "Inserts a reminder of my org keybindi= ngs momentarily
above the current line, until the next keystroke."=
=A0 (interactive)
=A0 (save-excursion
=A0=A0=A0 (momentary-string= -display
=A0=A0=A0=A0 org-keys (save-excursion (beginning-of-line) (point))
=A0= =A0=A0=A0 nil "Type SPC or any command to erase help.")))=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;;

(defvar= org-keys
=A0 (concat "=A0=A0 |=A0=A0=A0=A0=A0=A0=A0=A0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0 =A0 "=A0 | Ar= chiving [manual]=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-x a \n&quo= t;
=A0=A0=A0 =A0 "=A0 | Filtering and Sparse Trees=A0=A0=A0=A0=A0= =A0 C-c / \n"
=A0=A0=A0 =A0 "=A0 | Links=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c l=A0=A0=A0= /=A0=A0=A0 C-c C-l \n"
=A0=A0=A0 =A0 "=A0 | TODO Items=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 M-S-RET=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-t \n"= ;
=A0=A0=A0 =A0 "=A0 | Tags=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-q=A0 /=A0 C-c C-c=A0 /= =A0 C-c \\n"
=A0=A0=A0 =A0 "=A0 | Properties and Column View= =A0=A0=A0=A0=A0=A0 C-c C-x p \n"
=A0=A0=A0 =A0 "=A0 | Timestamps=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c .=A0 /=A0=A0 C-c ! \n"
=A0=A0=A0 = =A0 "=A0 | *Schedule and Deadline*=A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-s= =A0 /=A0 C-c C-d\n"
=A0=A0=A0 =A0 "=A0 | Clocking time=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-x C-i=A0 /=A0 C-c= C-x C-o \n"
=A0=A0=A0 =A0 "=A0 | Relative time clock=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 C-c C-x .=A0 /=A0 C-c C-x - \n"
=A0=A0=A0 =A0 "=A0 |= Exporting and Publishing=A0=A0=A0=A0=A0=A0=A0=A0 C-c C-e \n"
=A0= =A0=A0 =A0 "=A0 | Attachments Dispatcher Commands:=A0 C-c C-a \n"=
)
=A0 "*String displayed above current line by \\org-popup-help].&q= uot;)

;(define-key org-mode-map "p" 'org-popup-help)(global-set-key "\C-cp" 'org-popup-help)
;;;;;;;;;;;;;EN= D org-popup-help.

I'll provide it as a file as well, in case the tabs/spaces get blow= n away in the mail.

Alan
--
Alan Davis

It is undesira= ble to believe a proposition when
there is no ground whatsoever for sup= posing it is true.
=A0 =A0 ---- Bertrand Russell
They are ill discoverers that think ther= e is no land, when they can see nothing but sea.
=A0 =A0 ---- =A0 Sir F= rancis Bacon

--001636e90d461c8c120464025aa7-- --001636e90d461c8c190464025aa9 Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="PopupForOrg.el" Content-Disposition: attachment; filename="PopupForOrg.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_frqvt5lv0 KGRlZnVuIG9yZy1wb3B1cC1oZWxwICgpCiAgIkluc2VydHMgYSByZW1pbmRlciBvZiBteSBvcmcg a2V5YmluZGluZ3MgbW9tZW50YXJpbHkgCmFib3ZlIHRoZSBjdXJyZW50IGxpbmUsIHVudGlsIHRo ZSBuZXh0IGtleXN0cm9rZS4iCiAgKGludGVyYWN0aXZlKQogIChzYXZlLWV4Y3Vyc2lvbgogICAg KG1vbWVudGFyeS1zdHJpbmctZGlzcGxheQogICAgIG9yZy1rZXlzIChzYXZlLWV4Y3Vyc2lvbiAo YmVnaW5uaW5nLW9mLWxpbmUpIChwb2ludCkpCiAgICAgbmlsICJUeXBlIFNQQyBvciBhbnkgY29t bWFuZCB0byBlcmFzZSBoZWxwLiIpKSkgICAgICAgICAgICAgICAgICAgICAgOzsKCihkZWZ2YXIg b3JnLWtleXMKICAoY29uY2F0ICIgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuIgogICAgICAgICAgIiAgIHwgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4iCjs7 OwoJICAiICB8IFZpc2liaWxpdHkgQ3ljbGluZyAgICAgICAgICAgICAgIFRBQiAgICBDLWkgXG4i CgkgICIgIHwgTW90aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgQy1jIEMtbi9wIC8gQy1j IEMtZi9iIC8gQy1jIEMtdSAvIEMtYyBDLWogXG4iCgkgICIgIHwgU3RydWN0dXJlIEVkaXRpbmcg ICAgICAgICAgICAgICAgTS1SRVQgIC8gICBNLUwvUiAgLyAgTS1TLUwvUiBcbiIKCSAgIiAgfCBT b3J0aW5nICAgICAgICAgICAgICAgICAgICAgICAgICBDLWMgXiBcbiIKCSAgIiAgfCBDb252ZXJ0 aW5nIHRvIGhlYWRsaW5lcy9yZW1vdmluZyBzdGFycyAgICAgQy1jICogXG4iCgkgICIgIHwgQ2hl Y2tib3hlcyAgICAgICAgICAgICAgICAgICAgICAgTS1TLVJFVFxuIgoJICAiICB8IEFyY2hpdmlu ZyBbbWFudWFsXSAgICAgICAgICAgICAgIEMtYyBDLXggYSBcbiIKCSAgIiAgfCBGaWx0ZXJpbmcg YW5kIFNwYXJzZSBUcmVlcyAgICAgICBDLWMgLyBcbiIKCSAgIiAgfCBMaW5rcyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBDLWMgbCAgICAvICAgIEMtYyBDLWwgXG4iCgkgICIgIHwgVE9ETyBJ dGVtcyAgICAgICAgICAgICAgICAgICAgICAgTS1TLVJFVCAgICAgICAgIEMtYyBDLXQgXG4iCgkg ICIgIHwgVGFncyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQy1jIEMtcSAgLyAgQy1jIEMt YyAgLyAgQy1jIFxcbiIKCSAgIiAgfCBQcm9wZXJ0aWVzIGFuZCBDb2x1bW4gVmlldyAgICAgICBD LWMgQy14IHAgXG4iCgkgICIgIHwgVGltZXN0YW1wcyAgICAgICAgICAgICAgICAgICAgICAgQy1j IC4gIC8gICBDLWMgISBcbiIKCSAgIiAgfCAqU2NoZWR1bGUgYW5kIERlYWRsaW5lKiAgICAgICAg ICBDLWMgQy1zICAvICBDLWMgQy1kXG4iCgkgICIgIHwgQ2xvY2tpbmcgdGltZSAgICAgICAgICAg ICAgICAgICAgQy1jIEMteCBDLWkgIC8gIEMtYyBDLXggQy1vIFxuIgoJICAiICB8IFJlbGF0aXZl IHRpbWUgY2xvY2sgICAgICAgICAgICAgIEMtYyBDLXggLiAgLyAgQy1jIEMteCAtIFxuIgoJICAi ICB8IEV4cG9ydGluZyBhbmQgUHVibGlzaGluZyAgICAgICAgIEMtYyBDLWUgXG4iCgkgICIgIHwg QXR0YWNobWVudHMgRGlzcGF0Y2hlciBDb21tYW5kczogIEMtYyBDLWEgXG4iCikKICAiKlN0cmlu ZyBkaXNwbGF5ZWQgYWJvdmUgY3VycmVudCBsaW5lIGJ5IFxcb3JnLXBvcHVwLWhlbHBdLiIpCgo7 KGRlZmluZS1rZXkgb3JnLW1vZGUtbWFwICJwIiAnb3JnLXBvcHVwLWhlbHApCihnbG9iYWwtc2V0 LWtleSAiXEMtY3AiICdvcmctcG9wdXAtaGVscCkK --001636e90d461c8c190464025aa9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --001636e90d461c8c190464025aa9--