Re: hook to set Content-Type after editing

2012-12-05 Thread Michael Elkins

On Wed, Dec 05, 2012 at 01:34:29PM +, ed wrote:

I have a weird setup where any UTF message causes me to create a
Content-Type of text/plain; 8bit, unknown. Is it possible to make a
hook which sets the Content-Type to text/plain; 8bit, us-ascii after
editing? I figure this should be simpler than correcting the underlying
problem in this particular environment.


If there are non-ascii characters in the message, then us-ascii 
would not be the appropriate charset.  The default value of 
$send_charset is us-ascii:iso-8859-1:utf-8, which causes Mutt to 
try and convert your message to the first charset in that list 
that is applicable.


To answer your question, there is no hook for changing the content 
type.  You would have to manually edit it.


Re: hook to save all msgs in folder A to folder B?

2011-12-15 Thread Patrice Levesque


 Let's say I want to save to folder Spam.spam all the messages that
 have landed in folder Spam.unsure no matter who they're from or to.
 Or most, or even some of the messages.  [...] In other words I'm
 looking for a save-hook or fcc-save-hook based on specific folders
 alone, not on message properties, unless the message-properties
 applied to all messages.

The way I solved spam message manipulation does not involve hooks but
macros and might work for you.

First, I bind a save-to-spam-folder macro; in .muttrc:

macro index S s=Spam.spam\n
macro pager S s=Spam.spam\n

(“S” is arbitrary; by default bound to `skip-quoted` which I don't use).

So “Shift-S” moves the current mail message to the Spam.spam folder.

In my Spam.unsure folder, if I find no ham, I can flush everything by
matching all messages (“Shift-T“ then “.”, enter) then « S ».



-- 
 --|--
|
Patrice Levesque
 http://ptaff.ca/
mutt.wa...@ptaff.ca
|
 --|--
--


signature.asc
Description: Digital signature


Re: hook to save all msgs in folder A to folder B?

2011-12-15 Thread rj
On Thu 15 at 06:32 AM -0500, Patrice Levesque mutt.wa...@ptaff.ca wrote:

   macro index S s=Spam.spam\n
   macro pager S s=Spam.spam\n

Thank you!  That did the trick.  I asked in terms of hooks because
I thought there might be one of those percent sequences that worked on
folders or some such.

Btw, you can shorten the above to:

macro index,pagers S s=Spam.spam\n


-- 
  Hi!  I'm a .signature virus! Copy me into
your ~/.signature to help me spread!


pgps0ynRWYQpD.pgp
Description: PGP signature


Re: hook to save all msgs in folder A to folder B?

2011-12-15 Thread rj
On Thu 15 at 06:32 AM -0500, Patrice Levesque mutt.wa...@ptaff.ca wrote:

   macro index S s=Spam.spam\n
   macro pager S s=Spam.spam\n

Thank you!  This does the trick.  I asked in terms of a hook because
I assumed there was one of those percent-sign-whatever sequences that
would work per folder, but maybe not.

Btw, you can shorten the above to this:

macro index,pager S s=Spam.spam\n



pgpqix99UkGQN.pgp
Description: PGP signature


Re: hook to save all msgs in folder A to folder B?

2011-12-15 Thread rj
On Thu 15 at 03:19 PM -0500, rj r...@panix.com wrote:

 Btw, you can shorten the above to:
   macro index,pagers S s=Spam.spam\n

Correction: that should be:

macro index,pager S s=Spam.spam\n




pgpiUEqgbbFO3.pgp
Description: PGP signature


Re: hook to save all msgs in folder A to folder B?

2011-12-14 Thread rj
On Thu 15 at 01:37 AM -0500, rj r...@panix.com wrote:

 Let's say I want to save to folder Spam.spam all the messages that have
 landed in folder Spam.unsure no matter who they're from or to.

Or most, or even some of the messages.

 What would a hook to do this look like?

In other words I'm looking for a save-hook or fcc-save-hook based on
specific folders alone, not on message properties, unless the
message-properties applied to all messages.



pgpovliprTaAU.pgp
Description: PGP signature


Re: hook syntax (was: Multiple accounts (using Gmail))

2009-03-05 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday, March  5 at 08:25 AM, quoth Bill Moseley:
On Thu, Mar 05, 2009 at 01:54:26AM -0600, Kyle Wheeler wrote:
 My point was that if you use some sort of hook for setting the From 
 header, you can use that same hook for changing whatever settings.

 Ok, so I have this working to change my signature and from header 
 when replying to a message sent *to* my gmail account (regardless of 
 which folder the mail is in).

Right then, you can use that to change your smtp_url at the same time.

 I'm not 100% clear on the syntax -- that is, when I have to quote 
 (the unmy_hdr line seems to work w/o the quotes where the set 
 signature requires the single quotes).

It's an issue of parsing. Mutt re-parses (and thus de-quotes) hook 
commands when they are triggered. This allows for lots of complex 
embedding, but can result in some confusion.

So, doing something like 'unmy_hdr From', no matter how many times you 
re-parse that, it looks the same. On the other hand, something like 
'set signature=echo foo|' will change as it gets re-parsed. Let's 
take your examples:

reply-hook . unmy_hdr From

When the hook is established (i.e. read from the file), it will be 
understood as:

 reply-hook
 .
 unmy_hdr
 From

And when it gets triggered, it will be understood as

 unmy_hdr
 From

reply-hook . 'set signature=echo Bill Moseley; echo mose...@hank.org|'

When it gets established:

 reply-hook
 .
 set signature=echo Bill Moseley; echo mose...@hank.org|

And when it gets triggered, it will be understood as:

 set
 signature=echo Bill Moseley; echo mose...@hank.org|

Compare that to what happens if you leave off the first set of quotes, 
like this:

 reply-hook . set signature=echo Bill Moseley; echo mose...@hank.org|

When that gets established, it will be understood as:

 reply-hook
 .
 set
 signature=echo Bill Moseley; echo mose...@hank.org|

And then when it gets triggered, it will be understood as:

 set
 signature=echo
 Bill
 Moseley;
 echo
 mose...@hank.org|

Do you see how that can lead to trouble?

But, then I have a new problem:

reply-hook seems to override the folder-hook, right?

All hooks override all other hooks, if that makes any sense. It works 
in a last hook wins method.

So this reply-hook takes precedence over the folder-hook.

Yes.

reply-hook . 'set signature=echo Bill Moseley.; echo mose...@hank.org|'

folder-hook =lists.mutt 'set signature=$HOME/.signature_mutt'

How can I have a signature take precedence over the reply-hook
when in the mutt folder?

Use the folder-hook to change the reply-hook (or something the 
reply-hook relies on).

Do I have to nest the reply-hook inside a folder-hook?  And if so, can
someone provide an example of they syntax?

Yes... but the problem is that you're using a folder-hook for 
something it was never intended to be used for. Using the folder-hook  
to change your signature is like using the message-hook to change the 
subject line of future composed messages... you *can*, but it's going 
to be difficult to get right.
I think it makes far more sense to base that sort of information on 
who you're sending to than on what folder you happen to be looking at. 
And, when you do that, the solution ends up being fairly simple. For 
example:

 reply-hook . \
'set signature=~/.standardsig.txt'

 reply-hook '~e owner-mutt-us...@mutt.org' \
'set signature=~/.muttsig.txt'

Yes, you *can* embed reply-hooks in folder-hooks, but then things get 
ugly because you'd need to unhook things (the unhook is there to 
prevent mutt from building up absurdly long chains of redundant 
hooks), which interacts badly with any other reply-hooks you happen to 
have (i.e. they'd need to be re-established within the folder-hook 
too):

 folder-hook . \
 'unhook reply-hook ; \
  reply-hook . set signature=stdsig.txt; \
  reply-hook ~C m...@gmail set signature=gmailsig.txt'

 folder-hook =lists.mutt \
 'unhook reply-hook ; \
  set signature=muttsig.txt'

Does that make sense?

~Kyle
- -- 
Necessity is the plea for every infringement of human freedom. It is 
the argument of tyrants; it is the creed of slaves.
-- William Pitt the Younger
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkmwIKkACgkQBkIOoMqOI16F3wCg40KmBjyLSgAXerrmZ9ofAPXI
QZIAoOmwav8HyeXtVHaZ4jBjr25tYCFq
=T0B0
-END PGP SIGNATURE-


Re: hook syntax (was: Multiple accounts (using Gmail))

2009-03-05 Thread Bill Moseley
On Thu, Mar 05, 2009 at 12:57:45PM -0600, Kyle Wheeler wrote:
 
  reply-hook . \
 'set signature=~/.standardsig.txt'
 
  reply-hook '~e owner-mutt-us...@mutt.org' \
 'set signature=~/.muttsig.txt'
 
 Yes, you *can* embed reply-hooks in folder-hooks, but then things get 
 ugly because you'd need to unhook things (the unhook is there to 
 prevent mutt from building up absurdly long chains of redundant 
 hooks), which interacts badly with any other reply-hooks you happen to 
 have (i.e. they'd need to be re-established within the folder-hook 
 too):
 
  folder-hook . \
  'unhook reply-hook ; \
   reply-hook . set signature=stdsig.txt; \
   reply-hook ~C m...@gmail set signature=gmailsig.txt'
 
  folder-hook =lists.mutt \
  'unhook reply-hook ; \
   set signature=muttsig.txt'
 
 Does that make sense?

Yes, I think so.  I'll simply change my folder-hook to be a send-hook
and place it after my other send-hook lines.

Thank you very much for explaining all of that.

-- 
Bill Moseley.
mose...@hank.org
Sent from my iMutt


Re: Hook for changing msmtp account

2008-02-27 Thread Nicolas KOWALSKI
Salvatore Iovene [EMAIL PROTECTED] writes:

 I use mutt+msmtp and want to use a different msmtp account according
 to what my From: is.

 How can I do this?

In my ~/.muttrc, I have:

#
# Mail sending
#
set sendmail=/usr/bin/msmtp
set use_envelope_from=yes
set use_from=yes


In my ~/.msmtprc, I have:

#
# main account
#
account mainaccount
host smtp.isp.tld
from [EMAIL PROTECTED]

#
# another
#
account anotheraccount
host smtp.isp2.tld2
from [EMAIL PROTECTED]

#
# specify default
#
account default : mainaccount



This works well.

-- 
Nicolas


Re: Hook for changing msmtp account

2008-02-27 Thread Nicolas KOWALSKI
Salvatore Iovene [EMAIL PROTECTED] writes:

 Yeah, but _which_ smtp server, among the ones defined in the
 .msmtprc file? My doubt comes from the fact that msmtp seems to
 identify the various smtp account by an unique name in the account
 property of the configuration file, and not simply by the used
 From:.

It will choose the account to use based on the envelope from.


 I mean, what if I wanted then to use two smtp servers but same From:
 address?

I suppose you want to choose the smtp server based on the current
folder then. Something like this perhaps (untested):

folder-hook .  'set sendmail=/usr/bin/msmtp --account mainaccount'
folder-hook somefolder 'set sendmail=/usr/bin/msmtp --account anotheraccount'

-- 
Nicolas


Re: hook on tagged attachment?

2007-11-25 Thread Dilip M
On Nov 24, 2007 12:31 AM, Dilip M [EMAIL PROTECTED] wrote:
...snip...

 But when I view the attachment of a email and tag the [text/plain]
 attachment, and press ;  r, the hooks are failing!

In case I haven't given a complete info, here it is.

Version: Mutt 1.5.10i

Hooks I'm using.
send-hook .  'set signature=~/.sig1'
send-hook '~f zyz.com' 'set  sig_on_top=yes; set signature=~/.sig2'
send-hook '!(~f xyz.com)' 'set signature=~/.sig1'

Everything seems to work file. Only when I tag the attached
text/plain format for email, and reply, default hooks are getting
set. How to get the hook work in attach menu?

--
Dilip


Re: hook \\.

2007-10-12 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday, October 12 at 05:53 PM, quoth Joseph:
I'm reading mutt manual and it has an example:

save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
save-hook aol\\.com$ +spam

Why there is a \\.?
I know singe backslash \ turn off special meaning for . 
double backslash would indicate that it is a \ character. 

It's because of mutt's sometimes inscrutable escaping rules. When mutt 
is reading something that isn't quoted, it strips off a level of 
escapes. So the following two lines are equivalent:

 save-hook [EMAIL PROTECTED] +elkins
 save-hook '[EMAIL PROTECTED]'  +elkins

