Re: About quoting text, about emacs.

2001-07-26 Thread Jens Paulus

On Wed, Jul 25, 2001 at 11:40:11PM -0400, Walt Mankowski wrote:
 ;; Automatically go into mail-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)
 )

What you suggest is quite okay. Thank you.

-Jens






Re: About quoting text, about emacs.

2001-07-26 Thread Walt Mankowski

On Fri, Jul 27, 2001 at 12:20:53AM +0200, Jens Paulus wrote:
 What you suggest is quite okay. Thank you.

I'm glad I could be of help.

Walt

 PGP signature


Re: About quoting text, about emacs.

2001-07-25 Thread Charles Curley

On Wed, Jul 25, 2001 at 03:05:58PM +0200, Jens Paulus muttered:
 Hello,
 
 about a week ago I was posting some questions. Only one of three have
 been replied to until now. That's why I decided to repost the unreplied
 ones again.

Try one subject per message. With Mutt's threading, it may make the
discussion easier.

 
 1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
 text from another email that I'm not currently replying to. I remember
 that there was such a function when I used pine some years ago. Pine's
 builtin editor pico (pine composer) read the contents from an other
 email to the cursor position after hitting a special key combination and
 entering the index number of the email in the current folder. Do you
 know a way to do this with vim and mutt?

Don't now about vim/mutt, but you can run multiple instances of
mutt. Use grepm to select the message(s) from which you wish to
select. You may need to add the quote character yourself.

 
 2.) I'm using vim and don't know too much of emacs. One thing I find
 very useful with vim is that if I want to wrap a very long quoted line
 with width greater than 80 characters and the line begins with the
 quotation character ' ', then I can hit gqap or gqip and I have the
 long line turned to a paragraph that has each line beginning with the
 quotation character ' ' and has width of 'textwidth' variable which is
 usually set to 72 characters. Do you know if there is such a function in
 emacs, too?

Yes. In Emacs, C-h v fill-column shows how to set the column number
for wrapping. Then M-q runs fill-paragraph. C-h f fill-paragraph for
details.

You may want to look into text mode for serious editing. And don't
forget to run M-x ispell-region on your replies.

-- 

-- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
 PGP signature


Re: About quoting text, about emacs.

2001-07-25 Thread John Arundel

On 2001-07-25 at 15:05:58, Jens Paulus warbled:
 1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
 text from another email that I'm not currently replying to.

If there is a smart way to do this in mutt, I don't know it. I normally
just:

