2

Has anyone found a workaround to the inability of Aquamacs 2.4 to correctly WordWrap at the window boundary?

The modes I use most often are text-mode and latex-mode.

I've removed the built-in hooks of text mode to try and isolate the bug and come up with a workaround:

(remove-hook 'text-mode-hook 'smart-spacing-mode)
(remove-hook 'text-mode-hook 'auto-detect-wrap)

The following code gives me a fancy indicator in the status bar WordWrap, but words are still fragmented at the window boundary.

(add-hook 'latex-mode-hook 'set-word-wrap)
(add-hook 'text-mode-hook 'set-word-wrap)

The following code gives me a pretty status bar indicator of vl WordWrap, but the words are still fragmented at the window boundary.

(setq-default global-visual-line-mode t)

The following code seems to have no appreciable effect:

(setq longlines-wrap-follows-window-size t)

I've really never seen this feature working, so I'm not sure it is even possible with Aquamacs 2.4.

The expected behavior is that words should stay together by automatically wrapping to the next line at the window boundary. As I resize the window, this should happen on the fly. As I type a line, this should happen automatically when I reach the window edge.

Just in case this is a conflict, I'll mention that I have Yasnippets, local and global whitespace, and flyspell all enabled. I also have line numbers, highlight the current line, size indication, and column numbers.

Perhaps someone could just give me the name of the el / elc file that is responsible for this behavior, and I'll take it from a 24.3 version and paste it into Aquamacs 2.4. I am primarily interested in this version because of the ease of which it handles LaTeX documents.

lawlist
  • 13,099
  • 3
  • 49
  • 158

2 Answers2

1

Have you tried in the "Options" menu the submenu "Line wrapping in this buffer"?

Alternatively,

(add-hook 'text-mode-hook #'visual-line-mode)

or

(global-visual-line-mode 1)
Stefan
  • 27,908
  • 4
  • 53
  • 82
  • Well I tracked down the conflict to whitespace.el -- local and global whitespace variables both prevent word wrapping. Disabling whitespace permits word wrap to function properly. I really want to have my cake and eat it too, so I just don't know what to do at this point to resolve the conflict. I'm going to turn off each component of whitespace one at a time in the hopes that it is not space-mark, because that is a key feature I really enjoy. – lawlist Apr 23 '13 at 20:20
  • Nuts! space-mark of whitespace.el is the root cause that prevents word-wrap -- that is my favorite feature . . . – lawlist Apr 23 '13 at 20:33
  • Then you might like to `M-x report-emacs-bug` to request that space-mark doesn't interfere with word-wrapping (tho it might not be that clear what it should do, then: how should the "word-wrapped space" look like? – Stefan Apr 23 '13 at 21:36
  • The space-mark / word-wrap conflict bug is not present in the current version of Emacs that is available from http://emacsformacosx.com/ I'm switching over to that version instead of Aquamacs because it gives me more options to customize it to my personal preferences. I just need to figure out a few niceties from Aquamacs such as the right click contextual menu . . . . and I'll see if I can debug the Aquamacs tabbar and incorporate that into the current version. – lawlist Apr 24 '13 at 05:47
1

The nightly builds of Emacs / Aquamacs have fixed this issue.

lawlist
  • 13,099
  • 3
  • 49
  • 158