The following two lines are ALSO equivalent:

 save-hook .  foo
 save-hook \. foo

The way mutt's parser works, first it extracts strings to match the 
pattern:

 save-hook string1 string2

Then, string1 is saved as the regular expression that triggers the 
hook, and string2 is saved as the command to run. Mutt un-escapes 
things when interpreting the rc file to extract string1, but the 
backslash has to survive and be present in the regular expression. 
Thus, unless you quote it, you have to use two backslashes.

Consider that you can also use octal escapes:

 save-hook [EMAIL PROTECTED] +elkins

When mutt interprets that, it will store string1 as [EMAIL PROTECTED]. That 
way 
you can encode unusual characters into the muttrc (such as your $from 
or $realname) even if your muttrc can only be in us-ascii (for 
whatever reason).

~Kyle
- -- 
I think we ought always to entertain our opinions with some measure of 
doubt. I shouldn't wish people dogmatically to believe any philosophy, 
not even mine.
-- Bertrand Russell
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFHEBVABkIOoMqOI14RAqBHAKDTEF8bmiUD4QF/fn6964BmsDT9kwCgnf5y
CGsGDAnpFlAGZyz8hPTxLro=
=VQok
-END PGP SIGNATURE-


Re: hook \\.

2007-10-12 Thread David Ellement
On 2007-10-12, I wrote
 On 2007-10-12, Joseph wrote
  Why there is a \\.?
 
 The the muttrc file is read, the first backslash is removed, ...

My apologies to the list for posting this after Mr. Wheeler had posted a
much more informative reply.  Messages are getting delayed in a queue
here today, and it appeared to me that no one had yet replied after
several hours.

-- 
David Ellement


Re: hook \\.

2007-10-12 Thread David Ellement
On 2007-10-12, Joseph wrote
 I'm reading mutt manual and it has an example:
 
 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
 save-hook aol\\.com$ +spam
 
 Why there is a \\.?
 I know singe backslash \ turn off special meaning for . 
 double backslash would indicate that it is a \ character. 

The the muttrc file is read, the first backslash is removed, so the
send-hook then gets stored with the pattern having a single backslash.

-- 
David Ellement


Re: hook au moment du compose?

2003-08-29 Thread Sebastien MICHEL
Le jeudi 28 août 2003 à 17:36, Luc Hermitte a écrit:
 Salut,

haa ça y est mon mail est arrivé sur la liste... il a quand
même mis pres d'une semaine... bizarre car il n'a pas eu
besoin de modération.

 * On Mon, Aug 25, 2003 at 01:25:17PM +0200, Sebastien
 MICHEL [EMAIL PROTECTED] wrote:
  J'ai une petite question. Je voudrais automatiser
  l'attachement dun fichier en fonction du contenu du
  mail que je viens d'ecrire.
  Je n'ai pas trouvé de hook correspondant a ce que je
  veux faire.. une idée ?
 
 Regarder la conversation qu'il y a eu sur
 news:comp.mail.mutt (petit doute sur le nom du groupe)
 au sujet des templates. Ce genre de fonctionnalités a été
 évoqué...

effectivement google est loin de te contredire ;)... je vais
regarder dans cette voix.

 Ou alors filtrer tes messages au moment ou tu les passes à
 sendmail (/exim ?).

j'ai pas la main :/ (sur postfix voyons ! ;p)

 Parce que j'avoue d'être loin de bien connaitre mutt. J'ai
 d'ailleurs découvert (et j'apprécie aujourd'hui) dans tes
 transparents le alternate_order pour le choix des mimes
 prioritaires ; et je cherche toujours un moyen pour ne pas
 être root [EMAIL PROTECTED], mais bien Luc Hermitte
 [EMAIL PROTECTED] quand je réponds aux personnes qui
 écrivent à [EMAIL PROTECTED] seulement -- root étant le
 nom de mon compte sous XP.

J'ai du mal a voir de quoi tu parles. Si tu parles de tes
header avant l'envois du message il suffit des les modifier
avec my_hdr (my_hdr From: Luc Hermitte [EMAIL PROTECTED])
Si malgres ça ton header reste root c'est qu'il est modifié
après l'envoit par sendmail ou autre exchange (qui adore
modifier les emails)

-- 
@+, Sébastien aka. MichouX
 Même le chemin de mille lieues commence par un pas. Aussi
ne crains pas d'être lent, crains seulement d'être à
l'arrêt., Proverbe CHINOIS


Re: hook au moment du compose?

2003-08-29 Thread Sebastien MICHEL

Bon.. ben voila comment je m'en sort:
macro index \cw change-folder=TemplateCandidatureenterresend-message 
Chargement du mail type de Candidature.
Avec un template dans la boite TemplateCandidature.
C'est pas exactement ce que je voulais faire mais bon...
c'est déjà ça.

Autre chose de sympa (inspiré par les toggles de luc sous
vim ;p):
macro index h ':toggle edit_headersenter:set ?edit_headersenter'

-- 
@+, Sébastien aka. MichouX
 Tant que la couleur de la peau sera plus importante que
celle des yeux, nous ne connaîtrons pas la paix.,
Haile Selassie


Re: hook au moment du compose?

2003-08-29 Thread Sebastien MICHEL
Le vendredi 29 août 2003 à 16:10, Luc Hermitte a écrit:
   Ou alors filtrer tes messages au moment ou tu les
   passes à sendmail (/exim ?).
  j'ai pas la main :/ (sur postfix voyons ! ;p)
 
 Tu as toujours la main. 
 P.ex., tu peux te faire un script en ce que tu veux (perl,
 bash, python, ruby, C, ...) qui va détecter une chaine
 bien particulière et quand elle apparait, il ajoute au
 flux qu'il a reçu la partie encodée pour l'attachement que
 tu veux adjoindre. Dernière tâche de cet outil, renvoyer
 ce qu'il a reçu à postfix.

a pas con en changant ma commande sendmail c'est ça ?

 Et en lisant la doc ... message-hook intervient trop tôt
 pour t'être utile ?

Et bien messages-hook est fait pour l'evenement d'affichage
du mail donc il n'a rien avoir avec le moment du compose.

