emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Emacs movement keys
@ 2016-08-23 19:38 Eduardo Mercovich
  2016-08-23 20:49 ` Jorge
  0 siblings, 1 reply; 11+ messages in thread
From: Eduardo Mercovich @ 2016-08-23 19:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2508 bytes --]

Dear Orgers.

This is a novice for novices post. Probably all of you here know this, so please
bear with me with patience and understanding.

Since new users are welcomed to this humble and warm community, I'd like
to share a (to me) hidden pearl.

After some time using Org, I just... ehem... (cought)... <miniscule>did
the tutorial</miniscule>.

I found it quite useful, and the main thing are the emacs movement
keys. Of course, they are not the standard keyboard keys like [home],
[end], [Pg down] or [Pg up]. That not only would be too simple (we could
brawl on that, really), but I believe the real reason is that those keys
were not available or standard when Emacs started.

The good news is that the equivalent keybinds are central in the
keyboard, so you don't even have to move your hands a bit off where they
are.

All in all, the effort to change muscle memory in Emacs makes sense only
if you have an obsessive compulsive maximizer disorder, like many of us
here, and use mostly Emacs (same thing again). ;)

Please note, I'm only saying "I found this and believe it useful for
some" and not "everyone should re-learn how to move". It doesn't make
sense to start any personal, opinionated and context dependent war. 

In short, here is the compressed version in a org table.

--8<---------------cut here---------------start------------->8---

|           | move | move | del   | del  |
| object    | prev | next | back  | forw |
|-----------+------+------+-------+------|
| text      | M <  | M >  | -     | -    |
| screen    | M v  | C v  | -     | -    |
| paragraph | M p  | M n  | -     | -    |
| sentence  | M a  | M e  | -     | M-k  |
| line ↑ ↓  | C p  | C n  | -     | -    |
|      < >  | C a  | C e  | -     | C-k  |
| word      | M b  | M f  | M-DEL | M-d  |
| char      | C b  | C f  | DEL   | C-d  |

C-l clear screen and redisplay all the text, 
    moving point to center, top and bottom of the screen

C-/ Undo
--8<---------------cut here---------------end--------------->8---

For those with visual memory, the image attached may provide some clues:
it's the same thing but the M and C keys are colored, so the pattern is
easier to see.

BTW, there is a quite clear and well thought pattern here:
+ sArt and End
+ Previous and Next
+ Forward and Backward
+ Kill
+ Backspace (DEL) and Delete. 

I hope this may prove useful for someone there. :)

Best...


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.

[-- Attachment #2: EmacsMovement.png --]
[-- Type: image/png, Size: 12174 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 19:38 Emacs movement keys Eduardo Mercovich
@ 2016-08-23 20:49 ` Jorge
  2016-08-23 21:01   ` Alex Recker
  2016-08-23 21:17   ` Eduardo Mercovich
  0 siblings, 2 replies; 11+ messages in thread
From: Jorge @ 2016-08-23 20:49 UTC (permalink / raw)
  To: Eduardo Mercovich; +Cc: org mode

On 23 August 2016 at 16:38, Eduardo Mercovich <eduardo@mercovich.net> wrote:
> |           | move | move | del   | del  |
> | object    | prev | next | back  | forw |
> |-----------+------+------+-------+------|
> | text      | M <  | M >  | -     | -    |
> | screen    | M v  | C v  | -     | -    |
> | paragraph | M p  | M n  | -     | -    |
> | sentence  | M a  | M e  | -     | M-k  |
> | line ↑ ↓  | C p  | C n  | -     | -    |
> |      < >  | C a  | C e  | -     | C-k  |
> | word      | M b  | M f  | M-DEL | M-d  |
> | char      | C b  | C f  | DEL   | C-d  |

Yes, these bindings are very useful.  And did you know that even
outside Emacs you can move/delete wordwise by pressing ctrl togeter
with the right/left arrows or delete or backspace?  I only learned it
a few months ago.  I learned it in [1], even though this wordwise
movement/deletion also works outside LibreOffice as well.
1: https://help.libreoffice.org/Common/General_Shortcut_Keys_in

However, in my Emacs, backward-paragraph is bound to M-{, not M-p, and
forward-paragraph is bound to M-}, not M-n.  M-n and M-p are undefined
here, except in specific modes (the only one I remember is the
minibuffer). Have you bound these keys yourself?  Here I use Emacs
25.1-rc2.  I confirmed with a vanilla session (invoked by emacs -Q).

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 20:49 ` Jorge
@ 2016-08-23 21:01   ` Alex Recker
  2016-08-23 21:18     ` Eduardo Mercovich
  2016-08-23 21:26     ` John Hendy
  2016-08-23 21:17   ` Eduardo Mercovich
  1 sibling, 2 replies; 11+ messages in thread
From: Alex Recker @ 2016-08-23 21:01 UTC (permalink / raw)
  To: emacs-orgmode

> And did you know that even outside Emacs you can move/delete wordwise by
> pressing ctrl togeter with the right/left arrows or delete or backspace?

I'm always surprised by how often C-a/C-e and M-f/M-b work in programs
that aren't Emacs.  Of course there is probably some historical reason
behind this (as much as I'd like to think Google and Slack had emacs
users in mind).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 20:49 ` Jorge
  2016-08-23 21:01   ` Alex Recker
@ 2016-08-23 21:17   ` Eduardo Mercovich
  1 sibling, 0 replies; 11+ messages in thread
From: Eduardo Mercovich @ 2016-08-23 21:17 UTC (permalink / raw)
  To: Jorge; +Cc: org mode

Hi Jorge.


>> |           | move | move | del   | del  |
>> | object    | prev | next | back  | forw |
>> |-----------+------+------+-------+------|
>> | text      | M <  | M >  | -     | -    |
>> | screen    | M v  | C v  | -     | -    |
>> | paragraph | M p  | M n  | -     | -    |
>> | sentence  | M a  | M e  | -     | M-k  |
>> | line ↑ ↓  | C p  | C n  | -     | -    |
>> |      < >  | C a  | C e  | -     | C-k  |
>> | word      | M b  | M f  | M-DEL | M-d  |
>> | char      | C b  | C f  | DEL   | C-d  |

> Yes, these bindings are very useful.  And did you know that even
> outside Emacs you can move/delete wordwise by pressing ctrl togeter
> with the right/left arrows or delete or backspace? [...]

Yes, that's how I did it since I have memory and today is the standard.
Crtl and up/down in many editing programs means paragraph previous and next also. 
That's why I was so surprised when I learnt that Emacs is courteous to
them, but it's native keybindings were different. :)

> However, in my Emacs, backward-paragraph is bound to M-{, not M-p, and
> forward-paragraph is bound to M-}, not M-n.  M-n and M-p are undefined
> here, except in specific modes (the only one I remember is the
> minibuffer). Have you bound these keys yourself?

You're absolutely right, it is my fault, I forgot that I bind them!
What you have is the standard, this was just to follow the same pattern
that in the rest of the keybindings (Meta key, Previous and Next).

The standard binding (just replace the row) is

| paragraph | M {  | M }  | -     | -    |

Sorry to all of you, I did it some time ago and just forgot it.

Best...


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 21:01   ` Alex Recker
@ 2016-08-23 21:18     ` Eduardo Mercovich
  2016-08-23 21:26     ` John Hendy
  1 sibling, 0 replies; 11+ messages in thread
From: Eduardo Mercovich @ 2016-08-23 21:18 UTC (permalink / raw)
  To: Alex Recker; +Cc: emacs-orgmode

Hi Alex.

> I'm always surprised by how often C-a/C-e and M-f/M-b work in programs
> that aren't Emacs.  Of course there is probably some historical reason
> behind this (as much as I'd like to think Google and Slack had emacs
> users in mind).

Yes! At least it works in the command line. :)

Best...


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 21:01   ` Alex Recker
  2016-08-23 21:18     ` Eduardo Mercovich
@ 2016-08-23 21:26     ` John Hendy
  2016-08-23 21:31       ` Alex Recker
  1 sibling, 1 reply; 11+ messages in thread
From: John Hendy @ 2016-08-23 21:26 UTC (permalink / raw)
  To: Alex Recker; +Cc: emacs-orgmode

On Tue, Aug 23, 2016 at 4:01 PM, Alex Recker <alex@reckerfamily.com> wrote:
>> And did you know that even outside Emacs you can move/delete wordwise by
>> pressing ctrl togeter with the right/left arrows or delete or backspace?
>
> I'm always surprised by how often C-a/C-e and M-f/M-b work in programs
> that aren't Emacs.  Of course there is probably some historical reason
> behind this (as much as I'd like to think Google and Slack had emacs
> users in mind).

I've always envisioned a collection of "You know you're an Emacs user
when..." for instances where this *doesn't* work out so conveniently.
Like how many times I've C-y'd out of habit expecting to paste and
nothing happens!


John

>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 21:26     ` John Hendy
@ 2016-08-23 21:31       ` Alex Recker
  2016-08-29  5:10         ` Marcin Borkowski
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Recker @ 2016-08-23 21:31 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]


