all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Skipping words with C-<right> like other editors do
Date: Wed, 18 Apr 2018 15:59:08 +0700	[thread overview]
Message-ID: <CAP_d_8XdAB1gthiifgz+-nggtW0rZeZb2VTSYQdOZcnprxF7xw@mail.gmail.com> (raw)
In-Reply-To: <jwvk1t6ghu4.fsf-monnier+emacs@gnu.org>

On Tue, Apr 17, 2018 at 7:09 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>> Why not use find-word-boundary-function-table?
>>
>> Invoking ‘forward-word’ here causes the function registered in
>> ‘find-word-boundary-function-table’ to be called with arguments (13
>> 16), but we wanted to stop at 8. By the time the driver asks if anyone
>> wants off the bus, we’re already way past our stop!
>
> I think this deserves a bug report, then.  You shouldn't need to
> override umpteen commands to provide you own definition of what is a word.

Filed bug#31204.

For personal use, I could probably just override ‘forward-word’ with
advice. ‘backward-word’ and ‘kill-word’ are implemented in terms of
‘forward-word’; ‘left-word’ and ‘right-word’ are implemented in terms
of ‘forward-word’ and ‘backward-word’; and ‘backward-kill-word’ is
implemented in terms of ‘kill-word’; so everything would just follow
suit.

However, I’m a bit wary about making ‘forward-word’ follow that
definition. I have literally no idea how many things will change
behavior if I redefine “word” to mean something more like “token”. For
one, ‘transpose-words’ would then behave like this:

    foo *** +++ (|bar)
    foo *** +++ bar(|)

For some people, this will make sense. For some, probably not.



  reply	other threads:[~2018-04-18  8:59 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
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 [this message]
     [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

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

  git send-email \
    --in-reply-to=CAP_d_8XdAB1gthiifgz+-nggtW0rZeZb2VTSYQdOZcnprxF7xw@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.