Re: index_format

2022-07-26 Thread Dennis Preiser
On Tue, Jul 26, 2022 at 08:30:27PM +0200, Fourhundred Thecat wrote:
>> On 2022-07-26 19:38, Dennis Preiser wrote:
>> set size_show_mb
>> index-format-hook size_flags "~z -1M" " "
>> index-format-hook size_flags "~z >1M" "%5c"
>> index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> 
>> %@size_flags@"
> 
> thank you, that works beautifully. But "set size_show_mb" seems to have
> no effect. It still shows small size in KB.

Thats why I've used '-1M' and '>1M'. Only values obove 1MB will be
affected by size_show_mb. If you use, for example, '-100k' and '>100k',
values below 1MB will be shown as kB. At least that is how I understand
the documentation.

Dennis


Re: index_format

2022-07-26 Thread Fourhundred Thecat

> On 2022-07-26 19:38, Dennis Preiser wrote:

On Tue, Jul 26, 2022 at 04:53:28PM +0200, Fourhundred Thecat wrote:

I have following index_format:


set size_show_mb
index-format-hook size_flags "~z -1M" " "
index-format-hook size_flags "~z >1M" "%5c"
index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %@size_flags@"


thank you, that works beautifully. But "set size_show_mb" seems to have
no effect. It still shows small size in KB.



Re: index_format

2022-07-26 Thread Dennis Preiser
On Tue, Jul 26, 2022 at 04:53:28PM +0200, Fourhundred Thecat wrote:
> I have following index_format:
> 
>  index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %5c"
> 
> I would like to make following change to the last column, where message
> size is shown:
> 
> 1) if message size is less than 0.1M, show empty column
> 2) if message size is more than 0.1M show message size, but always in
> megabytes (not kilobytes)
> 
> can somebody please advise how to do this?

You could try something like this:

set size_show_mb
index-format-hook size_flags "~z -1M" " "
index-format-hook size_flags "~z >1M" "%5c"
index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %@size_flags@"

Dennis


Re: Index_format - show expired

2009-01-26 Thread Anton Achatz
Thanks for your help, but i know the page of Gary Johnson. My question
is, if there is a possibility to show the expire-date at the index
(index_format).

Sorry about the encrypted signature, but iam working at a university and
this is my standard to send mails. So now without signature.

Toni



Patrick Shanahan schrieb am Mo, 26.01.09 08:45:
 * Anton Achatz anton.ach...@fh-deggendorf.de [01-26-09 01:21]:
  Hi,
  I'm using the mutt-utils (mutt-expires-editor) to set an expire date in
  the mail. Is it possible to show this date in the index?
 
 a quick search of the fine manual yealds:
~E pattern will match expired messages

 and a quick search of google yealds:
   Gary Johnson's Mutt Page
 which provides usage examples
 
 ?? The content of your post was so important and critical so as to
 require a 6.2K encrypted signature?  Bah!  The sig was six times the
 message content.
 -- 
 Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
 http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
 Registered Linux User #207535@ http://counter.li.org


 Hochschule für angewandte Wissenschaften - Fachhochschule Deggendorf
 Edlmairstr. 6 + 8  
 94469 Deggendorf   
 Tel.: 0991/3615-240   
 Fax : 0991/3615-297   
 mail: anton.ach...@fh-deggendorf.de


Re: Index_format - show expired

2009-01-26 Thread Patrick Shanahan
* Anton Achatz anton.ach...@fh-deggendorf.de [01-26-09 08:58]:
 Thanks for your help, but i know the page of Gary Johnson. My question
 is, if there is a possibility to show the expire-date at the index
 (index_format).
 
 Sorry about the encrypted signature, but iam working at a university and
 this is my standard to send mails. So now without signature.
 
 Toni
 
 
 
 Patrick Shanahan schrieb am Mo, 26.01.09 08:45:
  * Anton Achatz anton.ach...@fh-deggendorf.de [01-26-09 01:21]:
   Hi,
   I'm using the mutt-utils (mutt-expires-editor) to set an expire date in
   the mail. Is it possible to show this date in the index?
  
  a quick search of the fine manual yealds:
 ~E pattern will match expired messages
 
  and a quick search of google yealds:
Gary Johnson's Mutt Page
  which provides usage examples
  
  ?? The content of your post was so important and critical so as to
  require a 6.2K encrypted signature?  Bah!  The sig was six times the
  message content.

I apologize for failing to completely read/understand your post.  

afaict, there is no *direct* method for displaying the expire-date in
the index_format, but there are possible cludges that come to mind.
One would be to use score to display a coded date providing you are
not using score for it's intended purpose.  Another would be to assign
the expire_date to an x-label field (via procmail/formail) as the
x-label field may be displayed with %y/%Y in the index_format.

-- 
Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://counter.li.org


Re: index_format setting to show yr

