Switching between important and non-important mailboxes

2008-11-25 Thread Vladimir Marek
Hi,

This is something I wanted to have for some time, ability to make mutt
ignore certain mailboxes for some time, so that they don't bother me all
day, but to be able to review them when convenient.

Yesterday I bit the bullet and this is the result:

In .muttrc, I replaced my 'mailboxes' line with comment 

# MY_MAILBOXES \
_+INBOX \
_+postponed \
+some_stuff \
+cc-interest +dbx-interest +dtrace-discuss \
_+mutt_users \
...

folders beginning with underscore are the important ones. Rest is:

macro index,pager y Y "Show important mail only"


# Important mailinglists

`cat $HOME/.muttrc | perl -e '   \
  $tmp=join "", <>;  \
  $tmp=~s/\\\n//gs;  \
  $tmp=~m/\n#[ \t]*MY_MAILBOXES[ \t]*(.*?)\n/s;  \
  @all=split /\s+/, $1;  \
  $important=join " ", map { s/^_//; $_ } grep /^_/, @all;   \
  $all=join " ", map { s/^_//; $_ } @all;\
  print "mailboxes $all;";   \
  print "macro index,pager y \"unmailboxes 
*mailboxes $allcolor indicator blue 
whitemacro index,pager y eY \\\"Show 
important mail only\\\"\"; "; \
  print "macro index,pager Y \"unmailboxes 
*mailboxes $importantcolor 
indicator red whitemacro index,pager y ey 
\\\"Show all mail\\\"\""; \
  print "\n";\
'`


By pressing 'y' I switch between all mailboxes defined and just the
important ones. When I'm observing just the important ones, my indicator
turns red, and is blue otherwise.

Hope this helps someone

-- 
Vlad


pgpEvnkI8SLDH.pgp
Description: PGP signature


Re: Bind ctrl+up in muttrc

2008-10-21 Thread Vladimir Marek
> > Hmmm, my week-or-so mutt does not have this either ...
> 
> Yes it does, you're just looking for it in the wrong place. It's 
> defined in the "generic" menu, which means it's available everywhere 
> except in the pager and in the editor. See the manual for 
> proof: 
> http://www.mutt.org/doc/devel/manual.html#generic_map

Ah, I see.


> Sheesh, doesn't *anybody* read the documentation anymore?

From time to time I do, but I saw "type :exec what-key", so I did. I'm
sorry if it made you mad.

But thanks for pointing me there, I found another function which is
helpful to me :)
-- 
Vlad


pgpKZL6aZtNoP.pgp
Description: PGP signature


Re: Bind ctrl+up in muttrc

2008-10-21 Thread Vladimir Marek
> > That's a key that is difficult to bind (the arrow keys usually are). 
> > Here's how I'd do it in your case: first, within mutt, type:
> > 
> >  :exec what-key
> > 
> > Then press control-up, and see what happens.
> 
> Thanks. Unfortunately my version of mutt is too old and doesn't have the 
> what-key function. But I'll be upgrading soon, when the new version of ubuntu 
> is released, so I'll try it then.

Hmmm, my week-or-so mutt does not have this either ...

-- 
Vlad


pgp23ToY3o37G.pgp
Description: PGP signature


Re: New mail folder list

2008-09-15 Thread Vladimir Marek
> > I'm attaching another way to fix this. It makes mark_old option work
> > also for IMAP.
> > 
> 
> > IMAP mark_old patch
> 
> [...]
> 
> Have you created a ticket for that patch at dev.mutt.org/trac?

No. Brendan had his doubts about this being correct thing to do. I
vaguely remember he wanted me to try mark_old with pop type mailboxes
also.

Mail where I summarised the state is here:

http://marc.info/?l=mutt-dev&m=114890412703654&w=2

Because Brendan knows 100times more about IMAP than me, I really
hesitate to push. But I am running with the patch for quite some time
and I'm not aware of any problems.

-- 
Vlad


pgpeLe8s65yTP.pgp
Description: PGP signature


Re: New mail folder list

2008-09-13 Thread Vladimir Marek
Hi,

I'm sorry I noticed this thread after you walked through the code ...

> Index: mutt-1.5.18/imap/command.c
> ===
> --- mutt-1.5.18.orig/imap/command.c   2008-09-09 00:17:25.0 -0400
> +++ mutt-1.5.18/imap/command.c2008-09-09 00:17:33.0 -0400
> @@ -897,7 +897,7 @@
>  
>  if (olduv && olduv == status->uidvalidity)
>  {
> -  if (oldun < status->uidnext)
> +  /* if (oldun < status->uidnext) */
>  inc->new = status->unseen;
>  }
>  else if (!olduv && !oldun)


I'm attaching another way to fix this. It makes mark_old option work
also for IMAP.

-- 
Vlad
IMAP mark_old patch

diff --git a/imap/command.c b/imap/command.c
--- a/imap/command.c
+++ b/imap/command.c
@@ -964,7 +964,7 @@
 dprint (3, (debugfile, "Found %s in buffy list (OV: %d ON: %d U: 
%d)\n",
 mailbox, olduv, oldun, status->unseen));
 