> "You know you're an Emacs user when..."

You try to M-f your way through a URI and accidentally turn it into an
integral.


[-- Attachment #2: Screen Shot 2016-08-23 at 4.27.37 PM.png --]
[-- Type: image/png, Size: 7501 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-23 21:31       ` Alex Recker
@ 2016-08-29  5:10         ` Marcin Borkowski
  2016-08-29 13:25           ` John Kitchin
       [not found]           ` <9739a10152f34fd298f3f2a5014f080a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 11+ messages in thread
From: Marcin Borkowski @ 2016-08-29  5:10 UTC (permalink / raw)
  To: Alex Recker; +Cc: emacs-orgmode


On 2016-08-23, at 23:31, Alex Recker <alex@reckerfamily.com> wrote:

>> "You know you're an Emacs user when..."
>
> You try to M-f your way through a URI and accidentally turn it into an
> integral.

Could you explain this one?

Also,

You know you're an Emacs user when...

you try to get to the beginning of line and find yourself selecting
everything and losing the positition in a large file.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-29  5:10         ` Marcin Borkowski
@ 2016-08-29 13:25           ` John Kitchin
  2016-08-30  2:46             ` Vikas Rawal
       [not found]           ` <9739a10152f34fd298f3f2a5014f080a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 1 reply; 11+ messages in thread
From: John Kitchin @ 2016-08-29 13:25 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Alex Recker, emacs-orgmode

> You know you're an Emacs user when...

You select some text in MS Word and Type C-w to cut it... and are very
unhappy when Word closes...

>
> you try to get to the beginning of line and find yourself selecting
> everything and losing the positition in a large file.
>
> Best,


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
  2016-08-29 13:25           ` John Kitchin
@ 2016-08-30  2:46             ` Vikas Rawal
  0 siblings, 0 replies; 11+ messages in thread
From: Vikas Rawal @ 2016-08-30  2:46 UTC (permalink / raw)
  To: John Kitchin; +Cc: Alex Recker, org-mode mailing list


> On 29-Aug-2016, at 6:55 pm, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> 
>> You know you're an Emacs user when...
> 
> You select some text in MS Word and Type C-w to cut it... and are very
> unhappy when Word closes...

Story of emacs users on OS X...

Vikas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs movement keys
       [not found]           ` <9739a10152f34fd298f3f2a5014f080a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-08-30 10:52             ` Eric S Fraga
  0 siblings, 0 replies; 11+ messages in thread
From: Eric S Fraga @ 2016-08-30 10:52 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

On Monday, 29 Aug 2016 at 13:25, John Kitchin wrote:
>> You know you're an Emacs user when...
>
> You select some text in MS Word and Type C-w to cut it... and are very
> unhappy when Word closes...

Funnily enough, I'm usually happy when Word closes...  ;-)

(sorry for the noise but I couldn't resist)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-08-30 11:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 19:38 Emacs movement keys Eduardo Mercovich
2016-08-23 20:49 ` Jorge
2016-08-23 21:01   ` Alex Recker
2016-08-23 21:18     ` Eduardo Mercovich
2016-08-23 21:26     ` John Hendy
2016-08-23 21:31       ` Alex Recker
2016-08-29  5:10         ` Marcin Borkowski
2016-08-29 13:25           ` John Kitchin
2016-08-30  2:46             ` Vikas Rawal
     [not found]           ` <9739a10152f34fd298f3f2a5014f080a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-08-30 10:52             ` Eric S Fraga
2016-08-23 21:17   ` Eduardo Mercovich

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