-- 
@+, Sébastien aka. MichouX 
L'énergie usée à atteindre des normes de qualité 
est inversement proportionelle au temps restant 
avant le prochain audit., Olivier Sax


Re: hook-list menu

2002-08-19 Thread Vikram Goyal

On Fri, Aug 16, 2002 at 06:23:02PM +0200, Sven Guckes wrote:
 the distinction between bloat and feature
 are usually subjective to one's preferences.
 
 i doubt that many users will use such a menu.
 besides - what shall this menu offer?
  
 
 Vikram - can you answer these questions for me?
 
Well Gregor answered your questions before I could:-)

The reason I am saying that this thing to be an added functionality is that
hooks and macros are quite a uniq features of mutt and make it a highly
customisable app. It would be really a boon for people who experiment with
these features and can see what they are supplying to mutt and what its
getting.

Sven - just think about it.
-- 
Vikram Goyal [EMAIL PROTECTED]



Re: hook-list menu - add/change/delete/move items?

2002-08-19 Thread Sven Guckes

* Vikram Goyal [EMAIL PROTECTED] [2002-08-19 13:11]:
 The reason I am saying that this thing to be an added
 functionality is that hooks and macros are quite a uniq features
 of mutt and make it a highly customisable app. It would be
 really a boon for people who experiment with these features and
 can see what they are supplying to mutt and what its getting.

 Sven - just think about it.

i certainly understand your point.

and i have been discussing this with someone in Krautland, too.
he wrote a simple patch which simply writes out all hooks to a
file on startup.  (he might also be reading this here on the list.)

but like i said:  i don't mind such a menu.
my creation hooks and color setups would
probably have benefitted from such a menu.
i had to restart mutt a *lot* of times
just trying out a new hook for something.
you probably know the feeling install
a new program and reboot the machine. :-/

anyway, if someone wants to write the code - fine.
i just hope that it also has an answer
to adding/removing and moving hooks...

Sven



Re: hook-list menu

2002-08-16 Thread Sven Guckes

* On Mon, Aug 12, 2002 at 09:50:20PM +0200, Sven Guckes wrote:
 to write these to a file so he can monitor them.
 a menu would be nicer, of course, but... bloat?

* Vikram Goyal [EMAIL PROTECTED] [2002-08-16 12:34]:
 of-course not but an added functionality.

the distinction between bloat and feature
are usually subjective to one's preferences.

i doubt that many users will use such a menu.
besides - what shall this menu offer?

of course, this adds another menu
with default bindings and commands.

i suppose there you would use it to list the rules,
show sublists by pattern, add and remove entries,
and rearrange the order of them, and then maybe
write out the current list to some file.

how much will such a menu add in size?
now, if it can be dis/enabled at compile time
and  if it adds less than, say, 20K, - fine!

then again, should there be a menu foer each kind of hook?
what about mixed hook commands?

Vikram - can you answer these questions for me?

Sven



Re: hook-list menu

2002-08-16 Thread David Ellement

On 020816, at 18:23:02, Sven Guckes wrote
 * On Mon, Aug 12, 2002 at 09:50:20PM +0200, Sven Guckes wrote:
  to write these to a file so he can monitor them.
  a menu would be nicer, of course, but... bloat?
 
 * Vikram Goyal [EMAIL PROTECTED] [2002-08-16 12:34]:
  of-course not but an added functionality.
 
 the distinction between bloat and feature
 are usually subjective to one's preferences.
 
 i doubt that many users will use such a menu.
 besides - what shall this menu offer?

About three years ago, Byrial Jensen had a patch provided hook
menus.  It listed hooks, and allowed one to tag and delete hooks (if
I recall correctly).

-- 
David Ellement



Re: Hook question - making a point

2002-03-18 Thread Jerome De Greef

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-16 14:11]:
BTW, doesn't ..* do the same as .+ ?
   it depends.  really - it all depends on
   the language you currently have available.
  I was talking about Mutt ;)
 
 So was I.  more specifically, I was talking about
 the regular expression library used within mutt.
 
send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
   this should work.  untested, though.
  Just tested it and it doesn't work...
 
 hmm.. the pattern might need quoting:
  send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
 
 try again.  does it work now?

Nope...

Jerome

-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook question - making a point

2002-03-18 Thread Jerome De Greef

Hi,

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 Hi!
 
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-18 08:18]:
   send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
   try again.  does it work now?
  Nope...
 
   send-hook   ~t . 'my_hdr From: JDG [EMAIL PROTECTED]'
   send-hook ! ~t . 'my_hdr From: JDG [EMAIL PROTECTED]'

Yes, this works. But it's not far from what I had:

send-hook '~t .' 'my_hdr From: JDG [EMAIL PROTECTED]'
send-hook !'~t .' 'my_hdr From: JDG [EMAIL PROTECTED]'

Thanks anyway.

Regards,
Jerome

-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook question

2002-03-16 Thread Jerome De Greef

* David T-G ([EMAIL PROTECTED]) wrote:
 Jerome --
 
 ...and then Jerome De Greef said...
 % 
 % I think I have the solution:
 
 Yay!
 
 
 % 
 % send-hook '~t .*' 'my_hdr From: Jerome De Greef [EMAIL PROTECTED]'
 % send-hook !'~t .*' 'my_hdr From: Jerome De Greef[EMAIL PROTECTED]'
 
 Does this work, or do you think it should?  I'd expect that you'd need
 
   ..*
 
 in your patterns instead of just 
 
   .*
 
 'cuz the former is one character plus zero or more characters while the
 latter still accepts none.
 
 Perhaps it works simply because there is a To: header to check versus one
 being absent; in that case, you can probably leave off the asterisk.

It works as is. But you're right, I thought .* was doing what ..* does.
I'm not that good with regular expressions. BTW, doesn't ..* do the same
as .+ ?

Jerome

-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook question - making a point

2002-03-16 Thread Sven Guckes

* Jerome De Greef [EMAIL PROTECTED] [2002-03-16 09:25]:
  % send-hook  '~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
  % send-hook !'~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
  Does this work, or do you think it should?
  I'd expect that you'd need ..* in your
  patterns instead of just .* 'cuz the former is
  one character plus zero or more characters
  while the latter still accepts none.
 
  Perhaps it works simply because there is a To:
  header to check versus one being absent; in that
  case, you can probably leave off the asterisk.

 It works as is. But you're right, I thought .* was
 doing what ..* does.  I'm not that good with regular
 expressions.  BTW, doesn't ..* do the same as .+ ?

