Re: save-hook II

1999-09-27 Thread Martin Keseg - Sun Slovakia - SE

David DeSimone ([EMAIL PROTECTED]) wrote :

> Mikko Hänninen <[EMAIL PROTECTED]> wrote:
> >
> > The problem here is that the default behaviour for mutt for the save
> > command (using the user's username from the email address) can not be
> > re-established in any way once you have specified a default save-hook
> > (save-hook .  +folder, or using ~A, or whatever).
> 
> Is that true?  The manual lists the following expando:
> 
>   %O  (_O_riginal save folder) Where mutt would formerly have stashed
>   the message:  list name or recipient name if no list
> 
> It seems like a rule like this could be made to work:
> 
> save-hook . =%O
> 
Hi,

yes this is exactly what I need. You can define for example this:

folder-hook . 'save-hook .* =%O'
folder-hook +work 'save-hook .* =work-done'

so if you are in folder =work every save will be have default filename set to
=work-done

btw which manual do you using ? http://www.mutt.org/doc/manual/ ?
-- 
Keso
  be smart,
   don't be retard!



Re: save-hook II

1999-09-27 Thread Mikko Hänninen

David DeSimone <[EMAIL PROTECTED]> wrote on Mon, 27 Sep 1999:
> save-hook . =%O

Without trying that out, if it works, it's exactly what I was after.
Thanks. :)


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
No computers were harmed during the creation of this email.



Re: save-hook II

1999-09-27 Thread David DeSimone

