Can't use left to go back on wrapped line

14 views
Skip to first unread message

Hayo Baan – IT Services

unread,
Aug 12, 2018, 9:15:30 AM8/12/18
to aquamac...@googlegroups.com
Something that has been annoying me for a while now but haven't found a
solution for (yet). Perhaps you have one...

If a line of text is too long to fit in the frame and it is wrapped
around, you can move the cursor to the right and it nicely moves to the
wrapped part. However when you try to go left again, the cursor stays
stays stuck at the wrap point (i.e. at at the beginning of the wrapped
part) instead of continuing backwards.

Quite annoying so if someone has a suggestion to fix this, I'll gladly
hear it :-)

Thanks,
Hayo

Nathaniel Cunningham

unread,
Aug 12, 2018, 12:06:35 PM8/12/18
to aquamac...@googlegroups.com
Hayo, I'm not seeing that behavior (Aquamacs 3.4).

I tested with Line Wrapping set to Wrap, Word Wrap, and Break Lines (Auto-Fill) at 70. In each case, right-arrow past the end of the visible line continues to the next visible line, and left-arrow past the (left) end of the  visible line continues to the previous line. Ditto for C-f (forward-char) and C-b (backward-char). Tested in fundamental-mode, text-mode, and python-mode with same results.

Nathaniel


--
You received this message because you are subscribed to the Google Groups "aquamacs-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-devel+unsubscribe@googlegroups.com.

Hayo Baan – IT Services

unread,
Aug 12, 2018, 12:30:35 PM8/12/18
to aquamac...@googlegroups.com

Hi Nathaniel,

Interesting. As it turns out I too sometimes am able to move beyond and back without a problem. But sometimes not... Very strange.

I did some more testing and I think I found (at least one of) the trigger: if you resize the frame (e.g. make it smaller or wider), the cursor no longer moves correctly! When you revert back to the original width, the cursor moves correctly again. More fun: when I change the Show Fringe user interface option to Left and Right, the problem goes away too (I had on on left only)! Guess that I at least have a work-around :-)

Can you try to see if you can replicate this behaviour at your end?

Thanks,
Hayo

To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-deve...@googlegroups.com.

--

Hayo Baan – IT Services
in...@hayobaan.com
www.hayobaan.com

Hayo Baan – IT Services

LinkedIn Twitter GitHub

Win Treese

unread,
Aug 12, 2018, 12:51:26 PM8/12/18
to aquamac...@googlegroups.com
Hayo, that sounds like an odd problem.

There are several Emacs settings that could be involved with this. Did you change any of the Aquamacs defaults, through the menus, customize, or a .emacs file? What kinds of files are you editing, in what modes?

- Win
>> To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-deve...@googlegroups.com.

Nathaniel Cunningham

unread,
Aug 12, 2018, 1:07:34 PM8/12/18
to aquamac...@googlegroups.com
Hayo,
I can't replicate that behavior -- I don't see difference in how cursor movement works before/after making frame wider.

Have you tried starting from Help --> Diagnose and Report Bug --> Try Aquamacs without customizations? If you still see the issue then, give a step-by-step reproducible test case.

Nathaniel


To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-devel+unsubscribe@googlegroups.com.

--

Hayo Baan – IT Services
in...@hayobaan.com
www.hayobaan.com

Hayo Baan – IT Services

LinkedIn Twitter GitHub

--

Hayo Baan – IT Services

unread,
Aug 12, 2018, 2:13:15 PM8/12/18
to aquamac...@googlegroups.com

Hi Nathaniel and Win,

Thanks for looking into this.

I am able to reproduce this (also with no customizations) after I change the following options:

  • Options|Line Wrapping to "Wrap" (default is word wrap; with that there is no problem)
  • Options|User Interface|Fringe to "Left Only" or "None" (default is left & right; with that, there is no problem)

Note: without the fringe on the right (e.g. left only or none), if you actually have a "word" that is longer than the display line, the problem is there even is the wrapping setting is set to "Word Wrap". So the problem might be related to the wrapping on a non-space character in case there's wrapping?

This seems to happen in all modes.

Cheers,
Hayo


On 12/08/2018 19:07, Nathaniel Cunningham wrote:
Hayo,
I can't replicate that behavior -- I don't see difference in how cursor movement works before/after making frame wider.

Have you tried starting from Help --> Diagnose and Report Bug --> Try Aquamacs without customizations? If you still see the issue then, give a step-by-step reproducible test case.

Nathaniel

Nathaniel Cunningham

unread,
Aug 12, 2018, 5:05:23 PM8/12/18
to aquamac...@googlegroups.com
Hayo, I reproduce. This is really strange. The cursor gets stuck only in some lines, not all. And when I try to debug by instrumenting the function `aquamacs-left-char', the problem disappears.

My recipe:
- Launch Aquamacs with no customizations
- Cmd-T (create new tab)
- Options --> Line Wrapping --> Wrap
- Options --> User Interface --> Fringe --> On the left
- Paste  the following text (not including horizontal rules) into the new buffer, as shown in the attached screenshot:
----------
Possimus dolore rerum et quidem qui et velit. Eaque exercitationem vel deleniti et cum. Tenetur dolorem in ipsa dicta ut qui eius. Explicabo blanditiis sint et minus facere iure atque perferendis. Qui et vel voluptatum qui voluptas consectetur alias recusandae. Laudantium voluptatem consequatur debitis illo.

Illo ut sequi molestiae. Quibusdam nam et sint. Quos aliquam saepe porro cupiditate. Sequi quisquam omnis rerum praesentium omnis. Maxime iure eius maxime quis.

Laborum facere nobis enim ipsam perspiciatis hic. Accusantium deleniti atque voluptatibus assumenda quam. Quis quasi voluptatem nobis sit omnis et. Modi totam architecto consectetur est.
----------

Now you should find that with the cursor at the beginning of some lines, left-arrow fails to move the cursor to to the previous character (on the previous line). At the beginning of other lines, it works fine.  With the text above, I indicate with arrows on the screenshot the 4 lines where left-arrow fails.

And the plot thickens:
1) Pressing left-arrow does not work at the beginning the marked lines; however
M-x aquamacs-left-char
which executes (supposedly) the same command works fine with cursor at the same  locations.

2)
M-x left-char
also works fine at those locations; but if I assign (left-char) to a key, e.g.
(global-set-key (kbd "A-M-,")
and try to invoke it via key binding, it fails in the same way as left-arrow.
 
3) If I instrument `aquamacs-left-char' for edebug (using C-u C-M-x with point in the function definition), then put the cursor at one of the problem spots in my pasted text, then press left-arrow and step through the instrumented function, the cursor moves as it should. Same result (left-arrow works) if I instrument and step through `left-char' with edebug.

I can't get to the bottom of this... Ideas?

Nathaniel

--
You received this message because you are subscribed to the Google Groups "aquamacs-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-devel+unsubscribe@googlegroups.com.

Nathaniel Cunningham

unread,
Aug 12, 2018, 5:08:05 PM8/12/18
to aquamac...@googlegroups.com
Here's the promised screenshot:



Reply all
Reply to author
Forward
0 new messages