-if (olduv && olduv == status->uidvalidity)
+if (olduv && olduv == status->uidvalidity && option(OPTMARKOLD))
 {
   if (oldun < status->uidnext)
 inc->new = status->unseen;


pgpkNeKDNu0JG.pgp
Description: PGP signature


Re: showing new mail

2008-07-06 Thread Vladimir Marek
> > > since I updated mutt on my debian-machine to version 1.5.18, it 
> > > doesn't show if there has new mail arrived anymore. 

[...]

> > 
> > Maybe clearing your header cache helps ?
> 
> Thanks, but I've no header cache set. But mutt seems to change it's 
> behaviour if I wait some time between starting fetchmail and opening 
> mutt. It just seems to need some time... but anyway, this isn't like 
> before.

So if your mutt is running and you execute fetchmail, you never see any
new mail arriving until you restart mutt ?

-- 
Vlad


pgpQRGqfuKjlX.pgp
Description: PGP signature


Re: showing new mail

2008-07-06 Thread Vladimir Marek
> since I updated mutt on my debian-machine to version 1.5.18, it 
> doesn't show if there has new mail arrived anymore. 
> To describe it: usually I start mutt, hit 'c' and mutt shows me my 
> subscribed mailboxes and marks the ones with new mails in it with a 
> 'N' besides it. 
> 
> But now it doesn't do it anymore. I can only watch out for new arrived 
> mails by checking the last-updated-timestamp in the mailboxes-list. Is 
> this a bug, or am I missing something in my .muttrc now - which works 
> for me since several years now? 

Maybe clearing your header cache helps ?

-- 
Vlad


pgpmtpDoCSS4o.pgp
Description: PGP signature


Re: change folder doesn't suggest folder with unread messages - solved

2008-06-17 Thread Vladimir Marek
> for quite some time I've been using Mutt. Lately it was Mutt 1.5.13 on
> Debian etch.
> 
> It worked great.
> 
> Last week I upgraded my server to Ubuntu 8.04, and Mutt 1.5.17 and found
> out that one of the nicest features is gone. Partially.

[...]

It boiled down to old header cache. Shouldn't mutt 1.5.17 detect that
the hcache data are invalid and discard them ? Or does it depend on
hcache backend ?

Thank you

-- 
Vlad


pgpVMfI0miNIo.pgp
Description: PGP signature


Re: change folder doesn't suggest folder with unread messages

2008-06-17 Thread Vladimir Marek
> i have got some suspicion about imap server - it got upgraded too.
> 
> can it be debugged anyway? i can do strace, tcpdump, anything that's
> neccessary, i just don't know where exactly to look.

It can, if mutt is compiled with --enable-debug
, see 'mutt -v | grep DEBUG'. +DEBUG means that it is compiled in.

$ mutt -d level

This will log to ~/.muttdebug0. The higher level, the more informations.
I tend to use 99. Be warned that the file will contain your password and
probably other potentially sensitive data.

-- 
Vlad


pgpcgpWZyOXhZ.pgp
Description: PGP signature


Re: change folder doesn't suggest folder with unread messages

2008-06-17 Thread Vladimir Marek
> > Do you have 'set mark_old = no' in your .muttrc ? Apart from the
> 
> no. i dont have any mark_old setting in my .,muttrc
> 
> > mark_old thing, mutt's behaving well for me when using IMAP. If you
> > switch to the folder which is not offered by 'c', can you see messages
> > flagged 'N'ew ? Is the folder in your mailboxes list ?
> 
> yes, and yes.
> 
> this folder is in "y" output (list of folders), it is subscribed, and
> the message is shown to be "N".


Hmm, that puzzles me a bit. You don't have any mark_old setting, which
means it's set to 'yes' by default. And yet, you can see the mails
marked as 'N', even if you switch to different maildir and back, without
touching the new file ?

At any rate, I'm afraid that I won't be able to help here.

-- 
Vlad


pgpK0kyTXBu88.pgp
Description: PGP signature


Re: change folder doesn't suggest folder with unread messages

2008-06-17 Thread Vladimir Marek
> > If I am right about the cause, the attached patch makes mark_old option
> > work also for IMAP.
> 
> OK, checked - it didn't help :(

Do you have 'set mark_old = no' in your .muttrc ? Apart from the
mark_old thing, mutt's behaving well for me when using IMAP. If you
switch to the folder which is not offered by 'c', can you see messages
flagged 'N'ew ? Is the folder in your mailboxes list ?

-- 
Vlad


pgpsx5HnWvAXh.pgp
Description: PGP signature


Re: change folder doesn't suggest folder with unread messages

2008-06-17 Thread Vladimir Marek
Hi,

> I'm using IMAP to access mailboxes. Have all of them subscribed, and it
> works great.
> 
> In Mutt 1.5.13, when I pressed "c" to change folder, Mutt was
> automatically suggesting "next" folder with unread messages.

[...]


> But when I press "c" - it doesn't suggest anything. Couple of minutes
> ago I had some new mails in lists.pg-general, and this folder *was*
> suggested to me after "c".

When you leave folder, mutt will mark all messages as Old. 'y' shows
number of _unread_ messages. 'c' suggests you folders containing 'New'
messages. So once you visit folder, it won't be suggested again unless
there appears new message again.


> I would really love to stick to mutt, but the fact that I have to go
> to "list of all folders" to check where are unread messages - it makes
> usage of mutt practically unbearable.

If I am right about the cause, the attached patch makes mark_old option
work also for IMAP.

Hope this helps

-- 
Vlad
IMAP mark_old patch

diff --git a/imap/command.c b/imap/command.c
--- a/imap/command.c
+++ b/imap/command.c
@@ -917,7 +917,7 @@
 dprint (3, (debugfile, "Found %s in buffy list (OV: %d ON: %d U: 
%d)\n",
 mailbox, olduv, oldun, status->unseen));
 
-if (olduv && olduv == status->uidvalidity)
+if (olduv && olduv == status->uidvalidity && option(OPTMARKOLD))
 {
   if (oldun < status->uidnext)
 inc->new = status->unseen;


pgpsN4IucdBFR.pgp
Description: PGP signature


Re: attaching files from a list?

2008-05-25 Thread Vladimir Marek
Hi,

> Is there some way, from the compose view in mutt, to attach given
> files whose paths/filenames I have previously collected in a text file?

Not exactly in compose view, but you may attach files directly when
editing the message. Just set "set edit_headers" in your
.muttrc, and then add files using new 'header' "Attach: filename".

Using vim it is pretty easy to generate list of "Attach: ..." lines,
using other editors I guess too.

Hope this helps

-- 
Vlad


pgpddrVeOxWN2.pgp
Description: PGP signature


Re: speed of cacheing depends on terminal?

2008-05-13 Thread Vladimir Marek
[...]
> That's why they recently added $time_inc (it's not in a released 
> version of mutt yet; just in the current development tree). Here's the  
> description from the development manual:

Sweet. My INBOX opens nearly instantaneously now. And I thought that
it's the hcache being slow.

Thank you
-- 
Vlad


pgpKCEHb8bwr9.pgp
Description: PGP signature


Re: utf8 console font

2008-05-06 Thread Vladimir Marek
> > > Just wondering which console font people are using in an utf8 locale.
> > 
> > Terminus
> > 
> > http://www.is-vn.bg/hamster/
> 
> Yeah, I have heard of it and am installing it now.
> 
> Installed "Uni3-TerminusBold16" and it seems to be displaying more
> foreign characters than "chavo", although it does remind of the early
> personal computers in the '70s :-), ah nostalgia ...

I use fullscreen terminal (no borders around). I think it looks nice :)
I installed the same font to my solaris, linux and windows machines.

-- 
Vlad


pgpRasSLylYqV.pgp
Description: PGP signature


Re: Can one automate selecting HTML version and viewing it?

2008-05-06 Thread Vladimir Marek
This is not answer to your question, but have you tried Twibright Links
?

http://links.twibright.com/download.php

I'm using 'links -dump %s' and I'm quite happy with it.

-- 
Vlad


pgpafbRiFOZIn.pgp
Description: PGP signature


Re: utf8 console font

2008-05-06 Thread Vladimir Marek
> Just wondering which console font people are using in an utf8 locale.

Terminus

http://www.is-vn.bg/hamster/

-- 
Vlad


pgpDa6DQRfNyM.pgp
Description: PGP signature


Re: Change unread mark without open the message

2008-04-29 Thread Vladimir Marek
> From comments from Vladimir, is it a bug in mutt?

This is a point where we disagree with Brendan. I think it is, he thinks
it's IMAP implementation detail. And Brendan surely knows mutt guts
better than me (ironically he was the one who gave me the patch :). You
can find our discussion in the mailinglist history.

And as with my other source activities, I don't contribute -> I just
keep my mouth shut :)

> I installed mutt binary in Debian box. Seems I have to install a
> source package then to make change as Vladimir suggested.

yes

-- 
Vlad


pgpetpRe2f1hs.pgp
Description: PGP signature


Re: Change unread mark without open the message

2008-04-28 Thread Vladimir Marek
> I don't know why your 'set mark_old=no' doesn't work. Do you possibly
> have a folder-hook somewhere that overrides it?

mark_old also does not work for IMAP. I'm attaching patch fixing the
annoyance.

-- 
Vlad
IMAP mark_old patch

diff --git a/imap/command.c b/imap/command.c
--- a/imap/command.c
+++ b/imap/command.c
@@ -895,7 +895,7 @@
 dprint (3, (debugfile, "Found %s in buffy list (OV: %d ON: %d U: 
%d)\n",
 mailbox, olduv, oldun, status->unseen));
 
-if (olduv && olduv == status->uidvalidity)
+if (olduv && olduv == status->uidvalidity && option(OPTMARKOLD))
 {
   if (oldun < status->uidnext)
 inc->new = status->unseen;


pgp0y0KY5hTIl.pgp
Description: PGP signature


Re: mutt-users@mutt.org

2008-04-24 Thread Vladimir Marek
> bash-2.05b$ uname -a
> SunOS 11 5.8 Generic_117350-34 sun4u sparc SUNW,Netra-T12

Nice, telco machine (Netra).


> bash-2.05b$ cat /var/sadm/install/contents | grep libiconv.so
> bash-2.05b$
> 
> 
> But we hvae iconv dir under lib intact -
> 
> /usr/bin/iconv f none 0555 root bin 11996 42547 947116534 SUNWcsu
[...]

That's just the binary. Solaris is not supplied by default with
libiconv.

> bash-2.05b$ ls  /opt/csw/lib
> /opt/csw/lib: No such file or directory
> bash-2.05b$
> 
> So sunfreeware.com is the way to go ?

One possible way. Personally I built GNU libiconv and linked mutt
statically with it. But that's just me.

It should be enough for you to install
ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libiconv-1.11-sol8-sparc-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libintl-3.4.0-sol8-sparc-local.gz
ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libgcc-3.4.6-sol8-sparc-local.gz

after that

LD_LIBRARY_PATH=/usr/local/lib; export LD_LIBRARY_PATH
LD_RUN_PATH=/usr/local/lib; export LD_RUN_PATH

I'm writing this without any testing, sorry if I missed something.

-- 
Vlad


pgpOo8cj2AGAA.pgp
Description: PGP signature


Re: mutt-users@mutt.org

2008-04-24 Thread Vladimir Marek

> I am trying to install mutt on sunos box but I get this error:
>
> Seems like configure couldn't find the SO.
> 
> configure:18489: checking whether this iconv is good enough
> configure:18527: gcc -o conftest -Wall -pedantic -g -O2   conftest.c
> -liconv >&5
> configure:18530: $? = 0
> configure:18536: ./conftest
> ld.so.1: conftest: fatal: libiconv.so.2: open failed: No such file or 
> directory
> ./configure: line 1: 23577 Killed  ./conftest$ac_exeext
> configure:18539: $? = 137
> configure: program exited with status 137

You haven't specified which sunos you are running. Locate the iconv
library by

$ cat /var/sadm/install/contents | grep libiconv.so

You will have to set LD_LIBRARY_PATH appropriately. Chances are that
it's in /opt/csw/lib . If you don't have one, you can get one from
companion (sunfreeware.com).

-- 
Vlad


pgpAQAPyuVXiD.pgp
Description: PGP signature


Re: mutt-users@mutt.org

2008-04-24 Thread Vladimir Marek
> I am trying to install mutt on sunos box but I get this error:
> 
> checking whether iconv.h defines iconv_t... yes
> checking whether this iconv is good enough... no
> configure: error: Try using libiconv instead
> bash-2.05b$

config.log should have the details. Try looking for "checking whether
this iconv is good enough" and some errors around.

-- 
Vlad


pgpqkL4TkRkEZ.pgp
Description: PGP signature


Re: mutt in GNU Screen - new email indicator

2008-04-14 Thread Vladimir Marek
> > > I am running mutt in GNU Screen.  Is there any way to change the
> >  > 'name' of the mutt screen in the screen statusbar when a new email
> >  > arrives to indicate the total number of new emails?
> >
> >  Wouldn't be enough to 'set beep_new' ?
> 
> I hate beeps :)

