[comp.windows.x] Hard <CR> in Text widgets?

strauss@aerospace.aero.org (Daryll Strauss) (01/11/90)

My Xmh composition window is wider than 80 characters. In R3, Xmh would
nicely reformat my text to be 80 characters and only only place carrige
returns where I placed them. It appears that under R4, the reformatting
is also being done to 80 characters, but carrige returns are also being
placed at the end of each line in the window. This means my text comes
out looking really strange with a line of 80 characters followed by a
line of (width-80) characters. Was this intentional? How can I avoid it?

						TIA,
						- |Daryll

-------------------------------------------------------------------------------
Daryll Strauss          			f	The Aerospace Corp.
strauss@aero.org		      		n	Mail Stop: M1-102
...!uunet!aero.org!strauss			o	P.O. Box 92957
                                                r       Los Angeles, Ca. 90009
Suggestions for a quote to the address above.	d	(213) 336-9358
-------------------------------------------------------------------------------

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (01/13/90)

> My Xmh composition window is wider than 80 characters. In R3, Xmh would
> nicely reformat my text to be 80 characters and only only place carrige
> returns where I placed them. It appears that under R4, the reformatting
> is also being done to 80 characters, but carrige returns are also being
> placed at the end of each line in the window. This means my text comes
> out looking really strange with a line of 80 characters followed by a
> line of (width-80) characters. Was this intentional? How can I avoid it?

Xmh puts the Text widget into "autoFill" mode by default.  This will cause the
text to automatically put a carridge return into a line when you are typing, but
it will not put it in at any other time, such as when inserting a file, or
pasting in text with click-middle.  Wrap mode, which will wrap the displayed
text at a word boundry w/o actually modifing the text of the buffer, has been
disabled.

The reason for this change is so that the text on your xmh display will now look
exactly the same on your screen as it will when you send out the message.  Since
xmh now has horizontal scrolling (activated only when the text is wider than the
window) there little need to have a window wider than eighty characters.

Can you change this behavior?

Sure, take a look at the R4 Athena widget docs and the Xmh app-defaults file for
the current defaults set by xmh.  This will give you the full story, but the
quick answer is that you probabally want to turn "autoFill" off and set "wrap"
to "word".  This should return you to the broken R3 behavior.