From: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
To: Rainer@krugs.de
Cc: emacs-orgmode <emacs-orgmode@gnu.org>, Oleh <ohwoeowho@gmail.com>,
"ess-help@r-project.org" <ess-help@r-project.org>
Subject: Re: Keyboard shortcut - is there a principle behind them?
Date: Fri, 6 Dec 2013 07:22:40 -0500 [thread overview]
Message-ID: <CAEWDx5ffHLHpv=5jNHp_FAP4aPNQaur+tkg1nQa+gT=OcG_c2A@mail.gmail.com> (raw)
In-Reply-To: <52A1A074.9090601@krugs.de>
Hello,
On 6 December 2013 05:01, Rainer M Krug <Rainer@krugs.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> On 12/06/13, 10:49 , Oleh wrote:
>> Initially the shortcuts were mnemonic, e.g. C-e:
>> `move-end-of-line'. Obviously the keys ran out pretty quick.
>
> I can really imagine. But this explains some - but following your
> example: C-a moves to the beginning of the line - the only "a" there
> is in "Anfang", which is German for "beginning". So only partial luck
> here.
I can't speak for the original developers however my take on this one
is as follows:
C-b (for beginning) is used for "back"
C-s (for start) is used for "search", C-f (find) was "forward".
C-a becomes beginning-of-line by virtue of being the beginning of the alphabet.
Regards,
Jonathan
>> Now only few shortcuts are reserved for user space and plugins, the
>> most notable of which is the `C-c` prefix. That's why most custom
>> modes such as org-mode and ESS bind to shortcuts with `C-c` prefix:
>> there's a convention that Emacs core will not use `C-c`.
>
> Ah - very good to know.
>
>>
>> A nice way of remembering shortcuts only when you need them is to
>> call commands by name with `M-x`. After a while, when you note that
>> you're using one particular command a lot, you'll want to learn the
>> shortcut for it.
>
> That's how I do it - but it involves learning sequences which do not
> make any sense to me - and I am sure there is some sense in the
> sequence, at least within each mode.
>
>>
>> There's one package that might be of good use to you: `smex'. It
>> uses ido completion for `M-x`. You can install it from
>> MELPA/Marmelade. It binds automatically to `M-x` when you install,
>> although I recommend: (global-set-key "\C-t" 'smex)
>
> Yes - smex and ido are *very* useful - I do not know how one can use
> emacs without them.
>
>>
>> As an example, say you want to tangle. Here's what you do: C-t
>> tang Now you see a bunch of rectangle commands mixed into the
>> bunch. You can filter them out by noting that tangle commands have
>> `org` in their name. C-SPC org C-SPC Now there's only 7 candidates
>> left and you can select the one you want with C-m either by cycling
>> with C-s or continuing to type part of name.
>>
>> `smex` logs the commands you use most. For them it usually takes
>> less than 2-3 characters from the name to be recognized. E.g. if
>> you use `org-babel-tangle` a lot, you can usually call it with C-t
>> bab C-m.
>
> Very true and very useful.
>
>>
>> Finally note that no shortcuts are set in stone. You can customize
>> all of them if you want to do so. For instance, and probably a lot
>> of people will disagree, it doesn't make sense for me to have
>> `previous-line' on C-p. So I swap C-p and C-h: (keyboard-translate
>> ?\C-h ?\C-p) (keyboard-translate ?\C-p ?\C-h)
>
> Absolutely true - but I usually try to keep the customization to a
> minimum and to use the defaults.
>
> Thanks,
>
> Rainer
>
>>
>> Oleh
>>
>>
>> On Fri, Dec 6, 2013 at 10:02 AM, Rainer M Krug <Rainer@krugs.de>
>> wrote: Hi
>>
>> one alternative subject could be "because it is Friday"...
>>
>> I am using org-mode and ess regularly, and I use quite a few
>> keyboard shortcuts, but each time I read about a new one, I am
>> wondering: why the heck these specific (default!) keyboard
>> shortcuts?
>>
>> I am not asking why keyboard sequence, but e.g. why "export" in org
>> is C-c e and why tangle is C-c C-v t, and so on.
>>
>> In other words: I am trying to *understand* why C-c and not C-o,
>> because I have tremendous problems to remember the shortcuts - if
>> I would know that there is s tree structure, where each following
>> key narrows it down to further *thematically linked* commands, it
>> would make it easier to learn these.
>>
>> Any insight into this? Or is there a emacs function which returns
>> a random keyboard shortcut for a given function (some emacs
>> shortcuts really seem to be that way...).
>>
>> Thanks,
>>
>> Rainer
>>
>>
>>>
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel : +33 - (0)9 53 10 27 44
> Cell: +33 - (0)6 85 62 59 98
> Fax : +33 - (0)9 58 10 27 44
>
> Fax (D): +49 - (0)3 21 21 25 22 44
>
> email: Rainer@krugs.de
>
> Skype: RMkrug
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSoaB0AAoJENvXNx4PUvmColIIAIy4AQTri6yZ6wVh8hp3/5gV
> RnY8oAXfHTBGW136AwXe2H9fMwfuyc+UA6rqcGzKMx0L1SCdNBXpK3Tfn2gFjRph
> iP/0TEqZgTXIwJurmn33yG6h9a0ABmEXVky+jOkHouldhjt7uuUyvT0LqmYw9pPs
> NFQAU1zmVFgh/nEiJvP2VKilXPh+NXo6ulPjhtAIDb/KjGLTy0SkPJYAF6Do4WYY
> wgbh+GCDzEWKgM+zQfzTq1CydX9FUdWw/zdbULhfu+f+J3/dZWtAlMfSsPi8N38g
> tAVJA/ycKqIMX3/GPlN7FlscPIdYnHxvJRo45MP/3mxkiI5B5vTn9sG90/J1dwU=
> =p6dh
> -----END PGP SIGNATURE-----
>
next prev parent reply other threads:[~2013-12-06 12:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 9:02 Keyboard shortcut - is there a principle behind them? Rainer M Krug
2013-12-06 9:49 ` Oleh
2013-12-06 10:01 ` Rainer M Krug
2013-12-06 12:22 ` Jonathan Leech-Pepin [this message]
2013-12-06 14:49 ` [ESS] " Tyler Smith
2013-12-06 22:56 ` Vitalie Spinu
2013-12-07 6:35 ` Matthew Fidler
2013-12-09 9:01 ` [ESS] " Rainer M Krug
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEWDx5ffHLHpv=5jNHp_FAP4aPNQaur+tkg1nQa+gT=OcG_c2A@mail.gmail.com' \
--to=jonathan.leechpepin@gmail.com \
--cc=Rainer@krugs.de \
--cc=emacs-orgmode@gnu.org \
--cc=ess-help@r-project.org \
--cc=ohwoeowho@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.