From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: arrow keys vs. C-f/b/n/p Date: Fri, 11 Jun 2010 15:46:18 -0700 Message-ID: <1CFE4B21FCDB47739DED41440630E106@us.oracle.com> References: <87d3w2ncqs.fsf_-_@lola.goethe.zz><87iq5py7xk.fsf@stupidchicken.com><6D176B89214E4EE2B2B376B182E5B80F@us.oracle.com> <19474.43413.742000.105784@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1276296479 715 80.91.229.12 (11 Jun 2010 22:47:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2010 22:47:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Uday S Reddy'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 12 00:47:57 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OND12-00025H-Dr for ged-emacs-devel@m.gmane.org; Sat, 12 Jun 2010 00:47:56 +0200 Original-Received: from localhost ([127.0.0.1]:53035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OND11-0004Ix-Lx for ged-emacs-devel@m.gmane.org; Fri, 11 Jun 2010 18:47:55 -0400 Original-Received: from [140.186.70.92] (port=40375 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OND0q-0004GD-Qf for emacs-devel@gnu.org; Fri, 11 Jun 2010 18:47:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OND0o-00020s-IF for emacs-devel@gnu.org; Fri, 11 Jun 2010 18:47:44 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:43435) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OND0o-00020d-AP for emacs-devel@gnu.org; Fri, 11 Jun 2010 18:47:42 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o5BMlWjw020484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Jun 2010 22:47:34 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o5BGXXdM025075; Fri, 11 Jun 2010 22:47:31 GMT Original-Received: from abhmt010.oracle.com by acsmt353.oracle.com with ESMTP id 318981591276296377; Fri, 11 Jun 2010 15:46:17 -0700 Original-Received: from dradamslap1 (/141.144.224.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Jun 2010 15:46:17 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <19474.43413.742000.105784@gargle.gargle.HOWL> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Thread-Index: AcsJrIH8gDj7ADgVQTCmX2C+S9G+ZQABXGZg X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090204.4C12BD06.0186:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125772 Archived-At: > > > 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 , > 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 > 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 to forward-char. He gets the logical motion that > he prefers. Some other user might want to mean right. He > might bind 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' (`') 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. ;-)