2008-06-21 Thread SK
On Fri, Jun 20, 2008 at 7:42 PM, David Champion [EMAIL PROTECTED] wrote:
 Is there any way to setup mutt (the date_format variable?) such that
 in the index view, the year is shown only if the year of the message
 is different from the current year? The default %d  shows only the
 Month date.

 You need the date_conditional patch to make date formats conditional
 upon relative date offsets, but even so you can only say in the last 6
 months or the like -- not in the current year.

Thanks David, the date_conditional patch did the work!


Re: index_format setting to show yr

2008-06-20 Thread David Champion
 Is there any way to setup mutt (the date_format variable?) such that
 in the index view, the year is shown only if the year of the message
 is different from the current year? The default %d  shows only the
 Month date.

You need the date_conditional patch to make date formats conditional
upon relative date offsets, but even so you can only say in the last 6
months or the like -- not in the current year.

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


Re: index_format setting to show yr

2008-06-20 Thread Michael Kjorling
On 20 Jun 2008 12:42 -0500, by [EMAIL PROTECTED] (David Champion):
 You need the date_conditional patch to make date formats conditional
 upon relative date offsets, but even so you can only say in the last 6
 months or the like -- not in the current year.

I haven't looked at this particular patch and the functionality it
offers, but couldn't one come pretty close with a combination of that
and muttrc GNU date shell/backtick expansions?

Granted, it would be something of a kludge, but I don't see why it
couldn't be made to work. (date's +%-j format might come in handy.)

-- 
Michael Kjörling .. [EMAIL PROTECTED] .. http://michael.kjorling.se
* . No bird soars too high if he soars with his own wings . *
* ENCRYPTED email preferred -- OpenPGP key ID: 0x 758F8749 BDE9ADA6 *
* ASCII Ribbon Campaign: Against HTML mail, proprietary attachments *



signature.asc
Description: Digital signature


Re: index_format - indicate which email has attachment

2007-10-06 Thread Christian Ebert
* Joseph on Saturday, October 06, 2007 at 00:48:00 -0600
 Is it possible to show in index display which email has an attachment?
 I was looking for a solution but it seems to me I need to install a 
 patch in order to show this information in index_format.

Your version of Mutt should already have the patch included.
Experiment with %X in index format, and have a look at the, you
know, fine manual:

%X
  number of qualifying MIME parts in this part and its children
  (please see the ``attachments'' section for possible speed
  effects)

c
-- 
Python Mutt utilities http://www.blacktrash.org/hg/muttils/


Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 11:44, Christian Ebert wrote:
 * Joseph on Saturday, October 06, 2007 at 00:48:00 -0600
  Is it possible to show in index display which email has an attachment?
  I was looking for a solution but it seems to me I need to install a 
  patch in order to show this information in index_format.
 
 Your version of Mutt should already have the patch included.
 Experiment with %X in index format, and have a look at the, you
 know, fine manual:
 
 %X
   number of qualifying MIME parts in this part and its children
   (please see the ``attachments'' section for possible speed
   effects)
 

Yes, I was playing with it but when I set my index like this it displays 
0 on all files, even the one with attachments.

set index_format=%4C %Z %d %X %-15.15n (%?l?%4l%4c?) %s


-- 
#Joseph
GPG KeyID: ED0E1FB7


Re: index_format - indicate which email has attachment

2007-10-06 Thread Rocco Rutte

Hi,

* Joseph [07-10-06 11:12:46 -0600] wrote:

On 10/06/07 11:44, Christian Ebert wrote:



%X
  number of qualifying MIME parts in this part and its children
  (please see the ``attachments'' section for possible speed
  effects)



Yes, I was playing with it but when I set my index like this it displays 
0 on all files, even the one with attachments.



set index_format=%4C %Z %d %X %-15.15n (%?l?%4l%4c?) %s


Did you properly configure all 'attachment' commands (see the system 
Muttrc file for examples) or did you just add '%X' to $index_format?


You have to tell mutt what an you consider an attachment before %X does 
display the counts in $index_format.


Rocco


Re: index_format - indicate which email has attachment

2007-10-06 Thread David Champion
 Did you properly configure all 'attachment' commands (see the system Muttrc 
 file for examples) or did you just add '%X' to $index_format?

 You have to tell mutt what an you consider an attachment before %X does 
 display the counts in $index_format.

Right.  You can type :attachments ? (no quotes) into mutt to see
what settings it has now.  The defaults come from the system
muttrc:

Current attachments settings:

attachments +A */.*
attachments -A text/x-vcard
attachments -A application/pgp.*
attachments -A application/x-pkcs7-.*
attachments -A message/external-body
attachments +I text/plain
attachments -I message/external-body

These basically mean that attachments with a content-disposition
of inline will not be counted as attachments, unless they are
content-type text/plain; and all messages with a content-disposition
of attachment will be counted, except for the four types listed
(pgp signatures, vcards, and external-body messages).

Perhaps your message with an attachment doesn't qualify under these
rules.  But that's why you can change the rules. :)

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago
 Polka music needs to prevail.   John Ziobrowski, Polka America Corporation


Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 13:44, David Champion wrote:
 Right.  You can type :attachments ? (no quotes) into mutt to see
 what settings it has now.  The defaults come from the system
 muttrc:
 
 Current attachments settings:
 
 attachments +A */.*
 attachments -A text/x-vcard
 attachments -A application/pgp.*
 attachments -A application/x-pkcs7-.*
 attachments -A message/external-body
 attachments +I text/plain
 attachments -I message/external-body
 
 These basically mean that attachments with a content-disposition
 of inline will not be counted as attachments, unless they are
 content-type text/plain; and all messages with a content-disposition
 of attachment will be counted, except for the four types listed
 (pgp signatures, vcards, and external-body messages).
 
 Perhaps your message with an attachment doesn't qualify under these
 rules.  But that's why you can change the rules. :)

Thanks Dave for the example, no my muttrc did not come with these 
defaults, and yes it works now.

It displays attachments but is there a way to suppress the 0 if there is 
no attachment.

-- 
#Joseph
GPG KeyID: ED0E1FB7



Re: index_format - indicate which email has attachment

2007-10-06 Thread Gary Johnson
On 2007-10-06, Joseph [EMAIL PROTECTED] wrote:

 Thanks Dave for the example, no my muttrc did not come with these 
 defaults, and yes it works now.
 
 It displays attachments but is there a way to suppress the 0 if there is 
 no attachment.

The 'index_format' accepts conditional elements, so something like 
this will work,

   %?X?%X?

or if you want a space in place of the 0 instead of nothing, this:

   %?X?%X ?

Regards,
Gary


Re: index_format - indicate which email has attachment

2007-10-06 Thread David Champion
 Thanks Dave for the example, no my muttrc did not come with these 
 defaults, and yes it works now.

These defaults are installed when you build from source.  Are you
using a distributed package?  If so, sounds like someone oopsed.


 It displays attachments but is there a way to suppress the 0 if there is 
 no attachment.

What Gary said. :)

Personally I use something akin to this:

%?X?{%2X}%4c?

Which shows me attachment count if there are attchments, or
total message size othewise.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago
 Polka music needs to prevail.   John Ziobrowski, Polka America Corporation


Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 14:47, David Champion wrote:
 These defaults are installed when you build from source.  Are you
 using a distributed package?  If so, sounds like someone oopsed.

Thanks David and Garry for the index input, it works as you described:
I likes Garry's solution: %?X?%X ?
It is perfect.

Yes, I compiled from Gentoo distribution, it is provided as an ebuild 
(as all other packages).
No, they are not spoiling us with regards to muttrc, for example the 
default muttrc setup is:

set mbox_type=Maildir
set folder=~/.maildir
set spoolfile=~/.maildir/
set record=~/.maildir-sent/
set move=no

set index_format=%4C %Z %{%b %d} %-16.16L  %s

and that is all. Though, there is a pointer to Gentoo Mutt Guide which 
is very, very good example in explaining the basics and if a user want 
something fancy we need to pull our sleeves up get to work :-)

Though they have one advantage, I just noticed that Gentoo provide 
mutt-sidebar as a flag, so all I need to do is to re-compile it with 
that flag and copy the settings from: 
http://www.lunar-linux.org/index.php?option=com_contenttask=viewid=44

Works like a charm, and happy with it :-)
 
-- 
#Joseph
GPG KeyID: ED0E1FB7


Re: index_format confusion

2001-12-14 Thread Kenneth Pronovici

 sorts the mail to), the format doesn't seem to be obeyed.  The main
 thing that's frustrating is that I don't see the %Z message info (like
 T for thread, etc.).

I think after digging around in /usr/doc/mutt, some more, I need to
modify my question...  I think that probably, %Z is working, it's just 
that I don't understand the different values that it prints.  I had 
thought that 'T' meant thread, but that doesn't seem to always be the 
case.

My new question is: other than by using %M to list the number of hidden
messages when a thread is collapsed, is there a way to flag a message as
part of a thread?

Sorry again for my confusion, and thanks in advance for the help.

KEN

--
Kenneth J. Pronovici [EMAIL PROTECTED]
Personal Homepage: http://www.skyjammer.com/~pronovic/
They that can give up essential liberty to obtain a little
 temporary safety deserve neither liberty nor safety.
  - Benjamin Franklin, Historical Review of Pennsylvania, 1759




msg21592/pgp0.pgp
Description: PGP signature


Re: index_format confusion

2001-12-14 Thread Martin Karlsson

On Fri Dec 14, 2001 at 11:21:24AM -0600, Kenneth Pronovici wrote:

[...snip...]

The main thing that's frustrating is that I don't see the %Z message info (like
 T for thread, etc.).

T for Thread? Unless I'm utterly mistaken (in which place I apologize
for sticking my foot in my ...), T indicates that a message is CC:ed to
you.

Do you have the line

set to_chars= +TCF

in your .muttrc?

[nothing]= not to you
+ = To you
T = CC you
F = From you

hope this helps

-- 
Martin
martin.karlsson at visit.se



Re: index_format confusion

2001-12-14 Thread Kenneth Pronovici

 Do you have the line
 
   set to_chars= +TCF
 
 in your .muttrc?
 
 [nothing]= not to you
 + = To you
 T = CC you
 F = From you
 
 hope this helps

I didn't, and yes (duh) it explains why I didn't see T in my mail list 
folders (none of the messages were to me).  I'll make this transition
from Pine work yet. ;-)

Thanks.

KEN

-- 
Kenneth J. Pronovici [EMAIL PROTECTED]
Personal Homepage: http://www.skyjammer.com/~pronovic/
They that can give up essential liberty to obtain a little 
 temporary safety deserve neither liberty nor safety. 
  - Benjamin Franklin, Historical Review of Pennsylvania, 1759 



msg21595/pgp0.pgp
Description: PGP signature


Re: index_format confusion

2001-12-14 Thread Nicolas Rachinsky

On Fri, Dec 14, 2001 at 07:53:11PM +0100, Martin Karlsson [EMAIL PROTECTED] 
wrote:
 [nothing]= not to you
 + = To you
 T = CC you
 F = From you

The Fine Manual says:
+   message is to you and you only
T   message is to you, but also to or cc'ed to others
C   message is cc'ed to you
F   message is from you
L   message is sent to a subscribed mailing list




Re: index_format confusion

2001-12-14 Thread Martin Karlsson

On Sat Dec 15, 2001 at 12:21:10AM +0100, Nicolas Rachinsky wrote:
 On Fri, Dec 14, 2001 at 07:53:11PM +0100, Martin Karlsson [EMAIL PROTECTED] 
wrote:
  [nothing]= not to you
  + = To you
  T = CC you
  F = From you
 
 The Fine Manual says:
 +   message is to you and you only
 T   message is to you, but also to or cc'ed to others
 C   message is cc'ed to you
 F   message is from you
 L   message is sent to a subscribed mailing list

Seems my foot was only half-way in... ;-) (see my previous post)

I think I shall spend the next few hours Reading The Friendly Manual!

-- 
Martin
martin.karlsson at visit.se



Re: index_format confusion

2001-12-14 Thread Kenneth Pronovici

 Seems my foot was only half-way in... ;-) (see my previous post)
 
 I think I shall spend the next few hours Reading The Friendly Manual!

Yeah, don't feel bad.  I'll join you. 

KEN

-- 
Kenneth J. Pronovici [EMAIL PROTECTED]
Personal Homepage: http://www.skyjammer.com/~pronovic/
They that can give up essential liberty to obtain a little 
 temporary safety deserve neither liberty nor safety. 
  - Benjamin Franklin, Historical Review of Pennsylvania, 1759 



msg21604/pgp0.pgp
Description: PGP signature


Re: $index_format

2001-06-27 Thread Josh Meekhof

David,

Thanks for the suggestion. It worked great.

On Tue, Jun 26, 2001 at 08:35:47PM -0700, David Ellement wrote:
 This sounds like some additional quoting is needed:
 
 folder-hook .  'set index_format=%4C %Z %16F %4c %s'
 
 The outermost quotes get consumed when the line is first read.
 
 -- 
 David Ellement

-- 
Josh Meekhof
Sr. Software Engineer
Techniki Informatica / Network Staffing Services Inc.
(972) 233 1525

 PGP signature


Re: $index_format

2001-06-26 Thread John Arundel

On 2001-06-26 at 11:35:25, Josh Meekhof warbled:
 Has anyone run into any problems with setting the $folder_index
 variable? Whenever I attempt to set this variable I get an error that
 tell's me that '%Z' is not an available variable.

Well, there is no $folder_index variable (is there?)

Did you mean either $index_format or $folder_format? %Z is a valid sequence
for index_format but not folder_format. That might be the source of your
problems.

John
--
I've had a perfectly wonderful evening. But this wasn't it. - Groucho Marx

   I prefer encrypted mail (see headers for PGP key)
   Why encrypt? http://www.heureka.clara.net/sunrise/pgpwhy.htm


 PGP signature


Re: $index_format

2001-06-26 Thread Josh Meekhof

John,

Yes I did mean $index_format. I only misquoted myself in my
email. Whenever I attempt to set this variable, I get the error
message that I described previously at startup.  Is there a particular
sequence in which variables should be declared? Is it possible that I
am declaring $index_format before it would make sense?

-- 
Josh Meekhof
Sr. Software Engineer
Techniki Informatica / Network Staffing Services Inc.
(972) 233 1525

 PGP signature


Re: $index_format

2001-06-26 Thread Josh Meekhof

I figured something out. I can set $folder_index under normal
circumstances, but when I attempt to set this variable with the
folder-hook, I am told that the %Z doesn't exists. Strangeness.
-- 
Josh Meekhof
Sr. Software Engineer
Techniki Informatica / Network Staffing Services Inc.
(972) 233 1525

 PGP signature


Re: $index_format

2001-06-26 Thread David Ellement

On 010626, at 16:24:34, Josh Meekhof wrote
 I figured something out. I can set $folder_index under normal
 circumstances, but when I attempt to set this variable with the
 folder-hook, I am told that the %Z doesn't exists. Strangeness.

This sounds like some additional quoting is needed:

folder-hook .  'set index_format=%4C %Z %16F %4c %s'

The outermost quotes get consumed when the line is first read.

-- 
David Ellement



Re: index_format problem

2001-05-31 Thread Jeff Coppock

   Yup, it was missing a quote, and I thought I tried that since
   my other folder-hook entries have one at the beginning of the
   set section.  Anyway, it's working nicely now.
   
   Thanks to all for your help!
   
   jc