it depends.  really - it all depends on
the language you currently have available.

The operator '+' might not be available at all.
But the usual workaround for 1 or more times
of X is to use XX*.

Anyway, if you simply need a default rule for
all addresses then you need to check for just
only  character in the address, right?
Checking for more is simply superfluous.

Also, the pattern in the send-hook command
is applied to the addresses in TO/CC, anyway,
so all you need is to give part of the address:

 send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
 send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'

this should work.  untested, though.

Sven  [who always sends with a replyable address]

-- 
Sven Guckes  [EMAIL PROTECTED]
MUTT SETUP TIPS: http://www.math.fu-berlin.de/~guckes/mutt/setup.html
MUTT HOOKS EXAMPLE:  send-hook .  'set signature=~/.sig.mine'
 send-hook guckes 'set signature='



Re: Hook question - making a point

2002-03-16 Thread Jerome De Greef

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-16 09:25]:
   % send-hook  '~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
   % send-hook !'~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
   Does this work, or do you think it should?
   I'd expect that you'd need ..* in your
   patterns instead of just .* 'cuz the former is
   one character plus zero or more characters
   while the latter still accepts none.
  
   Perhaps it works simply because there is a To:
   header to check versus one being absent; in that
   case, you can probably leave off the asterisk.
 
  It works as is. But you're right, I thought .* was
  doing what ..* does.  I'm not that good with regular
  expressions.  BTW, doesn't ..* do the same as .+ ?
 
 it depends.  really - it all depends on
 the language you currently have available.

I was talking about Mutt ;)

 The operator '+' might not be available at all.
 But the usual workaround for 1 or more times
 of X is to use XX*.
 
 Anyway, if you simply need a default rule for
 all addresses then you need to check for just
 only  character in the address, right?
 Checking for more is simply superfluous.

Right...

 Also, the pattern in the send-hook command
 is applied to the addresses in TO/CC, anyway,
 so all you need is to give part of the address:
 
  send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
  send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
 
 this should work.  untested, though.

Just tested it and it doesn't work...

Jerome

-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook question - making a point

2002-03-16 Thread Sven Guckes

* Jerome De Greef [EMAIL PROTECTED] [2002-03-16 14:11]:
   BTW, doesn't ..* do the same as .+ ?
  it depends.  really - it all depends on
  the language you currently have available.
 I was talking about Mutt ;)

So was I.  more specifically, I was talking about
the regular expression library used within mutt.

   send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
   send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
  this should work.  untested, though.
 Just tested it and it doesn't work...

hmm.. the pattern might need quoting:
 send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'

try again.  does it work now?

Sven



Re: Hook question

2002-03-16 Thread Andre Berger

* Jerome De Greef [EMAIL PROTECTED], 2002-03-15 08:20 -0500:
 send-hook '~t .*' 'my_hdr From: Jerome De Greef [EMAIL PROTECTED]'
 send-hook !'~t .*' 'my_hdr From: Jerome De Greef[EMAIL PROTECTED]'
 
 The first hook is used whenever I hit 'r' and there is a 'To:' line
 followed by any address.
 The second hook is used when I hit 'F' (newsgroup followup). 
 It matches any 'To:' line where the address is not anything... thus
 matching no 'To:' line at all.

I would like to set my Bcc headers on that basis, but it seems to
work randomly only!

send-hook '~t .*' 'my_hdr Bcc: mymail'
send-hook !'~t .*' 'unmy_hdr Bcc'

I would be very happy if anyone could tell me what to do in order to
turn off my Bcc header automatically when posting.

-Andre




msg25620/pgp0.pgp
Description: PGP signature


Re: Hook question - describe your problem!

2002-03-16 Thread Sven Guckes

* Andre Berger [EMAIL PROTECTED] [2002-03-16 18:34]:
 I would like to set my Bcc headers on that basis,
 but it seems to work randomly only!
   send-hook  '~t .*'   'my_hdr Bcc: mymail'
   send-hook !'~t .*' 'unmy_hdr Bcc'
 I would be very happy if anyone could tell me what to do in
 order to turn off my Bcc header automatically when posting.

  send-hook . unmy_hdr *

this should turn off *all* extra headers.
set now set your BCC header as you need.

btw, your first send-hook reads like this:
When TO contains an address of arbitrary
 length then set the following BCC line.
And the length can be ZERO, too!

Get to know your regular expressions!
(And next time start a new thread, ok?)

I think it's time for a workshop
on regex here in Berlin..

Anyway, you did not describe
what the hooks shall do.
And it's a waste of time
trying to guess it.

Sven  [read da book! see sig..]

-- 
Title: Mastering Regular Expressions
Author:Jeffrey Friedl [EMAIL PROTECTED]
Publisher: O'Reilly, 1997, 1-56592-257-3
URL:   http://www.oreilly.com/catalog/regex/



Re: Hook question - describe your problem!

2002-03-16 Thread Andre Berger

* Sven Guckes [EMAIL PROTECTED], 2002-03-16 20:26 -0500:
 * Andre Berger [EMAIL PROTECTED] [2002-03-16 18:34]:
  I would like to set my Bcc headers on that basis,
  but it seems to work randomly only!
send-hook  '~t .*'   'my_hdr Bcc: mymail'
send-hook !'~t .*' 'unmy_hdr Bcc'
  I would be very happy if anyone could tell me what to do in
  order to turn off my Bcc header automatically when posting.
 
   send-hook . unmy_hdr *
 
 this should turn off *all* extra headers.
 set now set your BCC header as you need.
 
 btw, your first send-hook reads like this:
 When TO contains an address of arbitrary
  length then set the following BCC line.
 And the length can be ZERO, too!
 
 Get to know your regular expressions!
 (And next time start a new thread, ok?)
 
 I think it's time for a workshop
 on regex here in Berlin..
 
 Anyway, you did not describe
 what the hooks shall do.
 And it's a waste of time
 trying to guess it.

Sven, thank you very much for your response and your time.

