emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Alan E. Davis" <lngndvs@gmail.com>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: A crummy little popup for org keybindings help
Date: Sun, 1 Mar 2009 08:46:11 +1000	[thread overview]
Message-ID: <7bef1f890902281446k7a292a2bvb77c1522e7fa382@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3673 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 4368 bytes --]

[-- Attachment #2: PopupForOrg.el --]
[-- Type: text/x-emacs-lisp, Size: 1797 bytes --]

(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)

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

             reply	other threads:[~2009-02-28 22:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 22:46 Alan E. Davis [this message]
2009-03-01  9:50 ` Alan E. Davis
2009-03-02  0:30 ` Daniel Clemente

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7bef1f890902281446k7a292a2bvb77c1522e7fa382@mail.gmail.com \
    --to=lngndvs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).