Re: [OT] Emacs and line wrapping (was: Re: About wrapping lines.)
On Thu, May 09, 2002 at 12:09:13PM +0300, Jussi Ekholm wrote: > Yeah, I learnt that already. :-) Now I can use M-q nicely and it does > *just* what I want it to do, so now faar too long lines aren't a > problem for me. Of course, it would be nice if Emacs would wrap 'em > automagicly, but I think I'm not asking for everything and be happy with > the bread crums I already have. O:-) Here's one way to go into auto-fill mode whenever you fire up emacs from mutt. It goes into mail-mode (a major mode like text mode, but with a few more features designed for working with email). It also creates a hook for mail-mode that goes into auto-fill-mode and skips past all the headers (useful if you set edit_headers in your .muttrc). ;; Automatically go into mail-mode and auto-fill-mode if filename starts with ;; /tmp/mutt (setq auto-mode-alist (append (list (cons "^\/tmp\/mutt" 'mail-mode)) auto-mode-alist)) (add-hook 'mail-mode-hook 'my-mail-mode-hook) (defun my-mail-mode-hook () (auto-fill-mode) (mail-text) ) msg27938/pgp0.pgp Description: PGP signature
Re: [OT] Emacs and line wrapping (was: Re: About wrapping lines.)
At 3:41 PM EDT on May 4 Radek Spacil sent off: > On [04/05/02] 18:23, Jussi Ekholm wrote: > > Radek Spacil <[EMAIL PROTECTED]> wrote: > > > On [04/05/02] 12:36, Jussi Ekholm wrote: > > >> I think, that something is wrong with my Emacs, because 'M-x > > >> auto-fill-mode' doesn't start wrapping lines. Or, then the wrong > > >> thing is me -- should I somehow configure auto-fill-mode through > > >> 'customize' or something? It just doesn't wrap the lines... > > When I'm replying to such an email I'm using M-q, but first I have to > make one empty line before and after the part which I cite (emacs would > take whole message as paragraph since even empty lines are prepended > with '>' or something alike). > I recommend filladapt. -- Piratization, n.: The process of giving many public services over to pirates with the thought of more efficient service delivery - heard on Floridian community radio Robert I. Reid | PGP/GPG Keys: http://astro.utoronto.ca/~reid/pgp.html
Re: [OT] Emacs and line wrapping (was: Re: About wrapping lines.)
On [04/05/02] 18:23, Jussi Ekholm wrote: > Radek Spacil <[EMAIL PROTECTED]> wrote: > > On [04/05/02] 12:36, Jussi Ekholm wrote: > >> I think, that something is wrong with my Emacs, because 'M-x > >> auto-fill-mode' doesn't start wrapping lines. Or, then the wrong > >> thing is me -- should I somehow configure auto-fill-mode through > >> 'customize' or something? It just doesn't wrap the lines... > > > > Maybe variable fill-column it too big. You can try to use > > set-fill-column function to set it to something reasonable. > > Try this: C-u 72 C-x f this will set fill-column to 72 > > It said, that fill-column *was* 70, and now it is 72. Weird. Ah well, > I guess I have to live with this. At least it wraps the lines I write > now, although I haven't needed it. But to be sure, I'll keep the > option on. :-) Strange, then the problem is somewhere else. I don't know emacs so well (and lisp at all), so try to consult it in gnu.emacs.help newsgroup. > > You can also press C-q to wrap current paragraph (even outside > > auto-fill-mode). > > Yup (you mean M-q, right?), it does -- but sometimes it acts *very* > weirdly, like wrapping the whole mail instead of just the current > paragraph. Well, I'm not complaining. :-) Ops, of course M-q ;-) > Still -- the answer I was looking for -- I didn't find it. And the > question was, that how can I make Emacs to wrap all lines longer than > specific amount of columns? All, not just the ones I'm writing myself, > because that isn't a problem. The problem is, that sometimes people > write *extremely* long lines (I've noticed, that this usually occurs > when the writer is using Outlook :P); for example, I have one mail in > my inbox, that has such a long lines, that Emacs is displaying one > line on fifteen (15!) lines!. So, is there a way (I'm sure there is, > Emacs haven't let me down yet ;-)) to do this? When I'm replying to such an email I'm using M-q, but first I have to make one empty line before and after the part which I cite (emacs would take whole message as paragraph since even empty lines are prepended with '>' or something alike). Then M-q works fine. Yes it's not perfectly straightforward, but it works for me, since usually I have to erase lot of text I'm replying for anyway. So finally it is not much more work. There is one thing which I don't like. When I press M-q on single looong line, emacs make wrapped paragraph, but only first line is prepended with '>'. The workaround is to write '> ' (with space) also on the second line and press M-q once again. Emacs will add '> 's to all other lines. HTH, Radek -- /---\ | Radek Spacil, research assistant, | | Telecommunication laboratory | | Lappeenranta University of Technology | | www: http://www.lut.fi/~spacil/ | \---/ msg27878/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
01-May-02 at 14:18, Jussi Ekholm ([EMAIL PROTECTED]) wrote : > I know, that Mutt can wrap the lines on pager and such forth, but > what about before it sends the message to editor for replying? I've > set the $smart_wrap, and I searched the manual through with a word > 'wrap', but couldn't find a solution. Or should this be the editor's > job? I just don't like to enable wrapping in Emacs itself, because > I hate it when the editor handles the line length. I'm such a > controllive person... :-) It's an editor's job, not Mutt's. Mutt will deliver exactly what your editor spits out (plus some headers, perhaps). I can't edit something with no wrapping, with words split over two lines. -- Simon White.
Re: [OT] Emacs and line wrapping (was: Re: About wrapping lines.)
Radek Spacil <[EMAIL PROTECTED]> wrote: > On [04/05/02] 12:36, Jussi Ekholm wrote: >> Mike Schiraldi <[EMAIL PROTECTED]> wrote: >>> Okay, grab Rob Reid's post package. >> Hmm, what's this package and where it is located? > > http://www.astro.utoronto.ca/~reid/mutt/ Thanks! > It's a emacs mode for writing emails with mutt. It does color syntax > and some other nice things - also wrapping lines. Check it out! I'm checking it out as I write this mail, and I think I like it; at least the color syntaxing is nice (at least after I customized the colors ;P). >> I think, that something is wrong with my Emacs, because 'M-x >> auto-fill-mode' doesn't start wrapping lines. Or, then the wrong >> thing is me -- should I somehow configure auto-fill-mode through >> 'customize' or something? It just doesn't wrap the lines... > > Maybe variable fill-column it too big. You can try to use > set-fill-column function to set it to something reasonable. > Try this: C-u 72 C-x f this will set fill-column to 72 It said, that fill-column *was* 70, and now it is 72. Weird. Ah well, I guess I have to live with this. At least it wraps the lines I write now, although I haven't needed it. But to be sure, I'll keep the option on. :-) > If this will work, you can add following line to your .emacs file: > >(setq fill-column 72) Thanks, I'll do this right away. > You can also press C-q to wrap current paragraph (even outside > auto-fill-mode). Yup (you mean M-q, right?), it does -- but sometimes it acts *very* weirdly, like wrapping the whole mail instead of just the current paragraph. Well, I'm not complaining. :-) Still -- the answer I was looking for -- I didn't find it. And the question was, that how can I make Emacs to wrap all lines longer than specific amount of columns? All, not just the ones I'm writing myself, because that isn't a problem. The problem is, that sometimes people write *extremely* long lines (I've noticed, that this usually occurs when the writer is using Outlook :P); for example, I have one mail in my inbox, that has such a long lines, that Emacs is displaying one line on fifteen (15!) lines!. So, is there a way (I'm sure there is, Emacs haven't let me down yet ;-)) to do this? -- Jussi Ekholm <[EMAIL PROTECTED]> | GNU/Linux user number 269376 http://erppimaa.cjb.net/~ekhowl/ | ICQ UIN: 156057281 ekh on IRCnet | GnuPG Public Key ID: 1410081E msg27874/pgp0.pgp Description: PGP signature
Re: [OT] Emacs and line wrapping (was: Re: About wrapping lines.)
On [04/05/02] 12:36, Jussi Ekholm wrote: > Mike Schiraldi <[EMAIL PROTECTED]> wrote: > > >> So, is there any way to use this option with emacsclient? Just for the > >> record; I can't handle any Elisp, so I can't handle any of that -- by > >> myself, at least. :-) > > > > Okay, grab Rob Reid's post package. It automatically recognizes mutt > > messages, based on the filename IIRC. It provides a variable, > > post-uses-fill-mode, on by default, which turns on post mode when > > composing a message. > > Hmm, what's this package and where it is located? http://www.astro.utoronto.ca/~reid/mutt/ It's a emacs mode for writing emails with mutt. It does color syntax and some other nice things - also wrapping lines. Check it out! > I think, that something is wrong with my Emacs, because 'M-x > auto-fill-mode' doesn't start wrapping lines. Or, then the wrong > thing is me -- should I somehow configure auto-fill-mode through > 'customize' or something? It just doesn't wrap the lines... Maybe variable fill-column it too big. You can try to use set-fill-column function to set it to something reasonable. Try this: C-u 72 C-x f this will set fill-column to 72 Or in customize find option fill-column. If this will work, you can add following line to your .emacs file: (setq fill-column 72) You can also press C-q to wrap current paragraph (even outside auto-fill-mode). HTH, Radek -- +--+ | Radek Spacil, research assistant,| | WLan project, Telecommunication laboratory | | Lappeenranta University of Technology| | www: http://www.lut.fi/~spacil/| +--+ msg27872/pgp0.pgp Description: PGP signature
[OT] Emacs and line wrapping (was: Re: About wrapping lines.)
Mike Schiraldi <[EMAIL PROTECTED]> wrote: >> So, is there any way to use this option with emacsclient? Just for the >> record; I can't handle any Elisp, so I can't handle any of that -- by >> myself, at least. :-) > > Okay, grab Rob Reid's post package. It automatically recognizes mutt > messages, based on the filename IIRC. It provides a variable, > post-uses-fill-mode, on by default, which turns on post mode when > composing a message. Hmm, what's this package and where it is located? I think, that something is wrong with my Emacs, because 'M-x auto-fill-mode' doesn't start wrapping lines. Or, then the wrong thing is me -- should I somehow configure auto-fill-mode through 'customize' or something? It just doesn't wrap the lines... -- Jussi Ekholm <[EMAIL PROTECTED]> | GNU/Linux user number 269376 http://erppimaa.cjb.net/~ekhowl/ | ICQ UIN: 156057281 ekh on IRCnet | GnuPG Public Key ID: 1410081E msg27871/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
> So, is there any way to use this option with emacsclient? Just for the > record; I can't handle any Elisp, so I can't handle any of that -- by > myself, at least. :-) Okay, grab Rob Reid's post package. It automatically recognizes mutt messages, based on the filename IIRC. It provides a variable, post-uses-fill-mode, on by default, which turns on post mode when composing a message. -- Mike Schiraldi VeriSign Applied Research msg27806/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
Mike Schiraldi <[EMAIL PROTECTED]> wrote: >> job? I just don't like to enable wrapping in Emacs itself, because >> I hate it when the editor handles the line length. > > Just do this: > > set editor="emacs --eval '(turn-on-auto-fill)'" > > and line wrapping will only be turned on when emacs is launched by mutt. Ok, but how this is done when using 'emacsclient'? I have Emacs running as gnuserv in tty8 all the time. When I put the line you adviced me to put, emacsclient tells me this: emacsclient: unrecognized option `--eval' So, is there any way to use this option with emacsclient? Just for the record; I can't handle any Elisp, so I can't handle any of that -- by myself, at least. :-) -- Jussi Ekholm <[EMAIL PROTECTED]> | GNU/Linux user number 269376 http://erppimaa.cjb.net/~ekhowl/ | ICQ UIN: 156057281 ekh on IRCnet | GnuPG Public Key ID: 1410081E msg27800/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
Hi, * David T-G [05/01/02 14:28:43 CEST] wrote: > ...and then Michael Tatge said... > % Jussi Ekholm ([EMAIL PROTECTED]) muttered: > % > I was just wondering, that is it possible for Mutt to wrap the lines > % > before sending the message in the editor when replying? > % > % Nope. > Jussi: I heartily agree with Michael. I wouldn't want to use emacs, > either, but I hear some people prefer it (amazingly) over vim ;-) This > definitely belongs to the editor, though. ,[ ~/.vimrc ]- | vmap ,, :call Justify(62,3) | map ,. Qap/^. `- Cheers, Rocco. msg27781/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
> job? I just don't like to enable wrapping in Emacs itself, because > I hate it when the editor handles the line length. Just do this: set editor="emacs --eval '(turn-on-auto-fill)'" and line wrapping will only be turned on when emacs is launched by mutt. And if you want to use a long line anyway, it's pretty easy to either turn off auto fill mode, or just edit the one line. -- Mike Schiraldi VeriSign Applied Research msg27780/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
begin Jussi Ekholm quotation: > > I was just wondering, that is it possible for Mutt to wrap the lines > before sending the message in the editor when replying? At least Slrn > handles this, and it is quite nice feature indeed. You don't want that anyway, you just think you do. If your editor does the wrapping, you can fix it if it's broken. If Mutt does it, you're stuck; you'll find out the wrapping was broken when you get the confused responses. -- Join the Sergio Brandano Fan Club: http://lists.debian.org/debian-user/1999/debian-user-199910/msg00981.html msg27779/pgp0.pgp Description: PGP signature
gbnet? (was Re: About wrapping lines.)
David T-G ([EMAIL PROTECTED]) muttered: > ...and then Michael Tatge said... > % P.S. please post to [EMAIL PROTECTED] > > Michael: He did, AFAICT. Is there a particular reason you made this note? Strange - now that I look at the headers, it's ok. Somehow the gbnet adresse came up as I hit . Don't know what happend there. Some of these days. Michael -- "Even more amazing was the realization that God has Internet access. I wonder if He has a full newsfeed?" (By Matt Welsh) PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: About wrapping lines.
Hi, all! ...and then Michael Tatge said... % % Jussi Ekholm ([EMAIL PROTECTED]) muttered: % > I was just wondering, that is it possible for Mutt to wrap the lines % > before sending the message in the editor when replying? % % Nope. Jussi: I heartily agree with Michael. I wouldn't want to use emacs, either, but I hear some people prefer it (amazingly) over vim ;-) This definitely belongs to the editor, though. % ... % P.S. please post to [EMAIL PROTECTED] Michael: He did, AFAICT. Is there a particular reason you made this note? % -- % We come to bury DOS, not to praise it. % (Paul Vojta, [EMAIL PROTECTED], paraphrasing a quote of Shakespeare) Heh :-) Hey, I love DOS! HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg2/pgp0.pgp Description: PGP signature
Re: About wrapping lines.
Jussi Ekholm ([EMAIL PROTECTED]) muttered: > I was just wondering, that is it possible for Mutt to wrap the lines > before sending the message in the editor when replying? Nope. > Or should this be the editor's job? Yes. Set $editor to something apropriate. Michael P.S. please post to [EMAIL PROTECTED] -- We come to bury DOS, not to praise it. (Paul Vojta, [EMAIL PROTECTED], paraphrasing a quote of Shakespeare) PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key