echo "set bell-style none" >> ~/.inputrc
xset b off

-- 
Vlad


pgp9fRXWzmpGx.pgp
Description: PGP signature


Re: mutt in GNU Screen - new email indicator

2008-04-11 Thread Vladimir Marek
> I am running mutt in GNU Screen.  Is there any way to change the
> 'name' of the mutt screen in the screen statusbar when a new email
> arrives to indicate the total number of new emails?

Wouldn't be enough to 'set beep_new' ?

-- 
Vlad


pgpAR2cuVbJ0z.pgp
Description: PGP signature


Re: Recommended mail filters for use with mutt?

2008-04-04 Thread Vladimir Marek
> > > > # Catch lists on List-Post
> > > > :0
> > > > * ^List-Post:.*mailto:\/[EMAIL PROTECTED]
> > > > Lists/$MATCH/
> > > > #
> > 
> > I wish that sieve would be as capable also :(
> 
> e.g. something along the lines of:
> 
> require "variables";
> 
> if header :matches "List-Post" "*   fileinto "${2}";  stop;
> }
> 
> ?  (might be wrong, but you get the idea)

Heh, that's cool, I didn't know you can do something like that.



> > Nice one
> 
> Maybe, if you don't mind having your folders determined by headers
> inserted by somebody else.  Me, I like to have a hand in there somewhere :)

Well, you can always move the mail to the proper directory. It never
happened to me to have mail inserted into wrong folder.

Thanks

-- 
Vlad


pgpfTa2oiVh9e.pgp
Description: PGP signature


Re: Recommended mail filters for use with mutt?

2008-04-03 Thread Vladimir Marek
> > # Catch lists on List-Post
> > :0
> > * ^List-Post:.*mailto:\/[EMAIL PROTECTED]
> > Lists/$MATCH/
> > #

