Re: Body searching

2009-08-31 Thread Noah Slater
On Mon, Aug 24, 2009 at 12:57:11PM +0800, fvw wrote:
> / ~b EXPR

Thanks.

-- 
Noah Slater, http://tumbolia.org/nslater


Body searching

2009-08-23 Thread Noah Slater
Hey,

How can I search through the body of all messages in a folder?

I have mairix set up for my archives, but not my inbox. My current setup would
make it problematic to do so. Is it possible to do a simple search through the
message bodies of the current folder?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Displaying tar.gz archives

2009-07-22 Thread Noah Slater
On Thu, Jul 23, 2009 at 12:11:08AM +0200, Rocco Rutte wrote:
> Did you actually look up what "mime_lookup" means? If you would
> have done, you wouldn't have to worry. mime_lookup and mailcap do
> exactly the same as the octet filter script.

Nope! My bad!

> I just find the script more convenient as I don't have to write
> tons of mailcap entries.

Yeah, I think I prefer the mime_lookup method actually.

Thanks for prodding me,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Displaying tar.gz archives

2009-07-22 Thread Noah Slater
On Wed, Jul 22, 2009 at 11:26:09AM +0200, Rocco Rutte wrote:
> Just search the net for mutt.octet.filter. It's a shell script that has
> useful commands for displaying many MIME types, including listing the
> contents of a number of archive files.

Thanks, this works a treat.

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Displaying tar.gz archives

2009-07-22 Thread Noah Slater
On Wed, Jul 22, 2009 at 06:29:57PM +0200, Rado S wrote:
> There is also "mime_lookup application/octet-stream", and then the
> respective mailcap entry like "gzip -dc | tar -tvf -"

Well, I had considered this, but application/octet-stream is a catch-all MIME
type, and I can't blithely assume that it will always be this very specific type
of file. So going down this path like the wrong approach.

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Automatic thread collapsing

2009-07-22 Thread Noah Slater
On Tue, Jul 21, 2009 at 04:02:42PM -0500, Kyle Wheeler wrote:
> On Tuesday, July 21 at 03:03 AM, quoth Noah Slater:
> > Is there any way to get mutt to continually and automatically
> > collapse threads as you move around in the pager? So, if I select a
> > collapsed thread, it should be un-collapsed, but as I move out of
> > it, it is re-collapsed.
>
> I think it's probably possible, through creative re-binding of
> standard navigation keys, but there's no *easy* way to do it.

Ah, that's a shame.

Obviously, these things are subjective, but as someone who only uses one
mailbox, this feature is largely useless to me without automatic thread
re-folding. Would the developers be open to a feature request?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Displaying tar.gz archives

2009-07-22 Thread Noah Slater
Hey,

I would like to add a mailcap entry so that I view the contents of tar.gz
archives as a list of filenames, but I'm, not sure how to do it. When I attach
one, it is added with the application/octet-streem MIME type.

Any thoughts on how to approach this?

Thaks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Search previous command

2009-07-20 Thread Noah Slater
On Tue, Jul 21, 2009 at 08:27:33AM +0200, Peter Wiersig wrote:
> On Tue, Jul 21, 2009 at 03:15:37AM +0100, Noah Slater wrote:
> >
> > Is there a search-previous command, like the search-next command?
>
> Yup, see "?"

Ah, I was tripped up by the odd naming.

The following did the trick:

  bind index,pager p search-opposite

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Search previous command

2009-07-20 Thread Noah Slater
Hey,

Is there a search-previous command, like the search-next command?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Automatic thread collapsing

2009-07-20 Thread Noah Slater
Hey,

Is there any way to get mutt to continually and automatically collapse threads
as you move around in the pager? So, if I select a collapsed thread, it should
be un-collapsed, but as I move out of it, it is re-collapsed.

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Conditionally removing signature

2009-07-20 Thread Noah Slater
On Tue, Jul 07, 2009 at 02:06:23PM +0200, Rocco Rutte wrote:
> Please see if this example and text above it helps you:
>
>http://dev.mutt.org/doc/manual.html#ex-recips
>
> If I understand you right (mail _only_ to you: no sig, mail you and
> other in the recips: sig), then this may work (untested):
>
> >   send-hook .*  "source ~/.mutt/include/tumbolia"
> send-hook '^~C nsla...@...' 'unset signature'
> >   send-hook apache  "source ~/.mutt/include/apache"
> >   send-hook debian  "source ~/.mutt/include/debian"
> >   send-hook gnu     "source ~/.mutt/include/gnu"
>
> Does that help?

Worked like a charm!

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Inline text attachments

2009-07-20 Thread Noah Slater
On Fri, Jul 17, 2009 at 11:43:41AM -0500, Kyle Wheeler wrote:
> note in his attachment, he has:
>
> text/html; view %s; edit=emacs22 %s; compose=emacs22 ... %s; needsterminal

Thanks, I got this working now.

-- 
Noah Slater, http://tumbolia.org/nslater


Re: multipart/alternative question

2009-07-18 Thread Noah Slater
On Sat, Jul 18, 2009 at 09:37:04PM -0600, lee wrote:
> On Sat, Jul 18, 2009 at 10:51:05PM +0100, Noah Slater wrote:
> > On Sat, Jul 18, 2009 at 03:37:32PM -0600, lee wrote:
> > > > To the best of my knowledge, it isn't defined anywhere. But that 
> > > > doesn't matter.
> > > > The common understanding of an attachment is that it is a file, with a 
> > > > filename,
> > > > that has been sent as a separate item from the message.
> > >
> > > Well, then most people have a wrong understanding.
> >
> > This is an absurdly prescriptivist statement.
>
> I'm not sure what "prescriptivist" means.

Compare the following topics:

  http://en.wikipedia.org/wiki/Descriptive_linguistics

  http://en.wikipedia.org/wiki/Linguistic_prescription

In other words, if "most people" think "attachment" means "X" then, by
definition, attachment means "X" - regardless of your personal preference for
what it should mean. This is how language works.

> > As in, if you did a survey of all the people on the planet, and
> > asked them if they had ever saved the HTML component of a simple
> > email message, I am willing to bet the number would be under 1%.
>
> A simple email message doesn't have any HTML components.

That depends on what you mean by "simple" - and you have already demonstrated
that your definitions are unusual. That is not meant to be offensive, because I
can see where you're coming from. Nevertheless.

> You probably wouldn't get any valid results from such a survey because
> the percentage of people who wouldn't know what you're talking about
> would be too high.

I think that would probably support my thesis. Heh.

Best,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: multipart/alternative question

2009-07-18 Thread Noah Slater
On Sat, Jul 18, 2009 at 03:37:32PM -0600, lee wrote:
> > To the best of my knowledge, it isn't defined anywhere. But that doesn't 
> > matter.
> > The common understanding of an attachment is that it is a file, with a 
> > filename,
> > that has been sent as a separate item from the message.
>
> Well, then most people have a wrong understanding.

This is an absurdly prescriptivist statement.

> > > In Kyles example, that would be saving the html attachment to view it
> > > in a web browser. The user might do that himself, the MUA might do it
> > > automatically. If you use a MUA that cannot display text/plain, you
> > > might save the text/plain to display it ...
> >
> > This is NOT a typical use case.
>
> Why not? Mutt does it, sup does it.

Sure, many MUAs will let you do it, but it's not a typical use case.

As in, if you did a survey of all the people on the planet, and asked them if
they had ever saved the HTML component of a simple email message, I am willing
to bet the number would be under 1%.

> > The authors of the MUA.
>
> The RFC leaves it up to the user how he wants to display a (part of a)
> message. And since each user has preferences, it's not up to the
> authors of the MUA to force the user to display a message in a
> particular way or to decide what the user would consider as an
> attachment.

I never said force. I'm only talking about sane defaults.

> > And you should be free to configure your MUA to display those as 
> > attachments,
> > but the way you think about message parts is uncommon, and would be 
> > confusing
> > for the average user.
>
> Yeah, I configured mutt to count all attachments, but mutt doesn't do
> that. It doesn't go into some containers.
>
> Don't get me wrong: Reasonable defaults are fine and should be there,
> and since its up to each user, it doesn't matter what you or I or most
> users consider as an attachment. As you say, each user should be free
> to configure his MUA the way he wants.

Agreed.

Best,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: multipart/alternative question

2009-07-18 Thread Noah Slater
On Fri, Jul 17, 2009 at 10:21:29AM -0600, lee wrote:
> On Fri, Jul 17, 2009 at 02:36:41PM +0100, Noah Slater wrote:
> > I guess in some general sense you are correct, but within the
> > context of a MUA, an attachment has a very specific and well defined
> > meaning, that is much more narrow than this.
>
> Well, I'm not trying to mislead someone. Where is defined what an
> attachment is for the context of a MUA, and who made the definition?

To the best of my knowledge, it isn't defined anywhere. But that doesn't matter.
The common understanding of an attachment is that it is a file, with a filename,
that has been sent as a separate item from the message.

> > An attachment is a message entity that a user is likely to add or
> > save to and from the file system, as separate to the main message.
>
> In Kyles example, that would be saving the html attachment to view it
> in a web browser. The user might do that himself, the MUA might do it
> automatically. If you use a MUA that cannot display text/plain, you
> might save the text/plain to display it ...

This is NOT a typical use case.

> And who is to decide how likely a particular user is to save a
> particular attachment, for the purpose of the MUA counting the
> attachments?

The authors of the MUA.

> To me, it has clearly three attachments. It doesn't matter if a user
> is likely to save an attachment or not.

And you should be free to configure your MUA to display those as attachments,
but the way you think about message parts is uncommon, and would be confusing
for the average user.

Best,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: Inline text attachments

2009-07-17 Thread Noah Slater
On Tue, Jul 14, 2009 at 02:35:50PM -0500, Kyle Wheeler wrote:
> For reference, since people can and do rebind their keys, it's
> probably better to refer to things by their function names. In this
> case (as you can see from the help menu), it's .

Okay, thanks.

> You *can* automate the process, but creating a random file name is going to be
> difficult. Mutt isn't set up to do that. Most folks don't want multiple inline
> text parts (most of us just create a single text part).

When I create a new message, mutt creates a file like:

  /tmp/mutt-tumbolia-1000-2303-0

Is there no way to hook into the same thing?

Just to clarify, I have been using emails as a way or archiving various things
that I find on the Internet. If I am archiving an image from Wikipedia, I may
want to attach the image regularly, and then have two inline messages, one
containing the URI the image was retrieved from, and the other containing any
out-of-band metadata from the image page on Wikipedia.

This might sound like an odd way to be using emails, and I'm sure it is.
Hopefully though, you'll see that what I'm essentially wanting to send an email
with multiple, but separate, inline messages.

> You can add a line to your mailcap to handle text/plain messages that
> contains a "compose=" setting, like this:
>
>  text/plain; less; compose=emacs %s
>
> For a detailed explanation of that, read the mailcap man page.

Interestingly enough, this only seems to half work:

  footext/plain

Emacs is fired up, editing a file at /tmp/foo, which is correct.

After saving, I then do:

  

And a Vi is started, editing the correct file.

Interestingly enough, if I do:

  

Emacs is fired up, editing the correct file.

What's going on here? What's the difference between these two commands?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Re: multipart/alternative question

2009-07-17 Thread Noah Slater
Hey,

On Thu, Jul 16, 2009 at 10:16:57PM -0500, Kyle Wheeler wrote:
>  I   1 [multipart/alternative]
>  I   2 |-> [text/plain]
>  I   3 `-> [text/html]
[...]
> But anyway, I don't consider this message to have ANY "attachments".

On Thu, Jul 16, 2009 at 10:51:44PM -0600, lee wrote:
> Well, I would consider such a message as attachment only: No message
> (i. e. no body), only three attachments.
[...]
> The fact that all entities are attached to the message makes all of
> them attachments to the message, regardless of their purpose,
> regardless of how they might be attached to each other and regardless
> of how they are attached to the message.

Lee, directly or indirectly, you're just playing language games.

You're using the word "attach" to misleadingly describe the process by which a
message has message entities added to it. While this is certainly a valid use of
the word attach, you're then extrapolating that all entities must therefor be
attachments. I guess in some general sense you are correct, but within the
context of a MUA, an attachment has a very specific and well defined meaning,
that is much more narrow than this.

An attachment is a message entity that a user is likely to add or save to and
from the file system, as separate to the main message. A good litmus test,
although by no means perfect, would be if the entity has an explicit file name.
In the example that Kyle gave, there are clearly no attachments, and I would not
want to use a MUA that listed any.

Best,

-- 
Noah Slater, http://tumbolia.org/nslater


Inline text attachments

2009-07-14 Thread Noah Slater
Hey,

I would like to add new inline text attachments with ease.

At the moment, I am doing:

  nfoo.txttext/plain

This brings up vi to edit my text file.

Once this has been edited, I do:

  ^d

This seems to work, but I have a few questions:

  * Can I automate this whole process so that I can press a single button, and
it will create a new file similar to how it does for a regular message. I
don't want to have to think about naming this file, or typing it's mime type
out each time. I would also like it to be set to inline.

  * Why does it launch vi, when my EDITOR is set up correctly? Editing the
message correctly launches emacs. I see from the help that this may be using
mailcap, but am confused what I need to change.

Many thanks,

-- 
Noah Slater, http://tumbolia.org/nslater


Conditionally removing signature

2009-07-06 Thread Noah Slater
Hey,

I have the following configuration:

  send-hook .*  "source ~/.mutt/include/tumbolia"
  send-hook apache  "source ~/.mutt/include/apache"
  send-hook debian  "source ~/.mutt/include/debian"
  send-hook gnu "source ~/.mutt/include/gnu"

Each one of these files contains something like the following:

  set signature = "~/.mutt/signature/tumbolia"

I want to create a macro that sends an email to myself, and does so without any
signature. But this must not remove the signature for emails sent to multiple
recipients when I am also one of the recipients.

I originally tried:

  send-hook nsla...@tumbolia.org "set signature="

This works, except when I am including more than one person.

I tried something like the following:

  macro index,pager M "set signature=nslater"

Unfortunately, the send-hook commands above set it back again.

Any thoughts about how to do this?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater