[OS X Emacs] Re: Aquamacs Cursor movement and word wrapping: C-e, C-a, C-n, C-p

Tom Van Vleck thvv at multicians.org
Fri Apr 23 17:17:01 EDT 2010


On Apr 23, 2010, at 1:49 PM, Howard Melman wrote:
> Please make it work based on visual line. This is what emacs has done
> for decades (long before there was soft wrapping).
>
> backwards-paragraph can move to the beginning of a paragraph
> nothing else would move to the beginning of a visual line.

Howard, I think you are partly mistaken.

What Emacs has done for decades is to work on the buffer line,
as defined by newlines, regardless of how the text on a long line
is wrapped.  If you wish I will get Bernie Greenberg to
send a note to that effect.

I did some experiments.

1. I have a Fedora 12 Linux machine with Emacs 23.1.1  I do C-f goo to  
create
a new window in fundamental mode.  Then I type a bunch of text
and C-a C-k C-k C-k .. to make more text than will fit across the  
window,
so the text wraps.  (Mode is "Fundamental.")

If I now do a C-a, the cursor flies back to before the very first
character.  Hah, says I, just what I wanted.  Then I do a C-n.
Ack! it goes down one visual line.  C-p goes up one visual line.
C-e goes to the end of the whole text.  This is a mixture of
the behaviors, which will probably confuse everybody.

Is this in some mode that doesn't show in the modeline?
Customize Emacs says that the option "line-move-visual" is ON.
Turning it OFF restores traditional operation.  The help for
C-n says it is bound to (next-line) and explains the dependence
on 'line-move-visual'.

Changing the default in Emacs 23 seems like a mistake to me.
I also think line-move-visual should be shown in the modeline.

2. Emacs 22 on a Ubuntu works on buffer semantics, that is
in the experiment above C-n goes to the next line as delimited
by newlines, not the next visual line.

3. So does the Emacs 22.1 in Leopard and the Emacs 22.3 in FreeBSD 7.2.

On Apr 23, 2010, at 3:16 PM, David Reitter wrote:

> MA, Tom, Art, do you guys use the visual-line-mode with soft word  
> wrapping much?

I never voluntarily use visual line mode or soft word wrap.
None of the first 5 options in my Aquamacs options menu are set.

> I also want to note that it would be relatively easy to condition  
> the behavior on whether we're recording or executing a keyboard  
> macro.  That may or may not be a good thing.

This sounds like a hack to partially undo the bad effects of a  
previous hack.
I would worry that we would need an anti-anti hack for some other  
situation
we haven't thought of yet.





More information about the MacOSX-Emacs mailing list