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

M A markoilcan at gmail.com
Fri Apr 23 10:57:33 EDT 2010


On Thu, Apr 22, 2010 at 9:29 PM, Tom Van Vleck <thvv at multicians.org> wrote:
>
> On Apr 22, 2010, at 9:56 PM, David Reitter wrote:
>
>> On Apr 22, 2010, at 9:39 PM, Tom Van Vleck wrote:
>>>
>>> Changing the meaning of C-e, C-a, C-n, C-p would make Aquamacs unusable
>>> for me.  It would break saved macros.  It would mean that these keystrokes
>>> meant different things depending on what machine I was logged into.  I would
>>> have to relearn editing skills I learned over 30 years ago.  I couldn't use
>>> Aquamacs if you changed this fundamental meaning.
>>
>> Could you clarify please: do not change them from their Emacs 23 settings?
>> In Emacs 23, all of these apply to the visual line (visual-line-mode =
>> soft word wrapping on).  That's what the commands do in Emacs 23.
>>
>> This is different from Emacs 22, where C-a moved to the beginning of the
>> (long) buffer line, no matter what the wrapping was.  Native word wrapping
>> didn't exist (longlines-mode excluded).  When I introduced word wrapping in
>> Emacs 22 in one of the Aquamacs 1.x versions, I took care to give C-a, C-e,
>> C-n, C-p their meaning based on visual lines, based on user feedback.
>
> I think C-a should move to the beginning of a buffer line, and similarly for
> the others.
> Making it move to the beginning of a visual line means that where the cursor
> ends up
> would depend on the width of the window and how the line was wrapped.
>
> When I record a keystroke macro, I often begin it with C-a to make sure I am
> at the beginning of the buffer line before e.g. searching for something.  If
> C-a sometimes went to somewhere else, then the macro would not work
> correctly.  Sometimes keystroke macros get named and saved.  I have a few
> such in my customization, though I would have to read them intensely to see
> if they will break if the meaning of commands is altered.
>
> If Emacs 23 has changed the meaning of C-a C-e C-n C-p, or made the meaning
> depend on some mode, then I think that is a mistake.
>

I believe this is controlled by whether visual-line-mode is on or not.
I do not know
if it is on by default or not in Emacs 23, but when it is on, the
behavior is as David
describes. Personally, I prefer C-a etc to move according to the
logical line rather
than the visual line, but I think it's probably preferable to follow
the default mode
behavior of Emacs 23. Old emacs people like me can easily adapt by,
for instance,
making sure visual line mode is off by default (which is what I do).
Maybe the relevant
question is should Aquamacs turn on visual line mode by default, if
Emacs 23 does not?
(Personally I think that's ok, since I just turn it off).

Mark A



More information about the MacOSX-Emacs mailing list