Thusly Thwacked By Jonathan Irving:
 Hi Jeff
 
 The '.' line supplied in the original reply (sorry, I've deleted it :-()
 was missing a quote.  Maybe that's responsible. 
 
 cheers
 j
 
 On Thu, May 31, 2001 at 11:24:24AM +0530, Biju Chacko wrote:
  Date: Thu, 31 May 2001 11:24:24 +0530
  From: Biju Chacko [EMAIL PROTECTED]
  Subject: Re: index_format problem
  To: [EMAIL PROTECTED], Jeff Coppock [EMAIL PROTECTED]
  Reply-to: Biju Chacko [EMAIL PROTECTED]
  User-Agent: Mutt/1.2.5i
  
  On Wed, May 30, 2001 at 10:33:43PM -0700, Jeff Coppock wrote:
   
  The '.' didn't work.  It's not recognized.  I tried a few
  other wildcard characters with no luck.  Thanks for the
  suggestion.  I'll just add a folder-hook line for each folder.
  It's not like I have a hunndred folders that are always
  changing.  So, not a big deal.
  
  
  Jeff,
  
  You may need to recheck that. It works fine for me ( Mutt 1.2.5i on RH7.1 ).
  
  Biju
  
  -- 
  -
  Biju Chacko| [EMAIL PROTECTED] (work)
  Exocore Consulting | [EMAIL PROTECTED] (play)
  Bangalore, India   | http://www.exocore.com
  -
 
 -- 
 .sigbot at contact-j @ bast.corp.sun.com for phone/address etc 
 ++---+
 | ECHELON Fodder | 15kg IB UKUSA RCMP Embassy NSWG   |
 ++---+

-- 

---
Jeff Coppock -- SE Manager --  Pacific Northwest Region
 Nortel Networks / IP Core Networks (Shasta BSN 5000)
  mailto:[EMAIL PROTECTED]
  (408) 565-3848:Office -- 655-3848:ESN
  (510) 703-5910:Mobile -- (925) 292-1156:Home Office
---



Re: index_format to show attachments?

2001-02-07 Thread Duncan Watson

On Wed, Jan 31, 2001 at 12:25:27PM -0500, mike polniak wrote:
 mike polniak wrote:
   
  I have'nt done this yet, but at first glance it seems doable:
  
  The index_format will show %N a message score. So score your messages
  by Mutt pattern: ~h EXPR for messages which contain EXPR in the message
  header.  Now i already use procmail to find attachments by looking at
  the header for 'Content-Type:.*multipart/mixed' which eliminates PGP
  and alternative attachments.  So just let Mutt match a pattern in the
  header for Content-Type:?  set for some attachment to score
  accordingly and show it with %N in the index.
 
   OK i am answering my own post. When i try the above, Mutt 1.2.5i
 says " ~h is not supported ". So here is how to get Mutt to cooperate and
 flag messsages with attachments by putting a message 'score' next to the
 status flags in the index:
   Mutt does support the pattern '~i ID' which matches the Message-ID:
 field. So since i already use procmail to find messages with attachments, i 
 add another line to the procmail recipe, to replace the original Message-ID:
 | formail -i "Message-ID: attach".
   Now use Mutt message scoring, to score messages which match the pattern
 "Message-ID: attach". My .muttrc has: folder-hook . "score ' ~i attach' 2"
   Now add %N (message score) to the index_format, and the score 2 will
 appear in the index. I also edited my pager_format line by adding %i which
 is the message id, so that it displays "attach" in the pager status line. 
 HTH  

OK, I have read this and the other message about using different header
lines instead of ~h.  BUT this begs the questions, why isn't ~h supported
in this mode?  And, WTH does in this mode imply.  Limits work with ~h, why
not scores?

Now this is not crippling to me as I do use procmail BUT it is part of the
functionality in mutt and not something that really should belong in
procmail's realm.

/Duncan
-- 
Duncan Watson Application Engineer



Re: index_format to show attachments?

2001-01-31 Thread mike polniak

mike polniak wrote:
 David Champion wrote:
  On 2001.01.30, in [EMAIL PROTECTED],
  "Duncan Watson" [EMAIL PROTECTED] wrote:
   Hello,
   
   I am trying to show messages that attachments in the index.  I took a look
   at index_format but no luck at first reading.  Does anyone have an idea on
   how to accomplish this?  
  
  Can't be done, but I wrote a patch that permits this.
  http://home.uchicago.edu/~dgc/mutt

   I have'nt done this yet, but at first glance it seems doable:
 
 The index_format will show %N a message score. So score your messages by Mutt
 pattern: ~h EXPR for messages which contain EXPR in the message header.
   Now i already use procmail to find attachments by looking at
 the header for 'Content-Type:.*multipart/mixed' which eliminates PGP and 
 alternative attachments.
   So just let Mutt match a pattern in the header for Content-Type:?
 set for some attachment to score accordingly and show it with %N in the index.

OK i am answering my own post. When i try the above, Mutt 1.2.5i
says " ~h is not supported ". So here is how to get Mutt to cooperate and
flag messsages with attachments by putting a message 'score' next to the
status flags in the index:
Mutt does support the pattern '~i ID' which matches the Message-ID:
field. So since i already use procmail to find messages with attachments, i 
add another line to the procmail recipe, to replace the original Message-ID:
| formail -i "Message-ID: attach".
Now use Mutt message scoring, to score messages which match the pattern
"Message-ID: attach". My .muttrc has: folder-hook . "score ' ~i attach' 2"
Now add %N (message score) to the index_format, and the score 2 will
appear in the index. I also edited my pager_format line by adding %i which
is the message id, so that it displays "attach" in the pager status line. 
HTH  
-- 

~~~



Re: index_format to show attachments?

2001-01-31 Thread Aaron Schrab

At 23:07 -0500 30 Jan 2001, mike polniak [EMAIL PROTECTED] wrote:
   Now i already use procmail to find attachments by looking at
 the header for 'Content-Type:.*multipart/mixed' which eliminates PGP and 
 alternative attachments.

That's not really a good test for whether a message has attachments.
Lately, I've been seeing messages from a number of mailers that have
Content-type: multipart/mixed, with only one sub-part.  I woulnd't
consider those as having attachments.

At 12:25 -0500 31 Jan 2001, mike polniak [EMAIL PROTECTED] wrote:
   Mutt does support the pattern '~i ID' which matches the Message-ID:
 field. So since i already use procmail to find messages with attachments, i 
 add another line to the procmail recipe, to replace the original Message-ID:
 | formail -i "Message-ID: attach".

Ugghhh!  First, "formail -i" doesn't replace the Message-ID header, it
adds another one.  Second, doing that will break threading of any
replies to those messages; if you reply to such messages, you'll break
the threading for the recipients as well as yourself.

How about using the Expires: header instead?

| formail -I "Expires: Thu,  1 Jan 1970 00:00:00 +"

And in .muttrc:

score ~E 2 # No need for folder-hook

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 "...handing C++ to the average programmer seems roughly comparable
  to handing a loaded .45 to a chimpanzee."-- Ted Ts'o



Re: index_format to show attachments?

2001-01-31 Thread mike polniak

Aaron Schrab wrote:
 
 Ugghhh!  First, "formail -i" doesn't replace the Message-ID header, it
 adds another one.  Second, doing that will break threading of any
 replies to those messages; if you reply to such messages, you'll break
 the threading for the recipients as well as yourself.
 
 How about using the Expires: header instead?
 
 | formail -I "Expires: Thu,  1 Jan 1970 00:00:00 +"
 
 And in .muttrc:
 
 score ~E 2 # No need for folder-hook

Yes i now realize the error of my methods. Just a newbie at this.
If only Mutt had support for ~h EXPR i would not have gotten carried away
with this idea of identifying attachments, which is not that necessary anyway.

-- 

~~~



Re: index_format to show attachments?

2001-01-30 Thread David Champion

On 2001.01.30, in [EMAIL PROTECTED],
"Duncan Watson" [EMAIL PROTECTED] wrote:
 Hello,
 
 I am trying to show messages that attachments in the index.  I took a look
 at index_format but no luck at first reading.  Does anyone have an idea on
 how to accomplish this?  

Can't be done, but I wrote a patch that permits this.
http://home.uchicago.edu/~dgc/mutt


 -- 
 Duncan Watson Application Engineer
 [For best reading adjust your window width to the length of this line -djw]
 123456789012345678901234567890123456789012345678901234567890123456789012345

75 columns?  What kind of terminal size is that? :)

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



Re: index_format to show attachments?

2001-01-30 Thread mike polniak

David Champion wrote:
 On 2001.01.30, in [EMAIL PROTECTED],
   "Duncan Watson" [EMAIL PROTECTED] wrote:
  Hello,
  
  I am trying to show messages that attachments in the index.  I took a look
  at index_format but no luck at first reading.  Does anyone have an idea on
  how to accomplish this?  
 
 Can't be done, but I wrote a patch that permits this.
   http://home.uchicago.edu/~dgc/mutt
 
I have'nt done this yet, but at first glance it seems doable:

The index_format will show %N a message score. So score your messages by Mutt
pattern: ~h EXPR for messages which contain EXPR in the message header.
Now i already use procmail to find attachments by looking at
the header for 'Content-Type:.*multipart/mixed' which eliminates PGP and 
alternative attachments.
So just let Mutt match a pattern in the header for Content-Type:?
set for some attachment to score accordingly and show it with %N in the index.
-- 

~~~



Re: index_format: ANSI colors

2000-12-15 Thread Conor Daly

On Fri, Dec 15, 2000 at 03:34:23PM + or so it is rumoured hereabouts, 
Bjornar Ness thought:
 Hello fellow mutt users.
 I want to colorize my index a bit more. How do I do this?
 Tried with some ansi sequences.. did not work, why? I think
 it would be great to be able to do this.
Depends on the sort of colourising you mean.  I use the "color" command to
set up my index.  The following set colours:

* Unread mails addressed _directly_ to me Bright Yellow
* Unread mails from lists Bright Red
* Read mails from lists magenta
* Mails I've replied to Bright Blue
* All other mails are Yellow
* The highlight bar is bright Yellow on Blue

color index yellow default "~A"
color index magenta default "~l"
color index brightyellow default "~N"
color index brightred default "~N~l"
color index brightblue default "~Q"
color indicator brightyellow blue 

Is that what you mean?
 
 And one more thing.. mutt really needs a simple, yet powerful
 to/from/cc/?? procmailrc frontend. Nice for all of us I think.
 Could work allmost like the a(lias) command.
That would be pretty all right...

-- 
Conor Daly [EMAIL PROTECTED]

Domestic Sysadmin :-)
-
 10:09pm  up 14 days, 6 min,  2 users,  load average: 0.00, 0.01, 0.00



Re: index_format

2000-09-29 Thread Mikko Hänninen

Jason Majors [EMAIL PROTECTED] wrote on Thu, 28 Sep 2000:
 I'm trying to change my index_format for my $record mailbox to show the 
 recipient, not my address.

Ok.

First of all, the default $index_format already shows the recipient
name, not the sender (you) if Mutt detects that a message is from you.
In order to tell Mutt which messages are from you, you need to set up
the $alternates setting correctly.

You can do this by changing the $index_format with a folder-hook too,
sure.  No problem with that.

 I changed the index_format variable like it says in the online doc. When I input
 it at the colon prompt it works fine, but when I try it using a folder-hook
 it complains about some of the format strings %F, %Z and a few others.
 Does anybody know why this might be?

It's likely a quoting issue.  Add an extra level of "" or '' quotes
around the whole "set index_format=''" command.  The first set of quotes
will disappear when the folder-hook command is parsed, and the second
set of quotes is needed for when the folder-hook actually executes.

If you need more help than this, then please show the command you're
using, so people can then tell you how to fix the quoting with the
help of an example.


Hope this helps,
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 /
A gleekzorp without a tornpee is like a quop without a fertsneet (sort of).



Re: index_format %F and sent mailbox

2000-07-19 Thread David T-G

Hardy --

mutt doesn't necessarily know that the message is from you unless you've
set up $alternates.  Have a look at the manual for alternates, from, and
realname.


:-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!
The "new millennium" starts at the beginning of 2001.  There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: index_format

2000-03-19 Thread Mikko Hänninen

Subba Rao [EMAIL PROTECTED] wrote on Sun, 19 Mar 2000:
 set index_format="%4C %Z %{%b %d %y} %-17.17F (%4l) %s"

Looks fine.  Because you don't have a %d reference, $date_format doesn't
matter here at least.

 Only the month/day get displayed. Why is year (%y) not displayed?

Beats me, it should be.

When you're viewing the message index, have you tried to check what the
actual value of your $index_format variable is?  Perhaps it's something
else than you think it is, maybe set by a hook or something?  You can
view it with

  :set ?index_format


Regards,
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 /
"Scotty, beam us aboard."  "Aye, sir.  Will a 2x4 do?"



Re: index_format

2000-03-19 Thread Subba Rao

On  0, Mikko Hänninen [EMAIL PROTECTED] wrote:
 Subba Rao [EMAIL PROTECTED] wrote on Sun, 19 Mar 2000:
  set index_format="%4C %Z %{%b %d %y} %-17.17F (%4l) %s"
 
 Looks fine.  Because you don't have a %d reference, $date_format doesn't
 matter here at least.
 
  Only the month/day get displayed. Why is year (%y) not displayed?
 
 Beats me, it should be.
 
 When you're viewing the message index, have you tried to check what the
 actual value of your $index_format variable is?  Perhaps it's something
 else than you think it is, maybe set by a hook or something?  You can
 view it with
 
   :set ?index_format
 
 

Thanks for replying.

This is for another account on my system. The index_format strings are pretty much
the same. In .muttrc, it has

set index_format="%4C %Z %[!%y%m%d] %-17.17F (%3l) %s"


When I do, :set ?index_format, I get the following:

--- 77/78: Mikko Hänninen Re: index_format 
-- (all) 
index_format="%4C %Z %{%b %d} %-15.15n (%4l) %s"

The following are the only hooks in my .muttrc:

folder-hook . set sort=threads
folder-hook =sent set sort="date-sent"

Subba Rao
[EMAIL PROTECTED]
http://pws.prserv.net/truemax/

 = Time is relative. Here is a new way to look at time. =
http://www.smcinnovations.com



Re: index_format

2000-03-19 Thread Mikko Hänninen

Subba Rao [EMAIL PROTECTED] wrote on Sun, 19 Mar 2000:
 This is for another account on my system. The index_format strings are pretty much
 the same. In .muttrc, it has
 
 set index_format="%4C %Z %[!%y%m%d] %-17.17F (%3l) %s"
 
 When I do, :set ?index_format, I get the following:
 
 index_format="%4C %Z %{%b %d} %-15.15n (%4l) %s"

If you compare the two strings, you will note that the timestamp format
in the above is "%{%b %d}" -- so something must be changing that, after
that first statement in your .muttrc has been loaded.  So you need to
find what/where that something is, and fix that...

If you can't find it on your own, perhaps you can post your .muttrc
here, although I do recommend first looking yourself. :-)


Regards,
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 /
Microsoft Windows... a virus with mouse support.



Re: Index_format

2000-03-17 Thread Thomas Roessler

On 2000-03-17 01:52:32 -0700, Adahma wrote:

 I have several lists that I have setup as subscribed
 lists lists in my .muttrc.  I already have my high
 volume lists being sorted into their own folders via
 procmail.  Now here's my problem...  In those lists
 that I have presorted, I'd like to have the "normal"
 index format, so I see the sender rather than the list
 address, and still have the unsorted list mail flagged
 in my inbox.

From my private muttrc:

folder-hook . 'set index_format="%4C %Z %[%b %d] %-15.15L (%4c) %s"'
folder-hook 
(debate|members|bugtraq|mutt-(users|dev)|postfix|krypto|ietf|coderpunks|netlaw) \
'set index_format="%4C %Z %[%b %d] %-15.15n (%4c) %s"'

-- 
http://www.guug.de/~roessler/




Re: Index_format

2000-03-17 Thread Adahma

On Fri, Mar 17, 2000 at 10:53:14AM +0100, Thomas Roessler wrote:
 On 2000-03-17 01:52:32 -0700, Adahma wrote:
 
  procmail.  Now here's my problem...  In those lists
  that I have presorted, I'd like to have the "normal"
  index format, so I see the sender rather than the list
  address, and still have the unsorted list mail flagged
  in my inbox.
 
 From my private muttrc:
 
 folder-hook . 'set index_format="%4C %Z %[%b %d] %-15.15L (%4c) %s"'
 folder-hook 
(debate|members|bugtraq|mutt-(users|dev)|postfix|krypto|ietf|coderpunks|netlaw) \
   'set index_format="%4C %Z %[%b %d] %-15.15n (%4c) %s"'

DOH!!  Those blasted missing '.  Never even crossed my mind.

Thanks a miilion!



Re: index_format and folder-hook

1999-07-31 Thread Stefan `Sec` Zehl

Hi,

On Sat, Jul 31, 1999 at 03:31:00PM +0200, Nikolaus Rath wrote:
 hello
 
 When i had wrote the following into my .muttrc
 
 folder-hook sent/   set index_format="%4C %Z %{%b %d} %-15.15t (%4l) %s"

it's a quoting problem. use this:

folder-hook sent/   'set index_format="%4C %Z %{%b %d} %-15.15t (%4l) %s"'

CU,
Sec

P.S.: isn't this in the faq ?
-- 
See above, I´d vote now to remove TCP completely after seeing that results.
-- [EMAIL PROTECTED] on freebsd-ports, 2.Aug.1997