all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: C-n and C-a
Date: Mon, 02 Feb 2009 03:47:19 +0200	[thread overview]
Message-ID: <87zlh5mx04.fsf@jurta.org> (raw)
In-Reply-To: <87ljsrb4hn.fsf@cyd.mit.edu> (Chong Yidong's message of "Sat, 31 Jan 2009 15:33:08 -0500")

>> 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/




  reply	other threads:[~2009-02-02  1:47 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 14:32 C-n and C-a Richard M Stallman
2009-01-29 15:10 ` Tassilo Horn
2009-01-29 16:09   ` Harald Hanche-Olsen
2009-01-29 17:15     ` Tassilo Horn
2009-01-29 19:40   ` Adrian Robert
2009-01-30  0:32   ` Juri Linkov
2009-01-30  1:20     ` Stefan Monnier
2009-01-30  9:45       ` Eli Zaretskii
2009-01-31 17:45       ` Juri Linkov
2009-01-31 19:47         ` Stefan Monnier
2009-02-02  1:45           ` Juri Linkov
2009-01-31 20:33         ` Chong Yidong
2009-02-02  1:47           ` Juri Linkov [this message]
2009-01-30  7:25   ` Richard M Stallman
2009-01-29 18:24 ` Karl Fogel
2009-01-29 18:48   ` Harald Hanche-Olsen
2009-01-29 21:41 ` Stefan Monnier
2009-01-30 16:07   ` Sascha Wilde
2009-01-31 20:34   ` Chong Yidong
2009-01-30  0:29 ` Juri Linkov
2009-01-30  6:12   ` mail
2009-01-31 17:45     ` Juri Linkov
2009-01-31 22:35       ` Drew Adams
2009-02-01 20:11         ` Leo
2009-02-03 15:11           ` Carsten Dominik
2009-02-02  1:54         ` Juri Linkov
2009-02-02  2:25           ` Drew Adams
2009-02-02  9:45             ` Juri Linkov
2009-02-06  0:45 ` Juri Linkov
2009-02-06 16:04   ` Chong Yidong
2009-02-08  0:48     ` Juri Linkov
2009-02-08 20:08       ` Stefan Monnier
2009-02-09 21:22         ` Christian Schlauer
2009-02-09 22:02         ` Drew Adams
2009-02-10  2:05           ` Stefan Monnier
2009-02-10  3:11             ` Drew Adams
2009-02-11 22:45         ` Juri Linkov
2009-02-12  2:01           ` Miles Bader
2009-02-12 10:05             ` Juri Linkov
2009-02-12 11:04               ` Miles Bader
2009-02-13  6:33                 ` Richard M Stallman
2009-02-07  1:52   ` Stefan Monnier

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=87zlh5mx04.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@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.