What I'm trying to accomplish is more or less the same Jerome (the
original poster) wants. We use mutt with nntp-patch and want to set
headers according to the fact if we are mailing or posting. Jerome
came up with the solution above which indeed works for From-headers,
but not really (read: consistantly) for Bcc-headers, at least for me.
What I want is to test if there is a To-header or not - if there is
one, I'm mailing, if there is none, I'm posting. If I'm mailing, add
a Bcc header (I'm Bccing all mail to myself to keep track of it). If
not, do not add this header because this results in an ugly To:
undiclosed recipients ; line in my postings.

I've tried an otherwise empty .muttrc file and

send-hook . unmy_hdr *
send-hook '~t ..*' 'my_hdr Bcc: mail'
send-hook !'~t ..*' 'my_hdr Bcc: news'

Testing the settings:

1. (mail) no bcc
2. (mail) bcc: mail
3. (news) bcc: mail
4. (news) bcc: news

So it seems to work, but the send-hook is one message late.

-Andre




msg25625/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-15 Thread Jerome De Greef

I think I have the solution:

send-hook '~t .*' 'my_hdr From: Jerome De Greef [EMAIL PROTECTED]'
send-hook !'~t .*' 'my_hdr From: Jerome De Greef[EMAIL PROTECTED]'

The first hook is used whenever I hit 'r' and there is a 'To:' line
followed by any address.
The second hook is used when I hit 'F' (newsgroup followup). 
It matches any 'To:' line where the address is not anything... thus
matching no 'To:' line at all.
It's maybe a 'dirty trick' but it does it ;)

Jerome

* Andre Berger ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED], 2002-03-14 13:14 -0500:
  * Andre Berger ([EMAIL PROTECTED]) wrote:
   * Jerome De Greef [EMAIL PROTECTED], 2002-03-14 09:13 -0500:
Hi,

I use the nntp patch from vvv.
I have folder hooks to change my email for the newsgroups to avoid spam.
When i press F to write a follow-up, my address is changed accordingly.
Now my question is: is there a way to have my 'normal address' used when
I hit 'r' to personnaly reply to a newsgroup user ?

Thanks in advance for any help.

Jerome
   
   Sorry I messed my other posting up.
   
   folder-hook nntp send-hook '~t ^.*$' 'my_hdr From: news'
   folder-hook !nntp send-hook '~t ^.*$' 'my_hdr From: mail'
  
  That cannot work as I don't change folders between replying to the
  newsgroup (hitting 'F') or personnally to a user (hitting 'r').
 
 Well I tested it once, not enough... When I'm in my mbox mutt and
 hit reply, it get my_hdr mail, when I switch to a newsgroup and hit
 reply, I get  my_hdr news, as expected. But when I go back to mbox
 mutt and hit reply, still my_hdr news, and I don't see why. Same
 thing when I replace nntp above with .
 
  It could have been done using ~h and searching for Newsgroups: in the
  header but send-hook doesn't allow to use ~h.
 
 Yeah that would make things really easy.
 
  And I cannot use ~t because when you reply to a newsgroup you don't have
  any To: line in the header...
 
 When you hit reply via mail, there is a to header ;)
 
 -Andre
 



-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook question

2002-03-15 Thread David T-G

Jerome --

...and then Jerome De Greef said...
% 
% I think I have the solution:

Yay!


% 
% send-hook '~t .*' 'my_hdr From: Jerome De Greef [EMAIL PROTECTED]'
% send-hook !'~t .*' 'my_hdr From: Jerome De Greef[EMAIL PROTECTED]'

Does this work, or do you think it should?  I'd expect that you'd need

  ..*

in your patterns instead of just 

  .*

'cuz the former is one character plus zero or more characters while the
latter still accepts none.

Perhaps it works simply because there is a To: header to check versus one
being absent; in that case, you can probably leave off the asterisk.


% 
...
% It's maybe a 'dirty trick' but it does it ;)

Those are the best :-)


% 
% Jerome


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: Hook question

2002-03-14 Thread Andre Berger

* Jerome De Greef [EMAIL PROTECTED], 2002-03-14 09:13 -0500:
 Hi,
 
 I use the nntp patch from vvv.
 I have folder hooks to change my email for the newsgroups to avoid spam.
 When i press F to write a follow-up, my address is changed accordingly.
 Now my question is: is there a way to have my 'normal address' used when
 I hit 'r' to personnaly reply to a newsgroup user ?
 
 Thanks in advance for any help.
 
 Jerome

folder-hook nntp my_hdr bla1
folder-hook !nntp my_hdr bla2

-Andre




msg25496/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread Andre Berger

* Jerome De Greef [EMAIL PROTECTED], 2002-03-14 09:13 -0500:
 Hi,
 
 I use the nntp patch from vvv.
 I have folder hooks to change my email for the newsgroups to avoid spam.
 When i press F to write a follow-up, my address is changed accordingly.
 Now my question is: is there a way to have my 'normal address' used when
 I hit 'r' to personnaly reply to a newsgroup user ?
 
 Thanks in advance for any help.
 
 Jerome

Sorry I messed my other posting up.

folder-hook nntp send-hook '~t ^.*$' 'my_hdr From: news'
folder-hook !nntp send-hook '~t ^.*$' 'my_hdr From: mail'

-Andre




msg25498/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread David T-G

Andre, et al --

...and then Andre Berger said...
% 
% folder-hook nntp send-hook '~t ^.*$' 'my_hdr From: news'
% folder-hook !nntp send-hook '~t ^.*$' 'my_hdr From: mail'

Since one doesn't change folders without leaving the folder, you might
say, couldn't the send-hooks be left out and you just set the From:
header when you enter each folder?


% 
% -Andre
% 


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!




msg25500/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread Jerome De Greef

* Andre Berger ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED], 2002-03-14 09:13 -0500:
  Hi,
  
  I use the nntp patch from vvv.
  I have folder hooks to change my email for the newsgroups to avoid spam.
  When i press F to write a follow-up, my address is changed accordingly.
  Now my question is: is there a way to have my 'normal address' used when
  I hit 'r' to personnaly reply to a newsgroup user ?
  
  Thanks in advance for any help.
  
  Jerome
 
 Sorry I messed my other posting up.
 
 folder-hook nntp send-hook '~t ^.*$' 'my_hdr From: news'
 folder-hook !nntp send-hook '~t ^.*$' 'my_hdr From: mail'

That cannot work as I don't change folders between replying to the
newsgroup (hitting 'F') or personnally to a user (hitting 'r').

It could have been done using ~h and searching for Newsgroups: in the
header but send-hook doesn't allow to use ~h.
And I cannot use ~t because when you reply to a newsgroup you don't have
any To: line in the header...

Thanks anyway ;)
Jerome

-- 
+---+
|   'the panorama of the city is wrong  |
|   in fact the city seems to be gone!' |
| the clash, stop the world, 1980   |
+---+



Re: Hook?

2002-01-17 Thread David T-G

Nick --

...and then Nick Wilson said...
% 
% * On 16-01-02 at 18:11 
% * Jeremy Blosser said
% 
%  On Jan 16, Nick Wilson [[EMAIL PROTECTED]] wrote:
...
%   att: somebloke
...
%  
%  I'm not that up on fcc-hook stuff but in general doing
%  
%  fcc-save-hook . =Outbox/%0
%  fcc-save-hook ~s ^att:  =Outbox/someplace
%  
%  should get what you want.  The first will continue to apply as the default
%  and anything that matches the second will use it instead.
% 
% Okay guys, I now have:
% 
% fcc-save-hook ~s att:  =Outbox/att

Is this before or after your default fcc-save-hook?  Have you tried it
the other way around?


% 
% does it work?
% does if @#*!

You might try creating a folder-hook for =Outbox/att and then sending
them from there...


% 
% Bit of a tough bugger this one :)

HTH  HAND


% 
% Cheers
% 
% -- 
% 
% Nick Wilson
% 
% Tel:  +45 3325 0688
% Fax:  +45 3325 0677
% Web:  www.explodingnet.com
% 


:-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!




msg23203/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-17 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 17-01-02 at 11:36 
* David T-G said
 % 
 % Okay guys, I now have:
 % 
 % fcc-save-hook ~s att:  =Outbox/att
 
 Is this before or after your default fcc-save-hook?  Have you tried it
 the other way around?

It was  *after* my default fcc-save-hook, now I've put it the other way
around it works beutifully!

 
 
 % 
 % does it work?
 % does if @#*!
 
 You might try creating a folder-hook for =Outbox/att and then sending
 them from there...
 

Well, that's a good idea too, 

Thanks very much David and the rest of you guys for all the help on this
one.

Take care

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8Rqx8HpvrrTa6L5oRAvNVAJ4jM401XxzHzjIKLDUBH8ia2QTMgQCeJnar
P/A+RGjaI2kQ1Z7xAE6ek+w=
=/43/
-END PGP SIGNATURE-



Re: Hook?

2002-01-16 Thread René Clerc

* Nick Wilson [EMAIL PROTECTED] [16-01-2002 14:26]:

| I'm about to send out a whole bunch of mails and I wondered what would
| be the easiest way to ensure that they all go to the same Outbox for
| easy reference.

You mean a bunch of separate mails? Then you could just issue the set
fcc=yourOutbox command, send the mails, and reset it when you're
done.

If all mails match a certain pattern (section 4.2 of TFM), you could
use a send-hook for this purpose, like:

send-hook ~s SUBJECT set fcc=yourOutbox

| At the moment all my stuff is saved to ~/Mail/Outbox/name_of_recipient
| 
| What do you think?

Hope this is what you meant, and that this helps.

-- 
René Clerc  - ([EMAIL PROTECTED])

Said the attractive, cigar-smoking housewife to her girl-friend: I
got started one night when George came home and found one burning in
the ashtray.



msg23156/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread Nicolas Rachinsky

On Wed, Jan 16, 2002 at 02:42:43PM +0100, René Clerc [EMAIL PROTECTED] wrote:
 You mean a bunch of separate mails? Then you could just issue the set
 fcc=yourOutbox command, send the mails, and reset it when you're
 done.

My mutt don't know fcc, I think you meant record. 

Nicolas



Re: Hook?

2002-01-16 Thread Nick Wilson


* On 16-01-02 at 14:47 
* René Clerc said

 * Nick Wilson [EMAIL PROTECTED] [16-01-2002 14:26]:
 
 | I'm about to send out a whole bunch of mails and I wondered what would
 | be the easiest way to ensure that they all go to the same Outbox for
 | easy reference.
 
 You mean a bunch of separate mails? Then you could just issue the set
 fcc=yourOutbox command, send the mails, and reset it when you're
 done.
 
Yep, that's right. I guess that's what I'll be needing.

 
 Hope this is what you meant, and that this helps.
 

It sure does, thanks Rene.

-- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com






msg23158/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread Philip Wittamore

Hi,

Newbie question:

Is it possible to have 

set record = outbox depending on sender

thanks,
Phil.


On Wed, Jan 16, 2002 at 02:47:40PM +0100, Nicolas Rachinsky wrote:
 On Wed, Jan 16, 2002 at 02:42:43PM +0100, René Clerc [EMAIL PROTECTED] wrote:
  You mean a bunch of separate mails? Then you could just issue the set
  fcc=yourOutbox command, send the mails, and reset it when you're
  done.
 
 My mutt don't know fcc, I think you meant record. 
 
 Nicolas




Re: Hook?

2002-01-16 Thread René Clerc

* Nicolas Rachinsky [EMAIL PROTECTED] [16-01-2002 14:49]:

| On Wed, Jan 16, 2002 at 02:42:43PM +0100, René Clerc [EMAIL PROTECTED] wrote:
|  You mean a bunch of separate mails? Then you could just issue the set
|  fcc=yourOutbox command, send the mails, and reset it when you're
|  done.
| 
| My mutt don't know fcc, I think you meant record. 

Of course. Stupide me ;)

-- 
René Clerc  - ([EMAIL PROTECTED])

No woman, no cry.
-Bob Marley 



msg23161/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread Benjamin Smith

On Wed, Jan 16, 2002 at 02:56:04PM +0100, Philip Wittamore wrote:
 Hi,
 
 Newbie question:
 
 Is it possible to have 
 
 set record = outbox depending on sender
 
 thanks,
 Phil.

You can use fcc-hook for setting the record folder based on the
recipient, if you're changing $from in a hook to get different senders,
you can just set $record where ever you set $from.

