unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: "James K. Lowden" <jklowden@speakeasy.net>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Skipping words with C-<right> like other editors do
Date: Mon, 16 Apr 2018 15:22:07 +0700	[thread overview]
Message-ID: <CAP_d_8Xjpm-8EpFRw=uwCEdeb-3wNx9FFXQMnV9DS_0OiYHgpg@mail.gmail.com> (raw)
In-Reply-To: <20180415193419.df83012d43d222edbd70e69f@speakeasy.net>

On Mon, Apr 16, 2018 at 6:34 AM, James K. Lowden <jklowden@speakeasy.net> wrote:
>> !text! ---! ^^^! ***! ///! ;;;! aa!-!xx! bb!
>> !text !--- !^^^ !*** !/// !;;; !aa!-!xx !bb!
>
> Somewhere in the documentation, a rational argument is made for emacs's
> choice.  By defining forward-word and back-word asymetrically,
> navigation in either direction is sped up.

Asymmetry is probably not the source of annoyance here. Speed is.

I tested the same line with Mousepad, Gedit, Midnight Commander,
Firefox, Vim, and Emacs. (Vim has a richer vocabulary of word motion
commands; I noted them separately.)

    Ctrl+right →
    text --- ^^^ *** /// ;;; aa-xx bb
    |   |                      |  |  |   Emacs *scratch*
    |   |   |   |   |   |   |  || |  |   Gedit, Mousepad
    |   |       |    |   |      | |  |   Firefox
    |    |   |   |   |   |   | ||  |     Midnight Commander, Vim w
    |    |   |   |   |   |   |     |     Vim W
    |  |   |   |   |   |   |  || |  |    Vim e
    |  |   |   |   |   |   |     |  |    Vim E

    Ctrl+left ←
    text --- ^^^ *** /// ;;; aa-xx bb
    |                        |  |  | |   Emacs *scratch*
    |        |      |   |    |  |  | |   Firefox
    |    |   |   |   |   |   | ||  | |   Gedit, Mousepad, MC, Vim b
    |    |   |   |   |   |   |     | |   Vim B
    |  |   |   |   |   |   |  || |   |   Vim ge
    |  |   |   |   |   |   |     |   |   Vim gE

So, observations:

* Most “reduced instruction set” editors have different stops for
forward and backward movement. Emacs is not the odd one here.

* Firefox does something that is very hard to describe.

* Emacs makes much fewer stops in comparison with other editors.
Namely, it stops only at transitions from letters to non-letters,
while most other editors stop at transitions from letters to
whitespace, letters to punctuation, and punctuation to whitespace.


I think it might be worthwhile to try implementing word motion
commands that takes into account both word-constituent and whitespace
syntax classes.



  reply	other threads:[~2018-04-16  8:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <778085015.663724.1523818187137.ref@mail.yahoo.com>
2018-04-15 18:49 ` Skipping words with C-<right> like other editors do R. Diez
2018-04-15 22:09   ` Skip Montanaro
     [not found]   ` <mailman.12470.1523830225.27995.help-gnu-emacs@gnu.org>
2018-04-15 22:17     ` Emanuel Berg
     [not found] ` <mailman.12459.1523825033.27995.help-gnu-emacs@gnu.org>
2018-04-15 21:43   ` Emanuel Berg
2018-04-15 21:54     ` Tim Johnson
2018-04-15 23:34   ` James K. Lowden
2018-04-16  8:22     ` Yuri Khan [this message]
2018-04-16 17:31       ` Yuri Khan
2018-04-16 18:49         ` Stefan Monnier
2018-04-16 19:23           ` Yuri Khan
2018-04-17  9:27           ` Yuri Khan
2018-04-17 12:09             ` Stefan Monnier
2018-04-18  8:59               ` Yuri Khan
     [not found]     ` <mailman.12492.1523866951.27995.help-gnu-emacs@gnu.org>
2018-04-16 23:53       ` James K. Lowden

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAP_d_8Xjpm-8EpFRw=uwCEdeb-3wNx9FFXQMnV9DS_0OiYHgpg@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jklowden@speakeasy.net \
    /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.
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).