query_command on address completion

2001-07-25 Thread Andy Smith

Hi,

I want to always use the query_command I have set when I use tab to
complete an email address.  At the moment it seems I have to use ^t
instead, how do I make tab do the same thing?

-- 
Andy Smith



Re: query_command on address completion

2001-07-25 Thread Christoph Maurer

Am Mit, 25 Jul 2001, schrieb Andy Smith:

> Hi,
> 
> I want to always use the query_command I have set when I use tab to
> complete an email address.  At the moment it seems I have to use ^t
> instead, how do I make tab do the same thing?

Type the following in your .muttrc

bind editor \t complete-query

Christoph


-- 
Christoph Maurer - Paul-Röntgen-Straße 7 - D - 52072 Aachen
mailto:[EMAIL PROTECTED] - http://www.christophmaurer.de
On my Homepage: SuSE 7.0 on an Acer Travelmate 508 T Notebook



About quoting text, about emacs.

2001-07-25 Thread Jens Paulus

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.

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?

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?

Regards,

-Jens





OT - Filterng folders/archiving

2001-07-25 Thread Duke Normandin


Please CC me, as I'm not subscribed

I've saved a lot of "interesting" messages to various (mbox) folders for
future reference. I want to strip the folders of all the headers before
compressing the folder. I could do this "by hand", but I'm hoping someone
has a better (i.e., faster) solution. TIA...
-- 
-duke
Calgary, Alberta, Canada




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 .

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 John Arundel

On 2001-07-25 at 22:53:24, Greg Matheson warbled:
> 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.

Painful.

> 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.

Equally painful.

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

HONK!
HONK!
HONK!

Sorry, that was my code bloat detector going off.

John
--
"I installed a skylight in my apartment. The people who live
above me are furious."   - 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 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 rex

On Wed, Jul 25, 2001 at 09:08:45AM -0700, David Ellement wrote:
> 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.

What's wrong with starting another instance of mutt, finding the
message to be inserted, and pasting selected regions in the editor window?

-rex
-- 
"If not stopped, the 21 million-plus and growing (Napster & Gnutella)
community could usher in a cultural apocalypse that threatens to plunge
the world into darkness not seen since the turn of the last millennium."
  --Richard Parsons, AOL-Time Warner executive



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



Copy command

2001-07-25 Thread Chris Fuchs


Hi,

The 'C' command in the index copies files to a mailbox and prompts
if it doesn't exist which isn't really the default behaviour I
prefer (would rather it copy to a file).  The same command
in compose menu does copy to a file.  So right now I pipe to
something like this: "tee filename > /dev/null"

It would be nice to create a macro to do this... what do you guys do?

Chris

--
   It is good to have an end to journey toward; but it is the journey
   that matters, in the end -Ursula K. Le Guin




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: Copy command

2001-07-25 Thread David Ellement

On 010725, at 15:28:36, Chris Fuchs wrote
> The 'C' command in the index copies files to a mailbox and prompts
> if it doesn't exist ...
> 
> It would be nice to create a macro to do this... what do you guys do?

unset confirmcreate
(unset confirmappend also)

-- 
David Ellement



Re: Copy command

2001-07-25 Thread Chris Fuchs

on Wed,25 Jul 2001, David Ellement wrote:

> unset confirmcreate
> (unset confirmappend also)

Actually all I wanted to do was to save a message as a file
with a filename that I would get prompted for and not into
a directory.  I'm using the MH style mailboxes.

Chris

--
   An essential aspect of creativity is not being afraid to fail. -Dr.
   Edwin Land




Re: About quoting text, about emacs.

2001-07-25 Thread Jens Paulus

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.

Regards,

-Jens





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 .

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 Walt Mankowski

On Thu, Jul 26, 2001 at 02:16:33AM +0200, Jens Paulus wrote:
> 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.

Emacs will wrap lines with quote characters the way you like, but you
need to be in mail-mode.  To go into mail-mode for a particular
message, enter M-x mail-mode.  If you decide you like it and want to
go into mail-mode for every message you send from mutt, add something
like the following to your .emacs file:

;; 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))

If mutt doesn't store your temp buffers in /tmp/mutt*, edit the path
accordingly.  Once you're in mail-mode, use M-q to reformat a
paragraph.

You'll probably also want to go have your paragraphs wordwrap
automatically while you're editing emails.  You can do that with a
mail-mode-hook:

(add-hook 'mail-mode-hook 'my-mail-mode-hook)

(defun my-mail-mode-hook ()
  (auto-fill-mode)
)

 PGP signature


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



Re: About quoting text, about emacs.

2001-07-25 Thread Thomas Roessler

On 2001-07-26 02:34:54 +0200, Jens Paulus wrote:

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

Well, mutt would not just have to open the postponed folder, but it 
would also have to parse the MIME structure, and find the first 
text/plain attachment so the message can be appended to that.

This would indeed be quite a bit of work, I think.

-- 
Thomas Roesslerhttp://log.does-not-exist.org/