* Exit the editor
* Postpone the mail with Shift-P
* Go find the mail I want to quote
* Hit 'reply' to quote the text
* Select the text in xterm (or with screen's copy function)
* Recall the postponed mail
* Paste in

Alternatively, you could save the received mail to a file and then read
it into vim at the cursor with :r file.

That'd be one big macro ;) Any better suggestions?

Dastardly
--
My roommate lost his pet elephant. It's in the apartment somewhere.
  - Steven Wright
_
  I prefer encrypted mail (see headers for PGP key)
Why encrypt? http://www.heureka.clara.net/sunrise/pgpwhy.htm
_

 PGP signature


Re: About quoting text, about emacs.

2001-07-25 Thread Greg Matheson

On Wed, 25 Jul 2001, John Arundel wrote:

 On 2001-07-25 at 15:05:58, Jens Paulus warbled:
  1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
  text from another email that I'm not currently replying to.

 If there is a smart way to do this in mutt, I don't know it. I normally
 just:

 * Exit the editor
 * Postpone the mail with Shift-P
 * Go find the mail I want to quote
 * Hit 'reply' to quote the text
 * Select the text in xterm (or with screen's copy function)
 * Recall the postponed mail
 * Paste in

There is a perl module called Mail::Folder that has subroutines
for reading from mbox and maildir folders. You have to specify
the number of the message in the folder. This makes it easy, if
you know some perl, to write a little perl script that you could
use in vim, like:
:r !readmsg.pl Inbox 4
But the old elm readmsg had the capability of pattern searching,
as well.

Another approach would be to write a vim function. You would have
to divide up a mbox folder file on the basis of /^From / lines,
for example.

I have to investigate the perl Mail::Folder approach.


-- 
Greg MathesonRather than do things right,
Chinmin College, Do the right thing. 
Taiwan   



Re: About quoting text, about emacs.

2001-07-25 Thread David Ellement

On 010725, at 15:05:58, Jens Paulus wrote
 1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
 text from another email that I'm not currently replying to.

Assuming you know which messages you want to quote before starting
your reply, you can tag all the messages before starting your reply.
Each message will appear quoted in your editor separated by a blank
line.  However, mutt doesn't keep track of the tag order, and for
mbox folders at least, the reply goes to the first message in the
folder.

(A workaround is to copy the message you want to reply to into a
temporary folder, then copy all the messages you want to quote,
change to the temporary folder, tag all, then reply).


Historical note: circa mutt 0.80, Don Blaheta worked on a patch to
control tag order.  But he didn't quite finish, and no one else
picked up where he left off.

-- 
David Ellement



Re: About quoting text, about emacs.

2001-07-25 Thread Holger Lillqvist

On Jul 25, David Ellement wrote:
 However, mutt doesn't keep track of the tag order, and for
 mbox folders at least, the reply goes to the first message in the
 folder.

Actually, the reply goes to the senders of _all_ the tagged messages.
With edit-headers this is no big problem, though.

The order of the tagged and quoted messages is affected by the sort
mailbox commands; I've found reverse-threads useful for this purpose.

Holger



Re: About quoting text, about emacs.

2001-07-25 Thread Dominique Pelle

On Wed, Jul 25, 2001 at 03:05:58PM +0200, Jens Paulus ([EMAIL PROTECTED]) wrote:

[...cut...]

 1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
 text from another email that I'm not currently replying to. I remember
 that there was such a function when I used pine some years ago. Pine's
 builtin editor pico (pine composer) read the contents from an other
 email to the cursor position after hitting a special key combination and
 entering the index number of the email in the current folder. Do you
 know a way to do this with vim and mutt?

[...cut...]

OK, this is not exactly what you ask (inserting
content of another mail into vim) but it might be an
alternative.

How about attaching another mail to the email you want
to send?

From the send menu (before sending your email), press
'A' (uppercase A bound to the attach-message function)
to attach another mail. You will be prompt for a
mailbox. Then you need to tag 't' the message(s) that
you wish to attach. Once you're done, press 'q' to go
back to the send menu.

Hope that helps.
-- Dominique



Re: About quoting text, about emacs.

2001-07-25 Thread David Ellement

On 010725, at 10:27:57, rex wrote
 What's wrong with starting another instance of mutt, finding the
 message to be inserted, and pasting selected regions in the editor
 window?

Nothing.  However, if mutt does it, it adds an attribution line (for
each message) and quotes the included text.

-- 
David Ellement



Re: About quoting text, about emacs.

2001-07-25 Thread Greg Matheson

On Wed, 25 Jul 2001, Dominique Pelle wrote:

 On Wed, Jul 25, 2001 at 03:05:58PM +0200, Jens Paulus
 ([EMAIL PROTECTED]) wrote:

 [...cut...]

  1.) Editing an email with vim/mutt, I sometimes wish to insert/quote
  text from another email that I'm not currently replying to. 

 [...cut...]

 How about attaching another mail to the email you want
 to send?

 From the send menu (before sending your email), press
 'A' (uppercase A bound to the attach-message function)
 to attach another mail. 

This puts the messages you tag in a separate attachment, rather
than in the body of the text you are now editing. However
you CAN pipe them in this special attach-message screen to cat,
to add them to the end of the message you are now editing, IF you
know the name of the temporary file your editor is editing the
message under. This can be all made 2 macros: one to rename the
temporary file to a standard name, and open the attach-message
screen and the second one to cat them to this newly named
temporary file.

However, when I lost these macros, I never rewrote them. I just
copy the stuff I want to add to a temporary folder and then read
it in my editor again. 

I think the best answer of how to do this without opening a
second instance of mutt and cutting and pasting is to write some
function to do it in your editor, or use something like readmsg.


-- 
Greg MathesonRather than doing things right,
Chinmin College, Doing the right thing. 
Taiwan   



Re: About quoting text, about emacs.

2001-07-25 Thread Jens Paulus

On Wed, Jul 25, 2001 at 03:25:15PM +0100, John Arundel wrote:
 Alternatively, you could save the received mail to a file and then read
 it into vim at the cursor with :r file.

That's how I used to do it until now.

-Jens





Re: About quoting text, about emacs.

2001-07-25 Thread Jens Paulus

On Wed, Jul 25, 2001 at 04:04:04PM +0100, John Arundel wrote:
 The only nice way I can think of for integrating this into mutt would be
 to have an 'append quoted message to postponed message' function.
 
 For example:
 * When writing a reply, you realise you want to quote another mail too
 * Postpone the reply, and go find the mail in question using mutt's mighty
   searching features
 * Hit 'append-quoted to postponed' key (you may need to select the
   postponed message to append to, if you have more than one)
 * Recall the postponed message and you find the required text, quoted,
   at the bottom

This idea sounds cool to me. In my imagination this shouldn't be too
difficult to make it real.

Regards,

-Jens





Re: About quoting text, about emacs.

2001-07-25 Thread Jens Paulus

On Wed, Jul 25, 2001 at 08:18:35AM -0600, Charles Curley wrote:
 On Wed, Jul 25, 2001 at 03:05:58PM +0200, Jens Paulus muttered:
  quotation character ' ', then I can hit gqap or gqip and I have the
  long line turned to a paragraph that has each line beginning with the
  quotation character ' ' and has width of 'textwidth' variable which is

 Yes. In Emacs, C-h v fill-column shows how to set the column number
 for wrapping. Then M-q runs fill-paragraph. C-h f fill-paragraph for
 details.

The fill-paragraph function does only adjust the line to the given
number of columns, if I see it right. What I want is that each line
begins with the quotation character before and after the wrapping
action. But maybe the best thing is if I keep using vim in combination
with mutt, I then have less problems.

Regards,

-Jens





Re: About quoting text, about emacs.

2001-07-25 Thread David Champion

On 2001.07.25, in [EMAIL PROTECTED],
Jens Paulus [EMAIL PROTECTED] wrote:
 On Wed, Jul 25, 2001 at 10:44:11AM -0700, Dominique Pelle wrote:
  How about attaching another mail to the email you want
  to send?
 
 I know about this attach-message function. The disadvantage is that the
 attached text is not in the current text and thus cannot be edited or
 cut or referred to sentence by sentence. Also, the attach-message
 function includes the message's header whether you want it or not. If it
 wouldn't, it won't be a message anymore.

What if there were a merge-components function in the compose menu,
such that you could tag 2 or more components (attachments), call this
function, and have those tagged components merged as one?

Would this (a) solve the immediate problem, and (b) be more generally
useful?

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago