all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Uday S Reddy'" <u.s.reddy@cs.bham.ac.uk>
Cc: emacs-devel@gnu.org
Subject: RE: arrow keys vs. C-f/b/n/p
Date: Fri, 11 Jun 2010 15:46:18 -0700	[thread overview]
Message-ID: <1CFE4B21FCDB47739DED41440630E106@us.oracle.com> (raw)
In-Reply-To: <19474.43413.742000.105784@gargle.gargle.HOWL>

> > > However, consistency matters.
> > 
> > Consistency matters.  But which consistency?
> 
> The consistency I am asking for is that "forward" should mean the same
> thing all the time and "end" should mean the same thing all the time.

Forward and end wrt what?

What I'm suggesting is that we might want to keep the "what" to be the buffer,
in general. And forward in the buffer means farther from the beginning
(point-min) and closer to the end (point-max).

That's really the question. What are "forward" and "end" relative to, and for
which commands? Is a command such as `forward-char' about moving forward in the
buffer or about moving forward within the immediately surrounding text (which
might be R2L)?

> I also think "forward" and "end" should be correlated because nobody
> wants to go forward to the beginning!

Same question. If the current sentence is R2L then moving forward in the buffer,
i.e. toward the end (of the buffer), also means moving backward in the sentence,
i.e. toward the beginning (of the sentence).

> On the other hand, there is no need for "forward" and "right" to be
> correlated.  They are independent concepts.

Well, that's why I rephrased "right" as forward-in-the-buffer, to make clearer
what is the real question (that I raised).

> James Cloos wrote an informative message later, at 5:12pm, where he
> pointed out that an L2R user that is occasionally using R2L text may
> have a very different preference from some one that regularly deals
> with R2L text.  So, flexibility is called for.  If we go with a
> preconceived idea that C-f should always mean the same as <right>,
> then we are likely to go wrong.

And if we go with a preconceived idea that C-f should change directions
depending on the text surrounding the cursor (R2L vs L2R), then we are also
likely to go wrong.  Consistency, OK, but which?

Assuming we don't change anything that affects someone who never uses R2L, I
won't complain for myself, as it won't really affect me.

But I raised the question because I get the impression we might be marching off
into the swamp.  And also because I would like the doc to explain these things
clearly, in the end.

> I might have said this earlier, but key bindings are not a big deal.
> The users can always bind the keys to their liking.  But the
> *functionality* should be there for them to bind the keys to.  If
> there is only one function called forward-char then C-f and <right>
> will get coupled, and the flexibility won't be there for the users.
> 
> If there is a forward-char and a right-char, then James Cloos can bind
> both C-f and <right> to forward-char.  He gets the logical motion that
> he prefers.  Some other user might want <right> to mean right.  He
> might bind <right> to right-char.

Certainly we will need various commands and offer flexibility.

I think this is about (a) the default bindings and (b) the behavior in general
of `forward-'* commands. 

IIUC, the "coupling" question is part of (a): Should the default bindings be
different for `right' (`<right>') and `C-f'? Should one of them DTRT for R2L but
the other not?

> Ok, that is nice.  But then, will `forward-sentence' move forward over
> a sentence, while `forward-char' will move back?

It might, if the sentence text is written "backwards" wrt the buffer direction.

Again, that's the question. Does `forward-char' respect the directionality of
the buffer or the directionality of the text surrounding point?

BTW, what do we do when point is at a boundary (R2L/L2R or L2R/R2L)?  Which way
is forward?  Should that depend on the previous cursor movement (where we're
coming from)? Surely, that way lies madness. ;-)

I imagine that these questions are not new for R2L folks. Hasn't some sort of
standard behavior been worked out for buffers/documents that combine R2L and L2R
text? If so, how does that conventional behavior fit with Emacs?

> That might in fact be what some users want.  Somebody might have his
> neurons already wired to correlate C-f with right and C-b with left.
> But we can't say that every user should follow that choice?

We can't say anything about every user.
We do have to decide something about the default behavior, however.

> > My question is about the "forward" direction. Should it be the
> > traditional, buffer-oriented direction or should it change depending
> > on the current paragraph (surrounding text) etc.?
> > 
> > Naively, it seems simpler to have movement from bob toward 
> > eob be "forward", with (1+ (point-min)) being farther "forward"
> > than (point-min), ... and (point-max) being the farthest "forward".
> 
> My belief is that many users will want "forward" to be determined by
> the kind of text they are editing.

You're speaking only about key bindings, I think. I'm asking also about commands
and command names.  Should most `forward-'* commands reverse direction when the
text around point is R2L?

Will `forward-char' be DWIMed to fit R2L (as opposed to some other command being
defined for that)?  How would that affect Lisp code and keyboard macros?

> bob and eob are harder issues.  So, I don't think we should let them
> guide everything else.  Rather, they should be postponed to the end,
> after everything else is decided.
> 
> In fact, it is not clear to me that when a user does bob or eob, they
> necessarily want to go to the very beginning or very end of the text.
> Somewhere close by is good enough.  So, if bob and eob don't work
> perfectly, it doesn't matter all that much.

