Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!LF-SERVER-2.BBN.COM!jr From: jr@LF-SERVER-2.BBN.COM (John Robinson) Newsgroups: comp.emacs Subject: Re: fixing a file Message-ID: <8801112109.AA02920@ucbvax.Berkeley.EDU> Date: 11 Jan 88 20:49:58 GMT References: <21226@yale-celray.yale.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: jr@ALEXANDER.BBN.COM Organization: The ARPA Internet Lines: 45 >> In article <890@uop.edu>, clmebri@uop (Brian Joseph Maiorella) writes: >> > >> > I posted an article asking for help because emacs was "chopping off lines. >> > >> > I have a rather large file that should have been created in auto-fill-mode >> > Every line in this file is cut as shown below: >> > This is an example of a line in the middle of a para/ >> > graph. If you mean a literal slash character in the file, then something like a query-replace-regexp of "\/^J " with "" ought to do it. If there is no extra character at the broken word aside from the newline and whitespace, you could still do it qith query-replace, but it'd be more tedious (would visit every line). >> I have a related query. When typing in auto-fill-mode, words that run >> beyond the right edge of the window are wrapped around AFTER you've finished >> typing the entire word. Is there any way to have them wrap down to the next >> line as soon as you type the (right-edge + 1)'th character? I.e., is there >> any way, when typing Brian's example, to avoid seeing the "para/ >> graph" >> phenomenon even temporarily, but instead having "parag" wrapped around as >> soon as you type the "g"? There's a tradeoff. SHould emacs check for wrapping as each character is typed, or only when white space is typed. Emacs does the latter. Since the whitespace can be typed anywhere, wrapping of 2X too long lines still works. If you check on every character but only do an equal comparison on the fill column, you have the problem when you glue together a too-long line. Obviously checking for wrapping on each character means you have to work more on each character. What I do is type a space when I want a long line to get broken, then immediately erase it. Also, if it is convenient, meta-Q will just do it for you anytime (fixing the whole paragraph while it's at it). Also, I tend to have my window a whole lot wider (80) than my fill column (70). Finally, when I am typing into the front or middle of a long line, I tend to break it first (control-O) so that the portion to the right of the cursor doesn't have to move over each character, and into the wrapped line, as I type; an automatic filler would have to check the entire line every time to solve this case - can be done, but it's a lot more work. /jr jr@bbn.com or jr@bbn.uucp