Mikko Hänninen <[EMAIL PROTECTED]> wrote:
>
> The problem here is that the default behaviour for mutt for the save
> command (using the user's username from the email address) can not be
> re-established in any way once you have specified a default save-hook
> (save-hook .  +folder, or using ~A, or whatever).

Is that true?  The manual lists the following expando:

  %O  (_O_riginal save folder) Where mutt would formerly have stashed
  the message:  list name or recipient name if no list

It seems like a rule like this could be made to work:

save-hook . =%O

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: save-hook II

1999-09-27 Thread Mikko Hänninen

David DeSimone <[EMAIL PROTECTED]> wrote on Mon, 27 Sep 1999:
> For instance, perhaps I am reading mail in my mutt-users folder.  Then
> something jogs my memory, and I realize I need to send mail to my friend
> Joe.  Are you saying that, just because I am viewing mail in my
> mutt-users folder, that my letter to Joe should be saved there instead
> of my usual Fcc?

No, I'm not saying that.  The question was about save-hooks, not
fcc-hooks.

Then again, I can see there being a need to save a FCC to a different
folder than the default when sending mail related to mails in a specific
folder, but that can probably be accomplished with properly crafted
send-hooks.  It would be quite impossible for mutt to determine whether
mail sent while viewing a specific folder was "related" to that folder
or not.

> You see, it shouldn't matter what folder you're in.  You should be able
> to construct a send-hook that triggers on real information, such as whom
> the letter is two, or from, or Cc'd to.

Correct, for send-hooks.

> If you're in your mutt-users folder, and the
> mail that you now send is related to that mailing list, then that
> address probably appears in the headers, and so you should be able to
> construct an fcc-hook or save-hook that does what you want.

Ahh, but I can see more complex issues for constructing save-hooks
than that.  You see, procmail and other mail filtering tools allow for
a very complex methods of filtering.  Mostly these are header-based,
but they can also be based on filtering programs or other rules based
on program output.  Therefore it's entirely possible that Mutt can't
reproduce the rule why a given message was sorted to a particular
folder.  And so you can't have a simple save-hook that could follow
the same rule.  Thus, you need folder-specific save-hooks for messages
in that folder.  Currently the only way to do that is with setting a
save-hook from a folder-hook, but that has the drawback that you can't
undo it.

Admittedly this is a rare case, so it can be argued that the need for
such functionality is not worth adding.

Mutt doesn't allow for "undoing" of hooks.  That's fine, I can
appreciate that it would be too complex to try to keep record of
different states.  You can only "re-do" hooks.  The problem here is
that the default behaviour for mutt for the save command (using the
user's username from the email address) can not be re-established in
any way once you have specified a default save-hook (save-hook .
+folder, or using ~A, or whatever).  The only way to avoid that is
never to establish a default save hook, but this limits you so that
you don't have a complete freedom to define save-hooks which behave
exactly like you'd want.

Maybe then the desired solution would be to have a "magic save-hook"
that re-establishes the default behaviour?  Or is such a thing already
possible, if "save-hook ~l =%B" works?  All that would be required is
to have a %-variable which could be substituted for the username, and
it would be possible to use "save-hook . =%u" to restore the default
behaviour (using %u in this example).


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
Today is the last day of your life so far.



Re: save-hook II

1999-09-27 Thread David DeSimone

Mikko Hänninen <[EMAIL PROTECTED]> wrote:
>
> I've asked this before.  Since nobody has answered, I think it means
> it can't be done.  Once you've established a default save hook, you
> can't get rid of it, you can only change it (?).

I think that's right.

> The proper solution would probably be to have a pattern-matching
> operator which could be used to match folders.  Then there would be
> even no need to set save-hooks from from folder-hooks.

I feel the need to take issue with this.  The reason that Mutt doesn't
work this way is that the Mutt designers didn't expect that you would
need to be able to do this.  And in thinking about it, I can't determine
why you need to do this, either.

For instance, perhaps I am reading mail in my mutt-users folder.  Then
something jogs my memory, and I realize I need to send mail to my friend
Joe.  Are you saying that, just because I am viewing mail in my
mutt-users folder, that my letter to Joe should be saved there instead
of my usual Fcc?  Why?  The letter has nothing to do with Mutt.  I just
happened to be looking at that folder when I sent the message.

You see, it shouldn't matter what folder you're in.  You should be able
to construct a send-hook that triggers on real information, such as whom
the letter is two, or from, or Cc'd to.  That should determine what its
disposition should be.  If you're in your mutt-users folder, and the
mail that you now send is related to that mailing list, then that
address probably appears in the headers, and so you should be able to
construct an fcc-hook or save-hook that does what you want.

Anyway, that's how I see it.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: save-hook II

1999-09-27 Thread Mikko Hänninen

Martin Keseg - Sun Slovakia - SE <[EMAIL PROTECTED]> wrote on Mon, 27 
Sep 1999:
> yes, this is simple, but I want to keep "default" behavior, which is save mail to
> folder with name "=from.who".

I've asked this before.  Since nobody has answered, I think it means
it can't be done.  Once you've established a default save hook, you can't
get rid of it, you can only change it (?).

The proper solution would probably be to have a pattern-matching operator
which could be used to match folders.  Then there would be even no need
to set save-hooks from from folder-hooks.


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
"I have an inferiority complex, but it isn't a very good one."



Re: Number of Lines

1999-09-27 Thread David DeSimone

Brendan Cully <[EMAIL PROTECTED]> wrote:
>
> There is unfortunately no way to get a line count from the server
> without downloading the messages.  But, you can see the size of the
> messages in bytes.  Change your $index_format variable to use
> something like (%4c) instead of (%4l).

On a related note, it is interesting that Mutt will display one value
for this expander (%c) in the index, before the message has been viewed,
and another (smaller) value, after it has been viewed.  It seems that
the server gives one value when the folder is scanned, then Mutt
calculates a different value for the message size (probably without
headers) for the message after it has been downloaded.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: save-hook II

1999-09-27 Thread Martin Keseg - Sun Slovakia - SE

Staffan Hamala ([EMAIL PROTECTED]) wrote :

> On Mon, 27 Sep 1999, Martin Keseg - Sun Slovakia - SE wrote:
> 
> > I define one save-hook (folder-hook +work 'save-hook .* =work-done') and when I
> > change to another mailbox save-hook is still =work-done. I find, that I can
> 
> You have to set a default for mutt to change back after you've visited a
> folder with a special folder hook.
> An example from my muttrc:
> 
> folder-hook . 'save-hook . =saved-mail'
> folder-hook =FIXNEED$ 'save-hook . =fixed'
> 
> This makes 's' save mails into the folder saved-mail in all folders except
> the FIXNEED folder.
> 
> /Staffan

yes, this is simple, but I want to keep "default" behavior, which is save mail to
folder with name "=from.who".
-- 
Keso
  be smart,
   don't be retard!



Re: save-hook II

1999-09-27 Thread Staffan Hamala

On Mon, 27 Sep 1999, Martin Keseg - Sun Slovakia - SE wrote:

> I define one save-hook (folder-hook +work 'save-hook .* =work-done') and when I
> change to another mailbox save-hook is still =work-done. I find, that I can

You have to set a default for mutt to change back after you've visited a
folder with a special folder hook.
An example from my muttrc:

folder-hook . 'save-hook . =saved-mail'
folder-hook =FIXNEED$ 'save-hook . =fixed'

This makes 's' save mails into the folder saved-mail in all folders except
the FIXNEED folder.

/Staffan



Re: .saves-{pid}-{machine} files

1999-09-27 Thread Thomas Roessler

On 1999-09-24 14:01:39 -0400, Alec Habig wrote:

>  .saves-1074902-budoe.bu.edu

> This isn't the editor temporary file (this current editing session is
> mutt-1093277), but rather is a file which contains the names of the
> edited mail messages.  The current one looks like

These files are not generated by mutt.




Re: segmentation fault

1999-09-27 Thread Thomas Roessler

On 1999-09-25 19:31:24 +0200, peter pilsl wrote:

> I was using mutt for a long time without any problems. A few days
> ago I decided to upgrade to mutt1.0pre2i and now I am doomed.

There have been several reports of this kind of bug before.
Typically, they were caused by incomplete or incorrect glibc 2.1
updates.





save-hook II

1999-09-27 Thread Martin Keseg - Sun Slovakia - SE

hi

I have still probl. with save hook.

I define one save-hook (folder-hook +work 'save-hook .* =work-done') and when I
change to another mailbox save-hook is still =work-done. I find, that I can
define save-hook to ~f or ~F but it's not good. Example:
if From adress is "Mutt Users <[EMAIL PROTECTED]>" ~f offers save to "Mutt
Users <[EMAIL PROTECTED]>" and ~F offers Mutt Users and I need set save-hook
to mutt-users.
-- 
Keso
  be smart,
   don't be retard!



Re: Error building mutt

1999-09-27 Thread Heinz Diehl

On Sun Sep 26 1999, Heinz Diehl wrote:

>   can not guess host type: you must specify one

I'm quoting myself here, the solution to this problem is
trivial, the GCC-2.95.x install routines does not create a
simple link "cc" to "gcc" :)

~ hd