I don't imagine that anyone is suggesting to change `beginning-of-buffer' so it
goes to eob.  My question is about the behavior and notion of "forward" in
general.

At any rate, I've admitted that I know _nothing_ about R2L, and you've said that
you too are not an R2L user. So what we two have to say about this is perhaps
not so important, and I'll stop here. Eventually someone who knows better will
chime in and set things straight. ;-)




  reply	other threads:[~2010-06-11 22:46 UTC|newest]

Thread overview: 158+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07  1:05 Performance Stefan Monnier
2010-06-07 13:35 ` Performance Eli Zaretskii
2010-06-07 14:22   ` arrow keys vs. C-f/b/n/p (was: Performance) David Kastrup
2010-06-07 14:39     ` Eli Zaretskii
2010-06-07 15:01       ` arrow keys vs. C-f/b/n/p David Kastrup
2010-06-07 23:00         ` Eli Zaretskii
2010-06-07 15:34       ` arrow keys vs. C-f/b/n/p (was: Performance) Uday S Reddy
2010-06-11 14:12       ` arrow keys vs. C-f/b/n/p Chong Yidong
2010-06-11 15:47         ` Stefan Monnier
2010-06-11 17:12           ` Drew Adams
2010-06-11 19:34             ` Uday S Reddy
2010-06-11 20:16               ` Drew Adams
2010-06-11 21:24                 ` Uday S Reddy
2010-06-11 22:46                   ` Drew Adams [this message]
2010-06-12 10:28                     ` Eli Zaretskii
2010-06-12 10:20                 ` Eli Zaretskii
2010-06-12 14:27                   ` Drew Adams
2010-06-12 10:12               ` Eli Zaretskii
2010-06-12 10:00             ` Eli Zaretskii
2010-06-12 10:17               ` David Kastrup
2010-06-12 10:38                 ` Eli Zaretskii
2010-06-12 14:26               ` Drew Adams
2010-06-12 16:10                 ` Eli Zaretskii
2010-06-12 17:12                   ` Drew Adams
2010-06-12 17:25                     ` Lennart Borgman
2010-06-12 18:38                       ` Eli Zaretskii
2010-06-12 18:49                         ` Lennart Borgman
2010-06-12 19:38                           ` Eli Zaretskii
2010-06-12 19:51                             ` Lennart Borgman
2010-06-12 18:01                     ` Uday S Reddy
2010-06-12 19:16                       ` Drew Adams
2010-06-12 18:49                     ` Eli Zaretskii
2010-06-12 19:19                       ` Drew Adams
2010-06-12 22:57                         ` Davis Herring
2010-06-11 19:45           ` Chong Yidong
2010-06-11 19:50             ` Chong Yidong
2010-06-12 10:17               ` Eli Zaretskii
2010-06-13 18:08               ` Eli Zaretskii
2010-06-12 10:14             ` Eli Zaretskii
2010-06-12  9:16           ` Eli Zaretskii
2010-06-12  9:34             ` David Kastrup
2010-06-12 10:30               ` Eli Zaretskii
2010-06-12 20:54                 ` David Kastrup
2010-06-12 14:26             ` Drew Adams
2010-06-12 20:31               ` Stefan Monnier
2010-06-11 16:29         ` James Cloos
2010-06-11 17:09           ` Lennart Borgman
2010-06-12  9:27             ` Eli Zaretskii
2010-06-12 14:49               ` Lennart Borgman
2010-06-12 16:11                 ` Eli Zaretskii
2010-06-12 16:18                   ` Lennart Borgman
2010-06-12 18:33                     ` Eli Zaretskii
2010-06-12 18:58                       ` Lennart Borgman
2010-06-12 19:34                         ` Lennart Borgman
2010-06-12 19:58                           ` Eli Zaretskii
2010-06-12 20:26                             ` Lennart Borgman
2010-06-12 21:08                               ` Eli Zaretskii
2010-06-12 21:20                                 ` Lennart Borgman
2010-06-12 19:55                         ` Eli Zaretskii
2010-06-12 20:07                           ` Lennart Borgman
2010-06-12 21:05                             ` Eli Zaretskii
2010-06-12 21:16                               ` Lennart Borgman
2010-06-13  3:52                                 ` Lennart Borgman
2010-06-13  7:53                               ` David Kastrup
2010-06-11 17:37           ` Chong Yidong
2010-06-11 18:04             ` Lennart Borgman
2010-06-11 21:23               ` W Dan Meyer
2010-06-12  5:40                 ` Miles Bader
2010-06-12 10:48               ` Eli Zaretskii
2010-06-12 14:57                 ` Lennart Borgman
2010-06-12 10:02             ` Eli Zaretskii
2010-06-12 10:22               ` James Cloos
2010-06-12  9:24           ` Eli Zaretskii
2010-06-12 10:17             ` James Cloos
2010-06-12 12:03               ` Eli Zaretskii
2010-06-12 12:40                 ` James Cloos
2010-06-12 20:37               ` Stefan Monnier
2010-06-12 16:36           ` Andreas Schwab
2010-06-12 16:57             ` Current head won't build Randal L. Schwartz
2010-06-12 17:24               ` Chong Yidong
2010-06-12 18:55                 ` Randal L. Schwartz
2010-06-12 19:54                   ` Juri Linkov
2010-06-12 20:13                     ` Randal L. Schwartz
2010-06-14 15:43                       ` Juri Linkov
2010-06-15 14:50                         ` Randal L. Schwartz
2010-06-15 18:28                           ` Andreas Schwab
2010-06-15 18:31                             ` Randal L. Schwartz
2010-06-15 19:25                               ` Andreas Schwab
2010-06-15 19:38                                 ` Teemu Likonen
2010-06-15 19:43                                   ` Andreas Schwab
2010-06-15 19:54                                   ` Randal L. Schwartz
2010-06-16  3:28                                     ` Stephen J. Turnbull
2010-06-16  8:21                                       ` Andreas Schwab
2010-06-16  9:47                                         ` Juanma Barranquero
2010-06-16 12:23                                         ` Stephen J. Turnbull
2010-06-16 12:36                                           ` Andreas Schwab
2010-06-18  6:05                                             ` Stephen J. Turnbull
2010-06-18  8:20                                               ` Andreas Schwab
2010-06-18  9:04                                                 ` Stephen J. Turnbull
2010-06-18  9:27                                                   ` Andreas Schwab
2010-06-18 10:41                                                     ` Stephen J. Turnbull
2010-06-18 11:33                                                       ` Andreas Schwab
2010-06-16 12:44                                           ` Andreas Schwab
2010-06-16 13:12                                             ` Randal L. Schwartz
2010-06-16 13:17                                               ` Andreas Schwab
2010-06-16 13:21                                                 ` Randal L. Schwartz
2010-06-16 14:00                                                   ` Andreas Schwab
2010-06-16 14:18                                                     ` Randal L. Schwartz
2010-06-16 14:25                                                       ` Andreas Schwab
2010-06-16 14:29                                                         ` Randal L. Schwartz
2010-06-16 14:58                                                           ` Andreas Schwab
2010-06-16 15:09                                                             ` Randal L. Schwartz
2010-06-16 15:51                                                               ` Andreas Schwab
2010-06-16 13:29                                             ` Randal L. Schwartz
2010-06-16 14:14                                               ` Andreas Schwab
2010-06-16 18:32                                               ` Stefan Monnier
2010-06-16 18:43                                                 ` Randal L. Schwartz
2010-06-18  6:04                                             ` Stephen J. Turnbull
2010-06-12 16:41           ` arrow keys vs. C-f/b/n/p Andreas Schwab
2010-06-12 23:34             ` James Cloos
2010-06-11 17:12         ` James Cloos
2010-06-12  5:43           ` Miles Bader
2010-06-12  9:09             ` Eli Zaretskii
2010-06-12 11:13               ` Uday S Reddy
2010-06-12 12:00                 ` Eli Zaretskii
2010-06-12 14:26               ` Drew Adams
2010-06-12 16:14                 ` Eli Zaretskii
2010-06-12 22:27               ` Kenichi Handa
2010-06-13  3:02                 ` Eli Zaretskii
2010-06-13 10:24                   ` Kenichi Handa
2010-06-13 15:28                     ` Lennart Borgman
2010-06-13 17:20                       ` Eli Zaretskii
2010-06-13 18:03                         ` Lennart Borgman
2010-06-12 10:03           ` Eli Zaretskii
2010-06-12 10:23             ` James Cloos
2010-06-12 14:27               ` Drew Adams
2010-06-12  9:11         ` Eli Zaretskii
2010-06-07 15:19     ` Stefan Monnier
2010-06-07 16:08       ` Juanma Barranquero
2010-06-07 16:21         ` David Kastrup
2010-06-07 17:25           ` Juanma Barranquero
2010-06-07 18:26             ` Andreas Schwab
2010-06-07 19:24               ` Juanma Barranquero
2010-06-07 19:57                 ` Stefan Monnier
2010-06-07 20:17                   ` Juanma Barranquero
2010-06-07 22:32                     ` Davis Herring
2010-06-07 22:40                       ` Juanma Barranquero
2010-06-08  0:15                         ` Stefan Monnier
2010-06-08 13:51                           ` Uday S Reddy
2010-06-08 20:25                             ` Stefan Monnier
2010-06-08 21:07                               ` Uday S Reddy
2010-06-07 23:19                       ` Eli Zaretskii
2010-06-08  7:58     ` Miles Bader
2010-06-07 15:33   ` Performance Stefan Monnier
2010-06-10 10:30 ` Performance Kenichi Handa
  -- strict thread matches above, loose matches on Subject: below --
2010-06-12 20:56 arrow keys vs. C-f/b/n/p grischka
2010-06-12 21:04 ` Eli Zaretskii
2010-06-12 21:26   ` grischka

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=1CFE4B21FCDB47739DED41440630E106@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=u.s.reddy@cs.bham.ac.uk \
    /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.