I wish that sieve would be as capable also :(

Nice one

-- 
Vlad


pgpCIJ1WhKu1l.pgp
Description: PGP signature


Re: Recommended mail filters for use with mutt?

2008-04-02 Thread Vladimir Marek
> > Have a look at maildrop, it's filter file is not _that_ simple, but
> > I like it more than procmail.
> 
> I think its getting the regexps right. Otherwise its quite easy:
> 
> if (/^Sender: [EMAIL PROTECTED]/)
> {
>   to "$HOME/Mail/IN-mutt-users/"
> }

How much easier than

:0:
* /^Sender: [EMAIL PROTECTED]
$HOME/Mail/IN-mutt-users/


Sorry couldn't hold myself :)

-- 
Vlad


pgpljGOty88De.pgp
Description: PGP signature


Re: How would you ...

2008-04-01 Thread Vladimir Marek
> I would just attach the mails with "A" - you can chose the mailbox from where 
> you want to attach a certain mail and it'll get automatically 
> "message/rfc822" 
> as mimetype ...

+1

Thanks

-- 
Vlad


pgpwwfsikeoxb.pgp
Description: PGP signature


Re: How would you ...

2008-04-01 Thread Vladimir Marek

> reply to a mail and attach several other mails to this reply, when the
> attached mails are from different mailboxes ? I can think of
> 
> - saving the mails to files
> - add the saved mails as attachments
> - set the attachment type to "message/rfc822"
> 
> Would it work? Is there better way ?

Sorry, found it. Capital A - attach message

mutt rulez I should rtfm.

Thanks
-- 
Vlad


pgpRb9cpvheDS.pgp
Description: PGP signature


How would you ...

2008-04-01 Thread Vladimir Marek
reply to a mail and attach several other mails to this reply, when the
attached mails are from different mailboxes ? I can think of

- saving the mails to files
- add the saved mails as attachments
- set the attachment type to "message/rfc822"

Would it work? Is there better way ?

Thank you

-- 
Vlad


pgpga87JZAXwF.pgp
Description: PGP signature


Re: Header cache

2008-04-01 Thread Vladimir Marek
> I'm having trouble with header cache on my box at work.  I have the
> exact same config on my home box and it works fine.  What happens is
> that mutt seems to consult the header cache but then discards it for
> some reason and then proceeds to download all the headers again.
> 
> Home: Debian/i386 mutt 1.5.13 (2006-08-11)
> Work: OpenBSD/sparc64 mutt 1.5.16 (2007-06-09)
> I can post the output of mutt -v if desired.

Well first obvious thing would be to delete the header cache completely
and try from scratch. Second thing which came across my mind, be sure to
have the same locale every time you run mutt (I don't want to spread
FUD, but I think I had these issues while running from two profiles).

Also some time ago I found bug in SunCC compiler who caused exactly that
issues :(

I'm not sure I helped :)

-- 
Vlad


pgpTCat0ulTtm.pgp
Description: PGP signature


Re: How to erase already defined mailboxes ?

2008-03-31 Thread Vladimir Marek
> Now you can create a macro that will toggle sourcing either of these 
> two files whenever you hit f
> ,
> | macro index,pager \em "source ~/.mutt/file1\
> | macro index,pager \\ef  \\eM \
> | \"toggle Mailboxview\"" "Important mailboxes, use f to toggle"
> | macro index,pager \eM "source ~/.mutt/file2\
> | macro index,pager \\ef  \\em \
> | \"toggle Mailboxview\"" "Important mailboes, use f to toggle"
> | macro index,pager f m "toggle Mailboxes: important/all"
> `

And moreover the toggle feature, beautiful, thank you.

-- 
Vlad


pgpsC4zqufnrP.pgp
Description: PGP signature


Re: How to erase already defined mailboxes ?

2008-03-30 Thread Vladimir Marek
> > I'm having many mailboxes receiving mail. Many mailinglists, so I'm
> > getting mail all the time. It can get quite disturbing. I was thinking
> > that I would define list of "core mailboxes" and list of "all
> > mailboxes". At the morning I would switch on "all mailboxes" and read
> > everything. Then I would switch to "core" and I wouldn't be disturbed by
> > not so important mails. During day I could switch back and forward
> > between those. Can I achieve this without restarting mutt, ie. can I
> > empty the currently defined mailboxes ?

> A simple approach would be to use "mail notification" (aka
> "mailnotify") to alert you (via tone or icon) to the fact that mail
> has come in to the "core" boxes.  When you move the mouse pointer to
> the mailnotify icon, a temporary window opens, displaying the From
> header and the Subject line of each unread message.

I like not to be disturbed at all, so no notification. I just check my
mail when handy and don't want to be overwhelmed by not so important
lists during day.

Moreover my workspace is usually single terminal window fullscreen (no
borders, no icons) and usually my window manager is not able to display
icons (through I run Gnome for now).

But it's true, that I would like to work on some sort of notification
system, which could be used by mail, instant messaging, when some random
task finishes (long build?), etc. Thing is that I am usually logged onto
different machines (having ssh to my home computer and screen running
there). This notification system should follow me from terminal to
terminal. If someone has some similar solution, I am curios how he done
that :)

Thank you

-- 
Vlad


pgpEcGE343FQ0.pgp
Description: PGP signature


Re: How to erase already defined mailboxes ?

2008-03-28 Thread Vladimir Marek
[...]
> Yes. Create two textfiles that define your mailboxes, e.g.
> file 1 contains all important mailboxes and file 2 contains all 
> mailboxes. So your file1 looks like this:

[...]

That's one possibility. I tend to write such things as comment's in
muttrc and then parse the muttrc by perl script included at the end of
muttrc in `...`.

Just to have things in one file.

> ,
> | macro index,pager \em "source ~/.mutt/file1\
> | macro index,pager \\ef  \\eM \
> | \"toggle Mailboxview\"" "Important mailboxes, use f to toggle"
> | macro index,pager \eM "source ~/.mutt/file2\
> | macro index,pager \\ef  \\em \
> | \"toggle Mailboxview\"" "Important mailboes, use f to toggle"
> | macro index,pager f m "toggle Mailboxes: important/all"
> `

I didn't realize that you can use  like that. Thanks :)

-- 
Vlad


pgptHTer7IM5Y.pgp
Description: PGP signature


Re: How to erase already defined mailboxes ?

2008-03-28 Thread Vladimir Marek
> Use a macro around "unmailboxes *"
> 

That does the trick, thank you

-- 
Vlad


pgpfYXcfCW0M3.pgp
Description: PGP signature


Re: How to erase already defined mailboxes ?

2008-03-28 Thread Vladimir Marek
> Search your local manual(.txt) for unmailboxes.

Thank you

-- 
Vlad


pgpAg7kXXiuNb.pgp
Description: PGP signature


How to erase already defined mailboxes ?

2008-03-28 Thread Vladimir Marek
Hi,

I'm having many mailboxes receiving mail. Many mailinglists, so I'm
getting mail all the time. It can get quite disturbing. I was thinking
that I would define list of "core mailboxes" and list of "all
mailboxes". At the morning I would switch on "all mailboxes" and read
everything. Then I would switch to "core" and I wouldn't be disturbed by
not so important mails. During day I could switch back and forward
between those. Can I achieve this without restarting mutt, ie. can I
empty the currently defined mailboxes ?

http://www.mutt.org/doc/manual/manual-3.html#ss3.11

does not give much of a hint.

Thank you

-- 
Vlad


pgpiwnGwp1ATM.pgp
Description: PGP signature


Re: extract_url.pl: A Better URL Viewer

2008-03-27 Thread Vladimir Marek
> >> >> After a bit of work, I've gotten a perl script that I think rivals 
> >> >> URLView. I call it "extract_url.pl", and it's here: 
> >> >> http://www.memoryhole.net/~kyle/extract_url/

[...]

> Sample output? You mean, as in what it outputs when not using 
> Curses::UI?

Yes. But don't bother changing the page again please, I think I
understand now :)

Thanks

-- 
Vlad


pgpKuqUgkCmAL.pgp
Description: PGP signature


Re: extract_url.pl: A Better URL Viewer

2008-03-27 Thread Vladimir Marek
> >> After a bit of work, I've gotten a perl script that I think rivals 
> >> URLView. I call it "extract_url.pl", and it's here: 
> >> http://www.memoryhole.net/~kyle/extract_url/
> >
> >I wonder if it wouldn't help to add example output of your script to
> >your page. Especially for people like me who does not know urlview. I
> >would like to try, but I'm not currently getting any html emails :)

Ah, I was thinking about sample output from the extract_url.pl script,
but I'll manage from here :)

Thank you for your work Kyle
-- 
Vlad


pgpZIPzxZjLeQ.pgp
Description: PGP signature


Re: extract_url.pl: A Better URL Viewer

2008-03-27 Thread Vladimir Marek
Hi Kyle,

> After a bit of work, I've gotten a perl script that I think rivals 
> URLView. I call it "extract_url.pl", and it's here: 
> http://www.memoryhole.net/~kyle/extract_url/

I wonder if it wouldn't help to add example output of your script to
your page. Especially for people like me who does not know urlview. I
would like to try, but I'm not currently getting any html emails :)

Thanks

-- 
Vlad


pgpRQ1VmTJ7ut.pgp
Description: PGP signature


Re: Store multiple attached files in the same path

2008-03-26 Thread Vladimir Marek
> > is there a convenient way to store multiple attachements into the same
> > path? If I tag all of them and then use ;+s mutt asks me for the
> > filename/path for each one, but I'd like to give just a path and mutt
> > should use the filenames as are in the mail.
> > 
> > Andreas

> If you tag multiple attachments, use ;s and then enter a directory as 
> argument, mutt asks if it should save all the files to that directory. After 
> that you still need to hit enter for each file, but it's a lot easier than 
> correcting the directory for each attachment. I hope this is what you meant 
> and you're not already doing what I'm suggesting.

Ah, what a relief for all those mails containing ten or more images !

Thanks

-- 
Vlad


pgpv3KbljJGzO.pgp
Description: PGP signature


Re: Move messages instead of Copy

2008-03-06 Thread Vladimir Marek
[...]

> Given all that, I think it's probably worthwhile to have a cron job 
> delete all of your hcache files once in a while (monthly?), and delete 
> them all every time you upgrade mutt,

I'm following bleeding edge mutt from hg. I found usefull to put the
cache to /tmp which is ramdisk cleanded every reboot.

-- 
Vlad


pgpnOeZijHRbB.pgp
Description: PGP signature


Re: folder tab-completion to offer only folders containing new mail ?

2008-02-28 Thread Vladimir Marek
Hi Dilip,

> using 'set mailboxes' as a line in .muttrc gives me:
> 
> Sorry, you should be using something like,
> mailboxes =mbox1
> mailboxes =mbox2

Ah, right, I have those already. Many of them actually. What slows me
down is that when I want to switch to mailbox containing new mail, I
have to type most of it's name, before tab completion selects the proper
one. My wish was to have a way to limit tab completion only to folders
containing new mail.

Once I'll have nothing better to do, I'll implement another of my
patches :)

Thank you

-- 
Vlad


pgpafcfk4uZUm.pgp
Description: PGP signature


Re: folder tab-completion to offer only folders containing new mail ?

2008-02-28 Thread Vladimir Marek
Hi,

> 
> > Right, but then I have to type 'c' and press space several times to get to
> > the folder I want (if it's not the first one). Since I typically have 10
> > or more folders containing new mail, it would be handy to use tab
> > completion. But since there are folders with similar names which does not
> > contain new mail, it would be handy to limit it just to folders containing
> > new mail.
> 
> Can you try using 'set mailboxes' in muttrc.

using 'set mailboxes' as a line in .muttrc gives me:

Error in /home/vm156888/.muttrc, line 136: mailboxes: unknown variable
source: errors in /home/vm156888/.muttrc

Thanks

-- 
Vlad


pgpxkjGdW0XAI.pgp
Description: PGP signature


Re: folder tab-completion to offer only folders containing new mail ?

2008-02-24 Thread Vladimir Marek
> >  I would like to have some option which would let me tab-complete only
> >  from folders containing new mail.
> 
> "." (dot) will list mailboxe(s) with new mail.

Right, but then I have to type 'c' and press space several times to get
to the folder I want (if it's not the first one). Since I typically have
10 or more folders containing new mail, it would be handy to use tab
completion. But since there are folders with similar names which does
not contain new mail, it would be handy to limit it just to folders
containing new mail.

Thanks

-- 
Vlad


pgpAfebaeOSNt.pgp
Description: PGP signature


folder tab-completion to offer only folders containing new mail ?

2008-02-22 Thread Vladimir Marek
Hi,

would there be possibility to have some sort of folder name completion
which would offer only folders with new mail?

Let's say that after pressing '.' I can see:
"New mail in =INBOX, =vim-dev, =mercurial-devel"

I press 'c=m' ... nothing happens
second '' ... I can see

 1 IMAP  mailinglists
 2 IMAP  mercurial
 3 IMAP  mercurial-devel
 4 IMAP  mutt-interest
 5 IMAP  mutt-users

But only #3 contains new mail.

I would like to have some option which would let me tab-complete only
from folders containing new mail.

Thank you

-- 
Vlad


pgpoT7t9iXtfG.pgp
Description: PGP signature


Re: hooks from aliases

2008-02-20 Thread Vladimir Marek
> > Nice. What exactly are your settings doing? What my_list_folders does?
> 
> Hello Vladimir,
> 
> Usage:
> source "alias-hooks.php $alias_file|"
> folder-hook . 'special settings'
> folder-hook $my_list_folders 'other special settings'

Ah, I overlooked that, I thought that it's some secret mutt
configuration :)


> > I don't set up 'mailboxes' automatically, since I want to set the order
> > in which they are reported to have new mail according to my taste.

> With my script, the order is just the same as in the alias-file.

I originally thought about doing that too, but I mix regular subscribed
lists with some non-subscribed folders (specific filtered mail).
Moreover I'm subscribed to some lists, but I don't want to be bothered
by them at all (don't have them in 'mailboxes').

It's always nice to discuss what each other's usage patterns are.

Have a nice day
-- 
Vlad


pgpwRpuwCuygj.pgp
Description: PGP signature


Re: hooks from aliases

2008-02-20 Thread Vladimir Marek
> For my personal needs I've written a script to generate hooks from aliases:

> Output:
> fcc-hook '~C [EMAIL PROTECTED] ~C [EMAIL PROTECTED]' +a1a2
> save-hook '~L [EMAIL PROTECTED] ~L [EMAIL PROTECTED]' +a1a2
> fcc-save-hook [EMAIL PROTECTED] +a1
> fcc-save-hook [EMAIL PROTECTED] +a2
> fcc-save-hook [EMAIL PROTECTED] +a3
> fcc-save-hook [EMAIL PROTECTED] +a3
> fcc-save-hook [EMAIL PROTECTED] +a4
> fcc-save-hook [EMAIL PROTECTED] +a5
> set my_list_folders = /list1$|/list2$
> mailboxes =list1 =list2
> subscribe [EMAIL PROTECTED] [EMAIL PROTECTED]

Nice. What exactly are your settings doing? What my_list_folders does?

Over time I developed my approach to subscribing lists. I wanted
 - to be 'subscribe'd to the list
 - everything to be stored in .muttrc, no external files
 - pressing 'm' for new mail automatically offers list address
 - pressing 'r' for reply is redefined to 
 - sorting is threads

I don't set up 'mailboxes' automatically, since I want to set the order
in which they are reported to have new mail according to my taste. This
is because I'm subscribed to many aliases, but usually only few are
significant to me, so I want them to be reported first.

I put this definitions somewhere in the .muttrc. For mutt theese lines
are just comments:
=== List definitions ===
# LIST vim-dev[EMAIL PROTECTED]
# LIST dtrace-discuss [EMAIL PROTECTED]
# LIST mutt-users mutt-users@mutt.org
...


And at the end of .muttrc this perl script which parses .muttrc for
# LIST. $x is chr(39) is single quote "'".

`cat $HOME/.muttrc | perl -e '   \
  $x=chr(39);\
  map { $list{$1}=$2 if /^# LIST\s*(\S*)\s*(\S*)/ } <>;  \
  print "subscribe ", (join " ",  keys %list), " ; ";\
  if (keys %list)\
  {  \
for (keys %list) \
{\
  $mail =  $list{$_};\
  print "folder-hook =$_ ${x}";  \
  print "macro index,pager,attach \"m\" \"$mail\" ; "; \
  print "set sort=threads ; ";   \
  print "macro index,pager,attach \"r\" \"\"";   \
  print "${x};"; \
}\
  }  \
  print "\n";'`


Hopefully that will be useful to someone. Thanks for starting this
thread :)

-- 
Vlad


pgpSD3CCRKF2e.pgp
Description: PGP signature


Re: message index: new mail, mutt doesn't open right folder

2008-02-18 Thread Vladimir Marek
> mailboxes +foo +bar +stuff
> 
> and mutt is open all the time. The last mailbox I visited is foo/. Now mail
> arrives for all three boxes.  I'm in the message index and navigate to bar/,
> press Return to enter the mailbox. But instead of opening bar/, I'm ending up
> in foo/, i.e. the box which (1) also has new mail and (2) was the last mailbox
> that was open. 

You press "c=bar" +  and you end up in foo? That would sound like
bug to me. What underlying mail storage do you use? What mutt version?

-- 
Vlad


pgpr4IbuTUW4X.pgp
Description: PGP signature


Re: stripping html tags from email

2008-02-18 Thread Vladimir Marek
> Is there a way to trip html tags from an email when viewing or replying?

Does this help you ?

http://marc.info/?t=12023828163&r=1&w=2

-- 
Vlad


pgpEKkjqaStDk.pgp
Description: PGP signature


Re: How to deal with new mail?

2008-02-16 Thread Vladimir Marek
> > That is weird, I do not have explanation. I would try maildir as Kyle
> > suggested.

> This works like a charm! The mail is marked with 'N' in the folder view
> and everything!

At least we have something.


> > You can try with mailbox format in similar  way,

> This didn't work. Strange.


I don't know mutt internals well enough to help you dig deeper.


> > If even this fails, I'm out of ideas and I would try newer mutt
> > version.
> 
> So the easiest way out would be to switch to maildir format?
> Are there any advantages/disadvantages? Will it be easy to migrate to
> maildir with procmail and everything?

Well, mailbox is one huge file, maildir is directory full of small
files. If your filesystem has troubles with may files in dir, maildir
can be slow. Deleting mail from the middle of huge mailbox can be slow,
as it has to overwrite whole file (maybe mutt is here more clever and
just leaves space in the place of removed mail ? I don't know).
Transition from mailbox to maildir and vice versa is simple, there is
many tools (and you can use mutt just to copy all the mail to the other
format). If I remember correctly procmail, it's enough to name your
mailbox with trailing slash ("spam/" instead of "spam") and it will use
maildir format.


> Anyhow, using maildirs would feel like quitting...

I know that feeling, I had to dig inside mutt's guts few times (just to
find out that my header cache is in wrong encoding for example ;)).
Be warned that mutt's source is not easy to follow.

But hopefully someone who knows mailbox internals can tell you where to
look.

-- 
Vlad


pgpOPLs2CN8ET.pgp
Description: PGP signature


Re: How to deal with new mail?

2008-02-16 Thread Vladimir Marek
Hi,

> > I'm afraid that this is not possible with mutt, as it does not have
> > virtual folders, at least not ones containing mails from several
> > maildirs.
> 
> So I'll have to learn the mutt way. Thanks for your suggestions!

Or find another solution for your problem :)


> > Try pressing '.' (dot) in index, it should list all folders which have
> > new mail. However, there's question about what exactly is new mail. If
> > you set mark_old=yes (default), new mail is mail where you haven't seen
> > even the Subject line in index. If you set mark_old=no, new mail is mail
> > where you haven't seen body of the mail. (This does not work for IMAP,
> > but I do have patch available).
> 
> I did set mark_old=no and marked some mail in some folders as new with
> 'N' so it won't change to old when I leave the folder.
> But I can't get pressing '.' to work...nothing happens.

That is weird, I do not have explanation. I would try maildir as Kyle
suggested.

$ mkdir -p /tmp/maildir/{new,cur,tmp}

in mutt 
 - press 'C' (capital C for copy mail) and enter /tmp/maildir as
   destination.
 - press 'c' (lowercase for switching folders) and enter /tmp/maildir
 - you should see one mail; mark the mail as new (capital N)

$ find /tmp/maildir -type f
Should show one file in /tmp/maildir/new/some_random_filename

in mutt
 - press ':' (for entering commands) and type "mailboxes /tmp/maildir"
   without the quoting
 - switch to your mailbox (c =new), or how is it called
 - press '.' and you should see at least "/tmp/maildir" in status line


You can try with mailbox format in similar  way,
 - press 'C' and type /tmp/mailbox. You will be prompted if you want to
   create one
 - switch to the mailbox (c/tmp/mailbox)
 - set the mail as new (N)
 - switch to your mailbox (c =new), or how is it called
 - make mutt to check new mail (:mailboxes /tmp/mailbox)
 - '.' ...

If even this fails, I'm out of ideas and I would try newer mutt
version.

-- 
Vlad


pgpGn0bTo1Dgh.pgp
Description: PGP signature


Re: How to deal with new mail?

2008-02-15 Thread Vladimir Marek
Hi,

> I recently switched from evolution to mutt, and I wonder how to deal
> with new mail. In evolution, all received mail was sorted in
> diffenrent folders, but I had a special folder where all new unread
> mails would show up. I guess it was called a "search"-folder which
> only contained links to the mails in their "real" folders or
> something. If I marked mails as read they would not show up in that
> search folder any more, but in their "real" folders. This was a very
> convinient way to deal with new mail...

I'm afraid that this is not possible with mutt, as it does not have
virtual folders, at least not ones containing mails from several
maildirs.

> I set up mutt with fetchmail and procmail, with procmail sorting mails
> in mboxes. So when I start mutt, I get the index view of the spoolfile with 
> new mails
> in it. But what if I got new mail that was sorted by procmail into other
> mboxes? How do I know there is new mail without checking each mbox?
> 
> I've defined the mboxes according to the mutt manual,
> 
> set folder="$HOME/mail"
> mailboxes =mboxname
> 
> ...but the status bar would only display the number of new mails in the
> mbox I'm currently in and not how many of my mboxes have new mail.

Try pressing '.' (dot) in index, it should list all folders which have
new mail. However, there's question about what exactly is new mail. If
you set mark_old=yes (default), new mail is mail where you haven't seen
even the Subject line in index. If you set mark_old=no, new mail is mail
where you haven't seen body of the mail. (This does not work for IMAP,
but I do have patch available).


> I also don't get this sentence from the manual (3.11 Defining mailboes
> which receive mails):
> 
> "When changing folders, pressing space will cycle through folders with
> new mail."

> What does that mean? Is it when I press c to change folders and than I
> can press space? Or is it when I press y? I didn't see no folder-cycling 
> either way...

Now when you saw several folders having new mail (using the '.'), you
press 'c' and you will be offered first mailbox containing new mail.
Then pressing space will work as documented.


> Another way for dealing with new mail i thought of was this one:
> 
> 1:Every mail goes to the spoolfile, procmail just filters spam
> 2:Mails in the spoolfile are displayed sorted and coloured according to 
> their
> scoring, mail from friends first for example
> 3:Set up some kind of folder-hook-magic to save the mails from the
> spoolfile to their folders when exiting mutt.
> 
> Would this be possible? I fear I've read something about "mutt can only
> save to one mbox on exit"...

I'm not sure about step 3 :) You could write macro which pipes the mail
through different set of procmail rules and deletes the original mail.
Then you could bind such macro to a key. Simply pressing the key would
move given mail to correct mailfolder. This would work only for low
amount of mail, IMO.


I am subscribed to many mailinglists and I receive many emails per day.
I'm having mails sorted directly on IMAP server. Most of the time I'm
looking into my INBOX, where I limit the view only to new mail (press
'l' and type ~N). Time from time I press '.' to see which folders are
also having new mail. (Mutt shows in a status line that new mail in
different folder arrived, but I found it unreliable). Then I just go to
the folder(s) and read the mail(s). If I just don't have the time, but I
want to return really soon, I set the mail back to New state (pressing
capital 'N'), and the folder is still offered as having new mail
available. (This is why I need mark_old for imap).

Useful command here is the 'l'imit. But it's limited itself just to one
folder, and the results are not cached. (For each search mutt goes
through every mail in given maildir). The limit (and search) command is
however quite powerfull

http://www.mutt.org/doc/manual/manual-4.html#ss4.2

~m>7000 ~s oklahoma ~b camp ~z<10k

Look for mail where subject contains "oklahoma" body contains "camp",
them mail is less than 10kB in size and in your mailbox it's older than
7000th mail.

Hope this helps

-- 
Vlad


pgpokVxlf1ld4.pgp
Description: PGP signature


Re: Replying to html emails

2008-02-07 Thread Vladimir Marek
> > Is there a way to reply to an html based email and have all the tags
> > stripped out automatically?
> 
> If you have
>   auto_view text/html

And it's not limited to html. I do have MS Word convertor (antiword) and
Open Office convertor (odtview) enabled. I usually even don't notice
that someone sent the mail in such format.

> in your .muttrc, mutt will decode the HTML when you read the message
> and when you quote the message in a reply.  If the mail does not start
> out as a text/html messsage, you can change its content-type in the
> index with ^E.  If it just has an HTML component, you can change
> it with ^E in the attachments menu.

You can also set nametemplate in your .mailcap. My line for Open Office
looks like:


# View odt as text normally, printing opens soffice
application/vnd.oasis.opendocument.text; odtview %s; copiousoutput; 
print=display_wrapper /pkg/isv/bin/soffice -view %s; description="OpenDocument 
Text"; nametemplate=%s.odt


(display_wrapper sets my DISPLAY environment to the machine where I am
currently sitting - I'm running mutt from screen)

-- 
Vlad


pgpykXA0D0AZT.pgp
Description: PGP signature


Re: Extracting email addresses to abook

2008-02-07 Thread Vladimir Marek
Hi,

I'm using my own script for handling address book. It can read
address from mail stored on filesystem. Then I just added macro to mutt

macro index "a" "rm -f $HOME/.temp.txt\
touch $HOME/.temp.txt\
$HOME/.temp.txt\
$HOME/bin/mutt_abook.pl -a $HOME/.temp.txt"

The script then lets me select which address do I want to store and asks
for some optional comments, so that I can lookup the address easier
later.

Hope this helps

-- 
Vlad


pgppGTv7teXVP.pgp
Description: PGP signature


Re: Automatically change From according to recipient

2008-02-04 Thread Vladimir Marek
> I'm registered to some mailing lists with an address different from
> the one I usually use, so when I post to them I have to edit my From
> header. Is there a way to have mutt do this automatically when I email
> a certain address?

I believe that you are looking for
http://www.mutt.org/doc/manual/manual-3.html#send-hook

Alternatively, if your list is in it's own mailbox, you can use this
sequence:

folder-hook .   'my_hdr From: Just Me <[EMAIL PROTECTED]>'
folder-hook =emacs  'my_hdr From: Just Me <[EMAIL PROTECTED]>'

-- 
Vlad


pgph7ddBCpZJU.pgp
Description: PGP signature