[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Pop up reference card

From: Sebastian Rose
Subject: Re: [Orgmode] Pop up reference card
Date: Thu, 31 Jul 2008 18:47:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi Alan,

you could use the splash screen feature of emacs for this. I do this, to
display my own keyboard shortcuts (and those I tend to forget).

A screenshot of an older version is here:


I've bound C-M-k to show the keys and their descriptions. Any click or
keypress will hide them again.

To just add the table as plain text, you could do this:

(defun sr-display-keys()
  "Meine Tastenkürzel nach dem Start anzeigen"
  (get-buffer-create "sr-info")
  (switch-to-buffer "sr-info" t)
  (with-current-buffer (get-buffer "sr-info")
    ;(setq left-margin-width 20)         ; Ränder sind immer Buffer-lokal
    (set-window-buffer (selected-window) "sr-info")
    (let ((map (make-sparse-keymap)))
      (use-local-map map)
      ; (define-key map [t]) würde auf jedes Mausevent reagieren.
      (define-key map [mouse-1] 'sr-kill-startup-buffer) ; auf Klick reagieren.
      (define-key map [mouse-3] 'sr-kill-startup-buffer) ; auf Klick reagieren.
      (define-key map [mouse-2] 'sr-kill-startup-buffer) ; auf Klick reagieren.
      (define-key map [(control meta ?k)] 'sr-kill-startup-buffer)
      (setq cursor-type nil             ; No Cursor
            display-hourglass nil
            buffer-undo-list t)         ; No Undo.


      (insert "\n")
      (insert (propertize 
                          '( :weight bold :background "RosyBrown1" :foreground 
      (insert "\n\n   Press Key Or Click To Get Rid Of This Buffer\n\n\n")
      (insert "                        ")
      (goto-char (point-min))
      (set-buffer-modified-p nil)
      (make-local-hook 'after-change-functions)
      (add-to-list 'after-change-functions 'sr-kill-startup-buffer)

"Alan E. Davis" <address@hidden> writes:
> Training wheels.  That's what I need.  One reason I like emacs so much.
> Emacs-the self documenting text editor.
> With abundant thanks to Kyle Sherman and his recently updated text org
> card.  I was able to convert this to org-mode, and now have a command to pop
> it up:
> (defun org-help ()
>   (interactive)
>   (find-file "~/org/help.org"))
> (define-key global-map "\C-c7" 'org-help)
> Against my better judgement, I attach this file.  The reason I do not feel
> comfortable is that I have edited some strokes out of it.  And it's not my
> work, generally.
> Now I have a question or suggestion.  How difficult would it be to have this
> kind of pop-up help available and generated by org itself.
> Some background: Some years ago, I made up a popup feature that would pop up
> all my bindings for a certain prefix keymap.  For example, I had a \C-x6 as
> a prefix, and this little card would display keybindings for all the
> functions I bound to these keys.  I also do the same for several other
> prefixes.  I bound this to be displayed when I typed \C-x6 [F1].   However,
> due to a fortuitous event, I stopped writing these up.  I discovered that
> for some reason, and for some prefix maps, inexplicably,  emacs itself has a
> feature that does this automatically!!!!!!!!!!!!
> The result for /C-c is far too limited to be useful for me for org mode, but
> it does work.  The converted text reference card is a pretty good place to
> start.  Perhaps org can be programmed to produce one of these.
> Thank you Kyle, and everyone else who has contribued to this package.
> Alan

Sebastian Rose, Hannover, Germany
Phone: +49 173 83 93 417
Mail.: address@hidden, address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]