From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: C-n and C-a Date: Mon, 02 Feb 2009 03:47:19 +0200 Organization: JURTA Message-ID: <87zlh5mx04.fsf@jurta.org> References: <87bptqywpq.fsf@thinkpad.tsdh.de> <87skn1fxaw.fsf@jurta.org> <87iqnv2xk5.fsf@jurta.org> <87ljsrb4hn.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233540439 1559 80.91.229.12 (2 Feb 2009 02:07:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2009 02:07:19 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 03:08:33 2009 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.50) id 1LToEi-0005R4-VX for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2009 03:08:33 +0100 Original-Received: from localhost ([127.0.0.1]:46318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LToDQ-00056E-Fx for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2009 21:07:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LToCg-0004mS-EZ for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:06:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LToCe-0004m4-TC for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:06:26 -0500 Original-Received: from [199.232.76.173] (port=41499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LToCe-0004m1-NN for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:06:24 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]:52387) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LToCe-0003nX-3H for emacs-devel@gnu.org; Sun, 01 Feb 2009 21:06:24 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.69) (envelope-from ) id 1LToCb-000ATX-IR; Mon, 02 Feb 2009 04:06:21 +0200 In-Reply-To: <87ljsrb4hn.fsf@cyd.mit.edu> (Chong Yidong's message of "Sat, 31 Jan 2009 15:33:08 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 8d26fb09d298f8c1cb325fc86345eca8 X-DrWeb-checked: yes X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:108547 Archived-At: >> visual-line-mode is no less misleading - in addition to enabling visual >> motion commands it also enables word wrap mode. And there is no way >> to enable visual motion commands without enabling warping text at >> word boundaries. >> >> These are two separate features amalgamated into one mode. >> I think we should provide a way to toggle them separately. > > The features are logically separate, but in practice they are usually > useful only in combination. When there are lots of wrapped lines, it's > natural to have commands like C-a and C-n act on visual lines. > Conversely, visual-line based commands are not terribly useful unless > the buffer has lots of long lines, and that's a pain to deal with unless > you enable word wrap. We currently have two separate three-state modes: 1. line wrapping mode with three options: 1.1. truncate long lines (truncate-lines=t) 1.2. wrap at window edge (truncate-lines=nil, word-wrap=nil) 1.3. word wrap (truncate-lines=nil, word-wrap=t) Traditionally `toggle-truncate-lines' is not a mode, but a command that toggles the variable `truncate-lines'. I think `word-wrap' should be consistently similar by providing a command `toggle-word-wrap' that would do almost the same and to toggle `word-wrap'. 2. operations on visual lines (line movement and line killing) 2.1. real line operations (line-move-visual=nil, visual-line-mode=nil) 2.2. visual line C-n/C-p (line-move-visual=t, visual-line-mode=nil) 2.3. visual line operations (line-move-visual=t, visual-line-mode=t) It would be enough to have only one mode `visual-line-mode' because intermediate half-real half-visual mode (2.2) is too confusing. To avoid inconsistency of the half-real half-visual mode we could enable `visual-line-mode' by default. > Longlines-mode had an option to separate the word wrapping and line > motion behavior, but AFAIK no one ever used it. I think the same about the default value of `word-wrap'. If we will set it to t, too few users will want to change its default value to nil. But as the same time we should not insist on enabling word wrapping when someone will explicitly disable `word-wrap' and want to enable `visual-line-mode' to use visual line commands on lines wrapped at the window edge. -- Juri Linkov http://www.jurta.org/emacs/