From: Sebastian Rose <sebastian_rose@gmx.de>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Pop up reference card
Date: Thu, 31 Jul 2008 18:47:26 +0200 [thread overview]
Message-ID: <87hca6t2zl.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <7bef1f890807310737w1c4ea306n17d5db71fbfefec8@mail.gmail.com> (Alan E. Davis's message of "Fri, 1 Aug 2008 00:37:42 +1000")
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:
http://www.emacswiki.org/cgi-bin/wiki/SebastiansSplashScreenShot
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"
(interactive)
(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 "HERE GOES YOUR TEXT (SHORTCUT TABLE)")
(insert "\n")
(insert (propertize "-------------------------------------------------------------------------------------------------------"
'face
'( :weight bold :background "RosyBrown1" :foreground "black")))
(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" <lngndvs@gmail.com> 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.: sebatian_rose@gmx.de, s.rose@emma-stil.de
next prev parent reply other threads:[~2008-07-31 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 14:37 Pop up reference card Alan E. Davis
2008-07-31 16:47 ` Sebastian Rose [this message]
2008-07-31 23:52 ` Sven Bretfeld
2008-08-01 2:14 ` Alan E. Davis
-- strict thread matches above, loose matches on Subject: below --
2008-08-01 2:45 lngndvs
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=87hca6t2zl.fsf@kassiopeya.MSHEIMNETZ \
--to=sebastian_rose@gmx.de \
--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).