-- 
Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED]



msg23162/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread Nick Wilson


* On 16-01-02 at 14:47 
* René Clerc said

 If all mails match a certain pattern (section 4.2 of TFM), you could
 use a send-hook for this purpose, like:
 
 send-hook ~s SUBJECT set fcc=yourOutbox
 

Well, I'm afraid that I'm a bit of a dummy, after much reading of TFM
I'm none the wiser. Here's the deal:

each mail that I am sending that needs to be in a 'special' Outbox has a
subject line that starts with

att:

So some examples would be:

att: somebloke
att: somegeezer
att: somedoris

and I'd like then to all be in the same place. 
I can't use 'set record' because I have 

fcc-save-hook . =Outbox/%0

So I need to go with a subject line match.

A little guidance here would be very appreciated indeed.

Many thanks


-- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com






msg23163/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread David Ellement

On 020116, at 17:30:03, Nick Wilson wrote
 each mail that I am sending that needs to be in a 'special' Outbox has a
 subject line that starts with
 
 att:
 
 and I'd like then to all be in the same place. 
 I can't use 'set record' because I have 
 
 fcc-save-hook . =Outbox/%0

For fcc-hook and save-hook, the hook processing stops with the first
match.  Perhaps this would work:

fcc-hook ~s att: =Outbox/att
fcc-hook . =Outbox/%0

save-hook .=Outbox/%0

-- 
David Ellement



Re: Hook?

2002-01-16 Thread Jeremy Blosser

On Jan 16, Nick Wilson [[EMAIL PROTECTED]] wrote:
 each mail that I am sending that needs to be in a 'special' Outbox has a
 subject line that starts with
 
 att:
 
 So some examples would be:
 
 att: somebloke
 att: somegeezer
 att: somedoris
 
 and I'd like then to all be in the same place. 
 I can't use 'set record' because I have 
 
 fcc-save-hook . =Outbox/%0
 
 So I need to go with a subject line match.

I'm not that up on fcc-hook stuff but in general doing

fcc-save-hook . =Outbox/%0
fcc-save-hook ~s ^att:  =Outbox/someplace

should get what you want.  The first will continue to apply as the default
and anything that matches the second will use it instead.



msg23165/pgp0.pgp
Description: PGP signature


Re: Hook?

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 18:11 
* Jeremy Blosser said

 On Jan 16, Nick Wilson [[EMAIL PROTECTED]] wrote:
  each mail that I am sending that needs to be in a 'special' Outbox has a
  subject line that starts with
  
  att:
  
  So some examples would be:
  
  att: somebloke
  att: somegeezer
  att: somedoris
  
  and I'd like then to all be in the same place. 
  I can't use 'set record' because I have 
  
  fcc-save-hook . =Outbox/%0
  
  So I need to go with a subject line match.
 
 I'm not that up on fcc-hook stuff but in general doing
 
 fcc-save-hook . =Outbox/%0
 fcc-save-hook ~s ^att:  =Outbox/someplace
 
 should get what you want.  The first will continue to apply as the default
 and anything that matches the second will use it instead.

Okay guys, I now have:

fcc-save-hook ~s att:  =Outbox/att

does it work?
does if @#*!

Bit of a tough bugger this one :)

Cheers

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RfSMHpvrrTa6L5oRAv0qAJ4iEt7QHmyJRnGUcL24qBiAclDtywCfWnH9
9PlROyO6rxhbSZM/x0Eikx8=
=K/jW
-END PGP SIGNATURE-



Re: hook problem

2001-09-02 Thread Michael Tatge

Benjamin Michotte muttered:
 I've got those hook
 
 # close all threads
 folder-hook . push \eV
 
 and so, when I start mutt, i've got a beep and this error message:
 There are no messages.

If there are no message in your $spoolfile collapsing threads fails.
Just ignore the message.

 Also, I close all threads by default and have set 
 set uncollapse_jump = yes
 set collapse_unread = yes
 
 but is there a way to open threads with new or unread message when
 opening a mailbox ?

unset collapse_unread

 last question: how can i set mutt to ask to open mailbox with unread
 messages ? I've set nomark_old=yes but it seems to don't work.

Check the the manual for the mailboxes command. If you have new mail in
a folder that is listed as a mailbox press c for change-folder and
see what happens. :)

HTH,

Michael
-- 

PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: hook? [SOLVED]

2001-03-26 Thread Andre Berger

* Andre Berger [EMAIL PROTECTED], 20010325 00:09 +0100:
 I wonder if it's possible to execute the following command automatically
 on all but "!" and my IO mailbox:
 
 "^T~A\nT!(~p|~P|~Q|~F)~d2w\nd" 

I finally had the right idea this morning. What I wanted to do --
marking everything not directly concerning myself or being flagged, AND
older than two weeks, for deletion -- is a "native" job for the scoring
mechanism. So the solution is:

score   '!(~p|~P|~Q|~F)~d2w' -

Andre Berger[[EMAIL PROTECTED]]



Re: hook/macro/push newbie problem

2000-11-22 Thread Bob Bell

On Wed, Nov 22, 2000 at 07:00:17PM -0200, Sergio Bruder [EMAIL PROTECTED] 
wrote:
 I'm trying to filter my folders to show only my new messages, with threads collapsed:
 
 folder-hook .push "limit~N\n"
 folder-hook .push collapse-all
 
 But that "\n" isnt working. Any clues?

Try enter instead.

-- 
Bob Bell [EMAIL PROTECTED]
-
 "For example, OS/360 devotes 26 bytes of the permanently
  resident date-turnover routine to the proper handling of
  December 31 on leap years (when it is Day 366).  That might
  have been left to the operator."
   -- Fred Brooks, _The Mythical Man-Month_, on wasting resources



Re: hook permanance across folders

1999-12-17 Thread David T-G

Nico --

...and then Nico Hailey said...
% I have a question. How do you unset folder-hooks when you are
% no longer in that folder?

You have to set a default hook that matches all folders.  To fix your
problem noted here, try

folder-hook . 'unmy_hdr Approved:'
folder-hook . 'unmy_hdr To:'

*before* your specific folder-hook statements.


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.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
"Why2k?  Well, I didn't think at the time that I could charge any more!"
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature