Re: Send message as inline using mutt command line in script

2015-06-19 Thread Ian Zimmerman
On 2015-06-20 04:52 +0100, David Woodfall wrote:

> I have a script that emails a cover.txt message plus a pdf
> attachment, but the message, while being readable, shows as an
> attachment too:

This seems to be a common application (I'm aware of the pun).

I do it with a shell script involving mpack, without mutt.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



Re: Send message as inline using mutt command line in script

2015-06-19 Thread Will Yardley
On Sat, Jun 20, 2015 at 04:52:11AM +0100, David Woodfall wrote:
> 
> I have a script that emails a cover.txt message plus a pdf
> attachment, but the message, while being readable, shows as an
> attachment too:
> 
> [-- Attachment #1 --]
> [-- Type: text/plain, Encoding: 7bit, Size: 0.4K --]
> 
> Is there a way of having it send inline?

That's just how MIME works, that is, since the message has one non-ASCII
part, the entire message must be MIME encoded with a plaintext portion.
If you wanted, you could uuencode the attachment, but using MIME is the
better practice.

For recipients with a GUI mail client, this should appear as you'd
expect - a text message with an attached file.

In mutt, the text should appear "inline" (that is, without using an
external viewer or going to the file menu), but how else would you
expect to see the attached file if it doesn't show you the various
components of the message?

w



Send message as inline using mutt command line in script

2015-06-19 Thread David Woodfall

Hi,

I have a script that emails a cover.txt message plus a pdf
attachment, but the message, while being readable, shows as an
attachment too:

[-- Attachment #1 --]
[-- Type: text/plain, Encoding: 7bit, Size: 0.4K --]

Is there a way of having it send inline?

The command I am using at the moment:

mutt -a cv.pdf -s "Vacancy Enquiry" -- $email < cover.txt

Any ideas would be great, thanks.


Re: Quotes [Was: saving messages to files/permissions?]

2015-06-19 Thread Ian Zimmerman
On 2015-06-19 17:11 -0500, David Champion wrote:

Ian> Now compare this correct, but horribly complex analysis (can a
Ian> human really do that habitually?) with the SuperCite "nonstandard"
Ian> [1] quoting I use.  Which is easier to read, honestly?  If it is
Ian> a matter of colorizing in the mutt pager, a simple setting of
Ian> quote_regexp in .muttrc fixes that.  (This should count as ob-mutt
Ian> content.)

David> Are we really going to do this?

Of course not. ;-)

Anyway, I'm fine with using supercite sparingly - only when multiple
different attributions are required.  Then the readability difference
does matter to me.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



Re: Quotes [Was: saving messages to files/permissions?]

2015-06-19 Thread David Champion
Ian> Erik> Mattias> Chris> Tom> Greetings all, Not sure if this may be a
Ian> Erik> Mattias> Chris> Tom> debian problem but
Ian> Erik> Mattias> Chris> Tom>
Ian> Erik> Mattias> Chris> Tom> I often save individual incomming emails
Ian> Erik> Mattias> Chris> Tom> in seperate files in my home directory
Ian> Erik> Mattias> Chris> Tom> with the mutt "s" command.
Ian> Erik> Mattias> Chris> Tom>
Ian> Erik> Mattias> Chris> Tom> In any session, the first time I save to
Ian> Erik> Mattias> Chris> Tom> a particular file it goes fine.
Ian> Erik> Mattias> Chris> Tom>
Ian> Erik> Mattias> Chris> Tom> However if I try to save another message
Ian> Erik> Mattias> Chris> Tom> to the same file, I get "Permission
Ian> Erik> Mattias> Chris> Tom> denied."
Ian>
Ian> Erik> Chris> I never wrote any of the above!
Ian>
Ian> Erik> And the quoting does show that. Compare the inner "Chris
Ian> Erik> Bannister" quote with the outer: In the outer, the leftmost
Ian> Erik> '>' ladder links your name with the last quoted sentence. In
Ian> Erik> your inner, the third '>' ladder links your name with nothing
Ian> Erik> at all, i.e. no attribution to you. The whole of the central
Ian> Erik> block of quoted text is solidly attributed to Tom Fowle by an
Ian> Erik> unbroken fourth '>' ladder, is it not?
Ian>
Ian> Now compare this correct, but horribly complex analysis (can a
Ian> human really do that habitually?) with the SuperCite "nonstandard"
Ian> [1] quoting I use.  Which is easier to read, honestly?  If it is
Ian> a matter of colorizing in the mutt pager, a simple setting of
Ian> quote_regexp in .muttrc fixes that.  (This should count as ob-mutt
Ian> content.)

Are we really going to do this?

-- 
   David Champion • d...@uchicago.edu • University of Chicago


Re: How can i see the message ID of a message

2015-06-19 Thread David Champion
* On 19 Jun 2015, Michael Tatge wrote: 
> * On Fri, Jun 19, 2015 06:29PM +0200 I (tatg...@gmail.com) muttered:
> > * On Fri, Jun 19, 2015 02:56PM +0200 ybau...@gmail.com (ybau...@gmail.com) 
> > muttered:
> > > Is there a key shortcut in the index/pager to display the MessageID of 
> > > the current email?

Another approach.  I have 4 different versions of my index_format,
depending on what I want to see (and how much), what kind of window I'm
in, etc.  I have a key binding ("Y") that toggles through the list.  You
could do the same with index_format or status_format to display only the
message-id.

Here's my recipe exactly as I use it.  I've replaced the actual values
of the index_format with "INDEX_YY" because my index_formats are very
long and don't work in a regular mutt build, and I don't want to confuse
the issue by displaying them here.  Just substitute your preferences
there.  

macro index =y0 "set 
index_format='INDEX_Y0'macro index Y '=y1'"
macro index =y1 "set 
index_format='INDEX_Y1'macro index Y '=y2'"
macro index =y2 "set 
index_format='INDEX_Y2'macro index Y '=y3'"
macro index =y3 "set 
index_format='INDEX_Y3'macro index Y '=y0'"
push =y0

If you only wanted two toggle settings:

macro index =y0 "set 
index_format='INDEX_Y0'macro index Y '=y1'"
macro index =y1 "set 
index_format='INDEX_Y1'macro index Y '=y0'"
push =y0

The "push =y0" is used instead of setting $index_format directly, so as
to queue up the next item in the list.

So if you used this formula in pager, you could have a toggle that puts
the message-id in the status bar, then when pressed again, removes it.
(%i represents the message-id).

-- 
David Champion • d...@bikeshed.us


Re: Quotes

2015-06-19 Thread Derek Martin
On Fri, Jun 19, 2015 at 10:34:42AM -0700, Ian Zimmerman wrote:
> On 2015-06-19 18:59 +1000, Erik Christiansen wrote:
> 
> > If email is uncomfortable, may I recommend the newfangled twitterface
> > thing?
> 
> A look at the top of supercite.el shows the first version was released
> in 1993.  

...and used by almost no one ever since. ;-)

> So the supercite style is maybe a decade younger, at most, than your
> "traditional" style.

I'm not so sure about your timeline.  the BSD mail program inserted
replies quoted thusly for as long as I can remember... and no doubt
the practice predated its existence in that program.  I can't say when
the feature was included in BSD mail, but the program has existed
since the 70's...  Alas, finding a definitive answer will take more
time to research than I am willing to expend on the effort. 

Not that it matters, because as I said, pretty much no one uses
"supercite", or ever has...

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpy93fLWVtau.pgp
Description: PGP signature


Re: save and reply

2015-06-19 Thread Jon LaBadie
On Fri, Jun 19, 2015 at 11:16:39AM -0700, Kevin J. McCarthy wrote:
> Jon LaBadie wrote:
> > > Perhaps the resolve setting could help?
> > 
> > No, the bulk of email gets either a "d" or "s" and moving
> > to the next message is fine.  Except in the case where I
> > would like to reply.  Setting resolve to no would create
> > extra steps for the ones to which I don't reply.
> 
> I was thinking something like:
> 
> macro index,pager ,dr "unset 
> resolveset resolve"
> 

Looks like it might work.  I'll try it.
I was expecting something like save msg #, delete,
return to saved msg #, reply.  Essentially a mimic
of my normal work flow.

jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: save and reply

2015-06-19 Thread Kevin J. McCarthy
Jon LaBadie wrote:
> > Perhaps the resolve setting could help?
> 
> No, the bulk of email gets either a "d" or "s" and moving
> to the next message is fine.  Except in the case where I
> would like to reply.  Setting resolve to no would create
> extra steps for the ones to which I don't reply.

I was thinking something like:

macro index,pager ,dr "unset 
resolveset resolve"

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
http://www.8t8.us/configs/gpg-key-transition-statement.txt


signature.asc
Description: PGP signature


Re: save and reply

2015-06-19 Thread Jon LaBadie
On Fri, Jun 19, 2015 at 10:42:02AM -0700, Kevin J. McCarthy wrote:
> Jon LaBadie wrote:
> > As I'm configured, a save deletes the message and
> > moves to the next unread message.  This is reasonable
> > behavior.  But if I want to reply to that same message,
> > before hitting "r", I must return to the now deleted
> > message, possibly stepping over other deleted messages.
> 
> Perhaps the resolve setting could help?

No, the bulk of email gets either a "d" or "s" and moving
to the next message is fine.  Except in the case where I
would like to reply.  Setting resolve to no would create
extra steps for the ones to which I don't reply.

Thinking about it, a "delete AND reply" would be useful
as well as a "save AND reply".

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: save and reply

2015-06-19 Thread Kevin J. McCarthy
Jon LaBadie wrote:
> As I'm configured, a save deletes the message and
> moves to the next unread message.  This is reasonable
> behavior.  But if I want to reply to that same message,
> before hitting "r", I must return to the now deleted
> message, possibly stepping over other deleted messages.

Perhaps the resolve setting could help?

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
http://www.8t8.us/configs/gpg-key-transition-statement.txt


signature.asc
Description: PGP signature


Re: Quotes

2015-06-19 Thread Ian Zimmerman
On 2015-06-19 18:59 +1000, Erik Christiansen wrote:

> If email is uncomfortable, may I recommend the newfangled twitterface
> thing?

A look at the top of supercite.el shows the first version was released
in 1993.  So the supercite style is maybe a decade younger, at most,
than your "traditional" style.

I like your tone, though.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



save and reply

2015-06-19 Thread Jon LaBadie
The recent thread on list reply reminded me on one
minor annoyance.

As I'm configured, a save deletes the message and
moves to the next unread message.  This is reasonable
behavior.  But if I want to reply to that same message,
before hitting "r", I must return to the now deleted
message, possibly stepping over other deleted messages.

Not a big thing, but have I overlooked a "save AND reply"
command (or macro)?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: How can i see the message ID of a message

2015-06-19 Thread Michael Tatge
* On Fri, Jun 19, 2015 06:29PM +0200 I (tatg...@gmail.com) muttered:
> * On Fri, Jun 19, 2015 02:56PM +0200 ybau...@gmail.com (ybau...@gmail.com) 
> muttered:
> > Is there a key shortcut in the index/pager to display the MessageID of the 
> > current email?

You could also extract the message-id by piping the message.
macro index,pager I 'formail -czxMessage-ID:'

HTH,
Michael
-- 
PGP-Key-ID: EEE7D043
Jabber: in...@jabber.de


Re: How can i see the message ID of a message

2015-06-19 Thread Michael Tatge
* On Fri, Jun 19, 2015 02:56PM +0200 ybau...@gmail.com (ybau...@gmail.com) 
muttered:
> Is there a key shortcut in the index/pager to display the MessageID of the 
> current email?

As others noted there's .
Also you can change which headers are weeded by unignore/ignore.

If you really want to bind a key for that you could write a macro.
I assume you don't want to show message-id per default.

macro index i 'ignore message-id'
macro index I 'unignore message-id'
macro pager I 'unignore message-id\
ignore message-id'

HTH,
Michael
-- 
PGP-Key-ID: EEE7D043
Jabber: in...@jabber.de


Re: How to ask mutt to not check for new mail

2015-06-19 Thread Derek Martin
On Thu, Jun 18, 2015 at 09:27:05PM -0400, Jon LaBadie wrote:
> Such a change would have no effect on current settings of > 0,
> likely 99.99+ percent of mutt installations.  And for those few
> who do use mail_check == 0, a change to "1" would be little
> affected as far as I can see.

While I agree this is well-intentioned, there are only a few problems
with this:

 - behavior changes like this are not particularly well-publicized;
   and there's no way to know how many people might be using the
   existing behavior.

 - If you have it set to zero and want that behavior, changing the
   behavior of 0 from "check instantly" to "check never" is a pretty
   huge, unintuitive change.  It will be far from obvious why mutt has
   suddenly stopped checking mail.  You should avoid doing this to
   your users without a strong, compelling reason.

 - It does not actually accomplish the goal; mutt will still check
   mail periodically despite this, as I've now pointed out for the
   third time.

All in all, I think making a change here is asking for more trouble
than it's really worth.  You could gate the behavior change on yet
another config variable, but OPNAMCS. [Oh please, not another mutt
configuration setting.]  IMO, this just isn't worth it, to please the
one person who's asked for it in 20 years...


-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpiPzAxgDrYl.pgp
Description: PGP signature


Re: How can i see the message ID of a message

2015-06-19 Thread Suvayu Ali
On Fri, Jun 19, 2015 at 09:42:20AM -0400, Nathan Stratton Treadway wrote:
> On Fri, Jun 19, 2015 at 09:21:30 -0400, Joshua Smith wrote:
> > 
> > On Fri, Jun 19, 2015 at 02:56:23PM +0200, ybau...@gmail.com wrote:
> > > Hi,
> > > 
> > > Is there a key shortcut in the index/pager to display the MessageID
> > > of the current email?
> > > 
> [...] 
> > I usually hit h to view the headers. then / Message-ID.  Still not great
> > but less cumbersome than the process you described I think.
> 
> Also, note that if you want to see the Message-Id header all the time,
> you can get it to appear in the default message view by tweaking the
> ignore and unignore commands in your /etc/Muttrc and/or .muttrc files

Maybe something like this:

  ignore *
  unignore From: Date: To: Cc: Subject: Reply-To: List-ID: Message-ID: 
In-Reply-To:
  hdr_order From: Date: To: Cc: Subject: Reply-To: List-ID: Message-ID: 
In-Reply-To:

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


Re: How can i see the message ID of a message

2015-06-19 Thread Nathan Stratton Treadway
On Fri, Jun 19, 2015 at 09:21:30 -0400, Joshua Smith wrote:
> 
> On Fri, Jun 19, 2015 at 02:56:23PM +0200, ybau...@gmail.com wrote:
> > Hi,
> > 
> > Is there a key shortcut in the index/pager to display the MessageID
> > of the current email?
> > 
[...] 
> I usually hit h to view the headers. then / Message-ID.  Still not great
> but less cumbersome than the process you described I think.

Also, note that if you want to see the Message-Id header all the time,
you can get it to appear in the default message view by tweaking the
ignore and unignore commands in your /etc/Muttrc and/or .muttrc files

Nathan


Re: How can i see the message ID of a message

2015-06-19 Thread Joshua Smith

On Fri, Jun 19, 2015 at 02:56:23PM +0200, ybau...@gmail.com wrote:
> Hi,
> 
> Is there a key shortcut in the index/pager to display the MessageID of the 
> current email?
> 
> Sounds stupid but after a while I found nothing in the documentation to do so 
> easily. The only way I found is cumbersome: when I hit 'r' in order to reply 
> to the email, my editor is spawned with the MessageID set in the header of 
> the reply I'm supposed to edit. Then I am able to copy that field and 
> whatever I am supposed to do with it. Is there a better/easier way to get 
> that value?
> 
> Regards
> Yves

I usually hit h to view the headers. then / Message-ID.  Still not great
but less cumbersome than the process you described I think.

Thanks,

-- 
Joshua Smith
Lead Systems Administrator WVNET

Montani Semper Liberi


How can i see the message ID of a message

2015-06-19 Thread ybaumes
Hi,

Is there a key shortcut in the index/pager to display the MessageID of the 
current email?

Sounds stupid but after a while I found nothing in the documentation to do so 
easily. The only way I found is cumbersome: when I hit 'r' in order to reply to 
the email, my editor is spawned with the MessageID set in the header of the 
reply I'm supposed to edit. Then I am able to copy that field and whatever I am 
supposed to do with it. Is there a better/easier way to get that value?

Regards
Yves

Re: How to ask mutt to not check for new mail

2015-06-19 Thread Erik Christiansen
On 18.06.15 20:21, Patrick Shanahan wrote:
> * Xu Wang  [06-18-15 20:06]:
> > On Thu, Jun 18, 2015 at 7:28 PM, Derek Martin  
> > wrote:
>  [...]
> > > Having answered the question, I am pretty curious:  Why on earth would
> > > you want to do that?!
> > 
> > The reason is that I have focus problems (attention deficit disorder I
> > believe is the English term). I would like to start Mutt and have Mutt
> > check for new mail *at the initial starting* and then address all of
> > the mail there, and only after that check if there is new mail. If I
> > am working on my inbox and all of a sudden a new email arrives, it
> > completely throws me out of focus. I imagine this must be difficult
> > for many to understand but that is how I am.

As I must turn off the radio before I can properly focus, your plight is
not difficult to imagine. (Oddly, people who continuously check their
mobile phone, seem to relish being disturbed. Each to his own. :-)

> I understand the need for "no distraction" but cannot understand what
> checking mail has to do with that unless you have some buffy pgm advising
> new mail.  My setup only advises where new mail is when I change files
> (mbox) and the request to change files provides the next file which has
> "new mail".  Ie: I do not disable checking mail but do not get a visible
> or interruptive announcement of new mail.  But my vision my be limited as
> I *only* employe mbox and read remotely via ssh into my server box.

Reading mail locally here, I see the name of a mailbox with new mail
spontaneously appear in the status line, at least when I'm in the index.
(Not sure about the browser.) While working in another xterm, the
apparent movement is immediately obvious visually. Subsequently hitting
'.' does, though, often throw up a longer list of mailboxes, so the
buffy display may be done only on the first positive check?

It can be a distraction, but that is easily cured by lowering the
xterm. (I use four, two per side of a wide screen, auto-launched, and
with mutt auto-started in one of them.)

If I really had to prevent mutt checking mail too often, then I'd just
prevent mutt checking mail too often - set timeout to a very high value,
as previously suggested.

Erik

-- 
Gods don't like people not doing much work. People who aren't busy
all the time might start to _think_.  - Terry Pratchett, "Small Gods"


Re: In index_format, what does %? mean?

2015-06-19 Thread Erik Christiansen
On 18.06.15 16:55, Alan Mackenzie wrote:
> Just as a matter of interest, when I hit  in mutt, I get the error
> message:
> 
>sh: sensible-pager: command not found
>gzip: /usr/share/doc/mutt/manual.txt.gz: No such file or directory
>Press any key to continue... 
> 
> The manual is actually at /usr/share/doc/mutt-1.5.23-r5/manual.txt.bz2.
> This is on Gentoo GNU/Linux.  Is there anything I can configure to tell
> it that?  If not, it would be nice if there were (if it's not too tricky
> to implement, which it probably would be).

Though not finding anything in the manual, I did find this in
/etc/Muttrc :

# Show documentation when pressing F1
macro generic,pager  " zcat /usr/share/doc/mutt/manual.txt.gz 
| sensible-pager" "show Mutt documentation"

If you use bzcat and your filename in a copy of that, in your .muttrc,
all should be well, in a jiffy.

Erik

-- 
The cure for boredom is curiosity. There is no cure for curiosity.


Re: "reply to list" from compose menu?

2015-06-19 Thread Michael Tatge
* On Thu, Jun 18, 2015 02:51PM -0400 Xu Wang (xuwang...@gmail.com) muttered:
> Often I make the mistake of pressing "r" to reply to the list when
> indeed I would like to press "L". 
> I can of course edit the "to" but I would like to just
> be able to press "L" (if I understand correctly, this might also
> correctly set some headers).
> 
> Is there anyway to implement such a bind?

No, but you could use a folder- or message-hook to bind "r" to 
I.e.:

folder-hook . 'bind index,pager r reply'
folder-hook =mailinglists 'bind index,pager r list-reply'

message-hook . 'bind index,pager r reply'
message-hook ~l 'bind index,pager r list-reply'

message-hook of course has the disadvantage that you need to view the
message first.

HTH,
Michael
-- 
PGP-Key-ID: EEE7D043
Jabber: in...@jabber.de


Re: Quotes [Was: saving messages to files/permissions?]

2015-06-19 Thread Erik Christiansen
On 18.06.15 08:59, Ian Zimmerman wrote:
> On 2015-06-18 21:06 +1000, Erik Christiansen wrote:
> 
> Chris> I never wrote any of the above!
> 
> Erik> And the quoting does show that. Compare the inner "Chris
> Erik> Bannister" quote with the outer: In the outer, the leftmost '>'
> Erik> ladder links your name with the last quoted sentence. In your
> Erik> inner, the third '>' ladder links your name with nothing at all,
> Erik> i.e. no attribution to you. The whole of the central block of
> Erik> quoted text is solidly attributed to Tom Fowle by an unbroken
> Erik> fourth '>' ladder, is it not?
> 
> Now compare this correct, but horribly complex analysis (can a human
> really do that habitually?) with the SuperCite "nonstandard" [1] quoting
> I use.

Shooting yourself in the foot is your problem, whether you are adult
enough to understand that or not. Your deliberate corruption of the
columnar alignment preserved by all the positive contributors to the
thread is not something which concerns anyone else.

Proper traditional quoting is almost universal on all the mailing lists
I inhabit, and I delete unread most posts which deviate, simply because
it is not worth my time to bother with nonstandard flowed rubbish.

To come the raw prawn with such nonsense on the mutt ML in particular
would border on trolling, were it not so comical. Do you post because we
are supposed to feel sorry for your masochism?

If email is uncomfortable, may I recommend the newfangled twitterface
thing?

Erik

-- 
Patient:  "Doctor, it hurts when I do this..."
Doctor:  "Well, don't do that!"