Discussion:
save-message to ? and then sync the folder
(too old to reply)
t***@gmx.ch
2008-11-27 13:20:13 UTC
Permalink
Raw Message
Hello

how can I sync the mailbox after save a message to any folder like this:

macro s "<save-message>?"

the above works great, but after this save mutt should sync
automatically. Like this:

macro s "<save-message>?<sync-mailbox>"

but, this doesn't work, because mutt wait for any data from user and
take then ync-mailbox> as mailbox-destination, which is wrong.

any tips?

Thank you.
Raphael
Michael Elkins
2008-11-28 18:55:03 UTC
Permalink
Raw Message
Post by t***@gmx.ch
macro s "<save-message>?"
the above works great, but after this save mutt should sync
macro s "<save-message>?<sync-mailbox>"
but, this doesn't work, because mutt wait for any data from user and
take then ync-mailbox> as mailbox-destination, which is wrong.
Unfortunately Mutt does not have any way to do what you want. The
keyboard macro support is not really a substitute for full scripting,
which is really what you'd need here.

me
Rocco Rutte
2008-11-28 20:16:52 UTC
Permalink
Raw Message
Hi,
Post by Michael Elkins
Post by t***@gmx.ch
macro s "<save-message>?"
the above works great, but after this save mutt should sync
macro s "<save-message>?<sync-mailbox>"
but, this doesn't work, because mutt wait for any data from user and
take then ync-mailbox> as mailbox-destination, which is wrong.
Unfortunately Mutt does not have any way to do what you want. The
keyboard macro support is not really a substitute for full scripting,
which is really what you'd need here.
Hmm, how about

macro s "<save-message>?\n<sync-mailbox>"

or

macro s "<save-message>?<enter><sync-mailbox>"

if I get the problem right.

Rocco
Michael Elkins
2008-11-28 20:28:13 UTC
Permalink
Raw Message
Post by Rocco Rutte
Hmm, how about
macro s "<save-message>?\n<sync-mailbox>"
or
macro s "<save-message>?<enter><sync-mailbox>"
if I get the problem right.
I think the issue is that he would like to select a mailbox using the
folder browser, and then continue on executing the rest of the macro.

me
t***@gmx.ch
2008-11-30 16:36:31 UTC
Permalink
Raw Message
Post by Michael Elkins
Post by Rocco Rutte
macro s "<save-message>?\n<sync-mailbox>"
or
macro s "<save-message>?<enter><sync-mailbox>"
I think the issue is that he would like to select a mailbox using the
folder browser, and then continue on executing the rest of the macro.
yes, I want to using the browser, then after syncing the mailbox...

thanks for your answers
rap
Rocco Rutte
2008-12-01 11:16:58 UTC
Permalink
Raw Message
Hi,
Post by t***@gmx.ch
Post by Michael Elkins
Post by Rocco Rutte
macro s "<save-message>?\n<sync-mailbox>"
or
macro s "<save-message>?<enter><sync-mailbox>"
I think the issue is that he would like to select a mailbox using the
folder browser, and then continue on executing the rest of the macro.
yes, I want to using the browser, then after syncing the mailbox...
Sorry, that won't work as Michael described. I already wondered why
someone would name a mailbox "?" :)

Rocco
Kyle Wheeler
2008-12-01 15:17:05 UTC
Permalink
Raw Message
Post by t***@gmx.ch
macro s "<save-message>?"
the above works great, but after this save mutt should sync
macro s "<save-message>?<sync-mailbox>"
Well, the trick here is that you're giving mutt a bunch of things to
do all at once, as others on this list have suggested. HOWEVER, I
think this can be done if you're especially clever.

The '<save-message>?' part of the macro puts you into the browser. To
then get mutt to do something as you *exit* the browser (i.e. after
you've selected an entry), you'd need to tuck your desired behavior
into the methods of exiting from the browser. For example:

macro index s "<enter-command> macro browser \\<return\\>
'<select-entry><sync-mailbox>'<enter><save-message>?"

It would be even cooler if you could have the secondary macro clean up
after itself:

macro index s "<enter-command> macro browser \\<return\\>
'<enter-command>bind browser
return<enter><select-entry><sync-mailbox>'<enter><save-message>?"

... but there seems to be some problem with the handling of <enter> in
the rebinding part that I can't quite figure out.

~Kyle
- --
Look, I can surely say by now that I've got the antibodies to
communism inside me. But when I think of consumer society, with all
its tragedies, I wonder which of the two systems is better.
-- Pope John Paul II, 1979
David Champion
2008-12-01 23:40:58 UTC
Permalink
Raw Message
Post by t***@gmx.ch
Hello
macro s "<save-message>?"
the above works great, but after this save mutt should sync
macro s "<save-message>?<sync-mailbox>"
This works for me.

macro index S '<enter-command>set my_folder=`mutt-prompt "Save to folder" \\`; push <refresh><save-message>$my_folder\<enter\><sync-mailbox><enter>'

Be sure to enter it in only one line. The backslashes are wacky, but so
are mutt's quoting rules. This is no typo; it really does work on my
system.

A "mutt-prompt" script is required; see attachment.
--
-D. ***@uchicago.edu NSIT University of Chicago
Chris Bannister
2008-12-05 13:00:35 UTC
Permalink
Raw Message
^^^^^^^^^^^^^^^^^

Have you got a "%D" in your set attribution="On ... wrote:"?
On some lists you can get flamed for including the email address in the
attribution, (or anywhere in the body, I presume.), ... something about
"address havesters". It was interesting to note that the list(s)
mentioned had windoze users as subscribers, i.e. vim_use and a cygwin
list.

I notice the mutt default setting for the attribution doesn't include
the email address (%D?).
--
Chris.
======
I contend that we are both atheists. I just believe in one fewer god
than you do. When you understand why you dismiss all the other
possible gods, you will understand why I dismiss yours.
-- Stephen F Roberts
Patrick Shanahan
2008-12-05 14:11:05 UTC
Permalink
Raw Message
Post by Chris Bannister
^^^^^^^^^^^^^^^^^
Have you got a "%D" in your set attribution="On ... wrote:"?
he probably does not as that in mutt would not accomplish what you
describe. Look at "man muttrc" and you will find, %n <%a>
Post by Chris Bannister
On some lists you can get flamed for including the email address in the
attribution, (or anywhere in the body, I presume.), ... something about
"address havesters". It was interesting to note that the list(s)
mentioned had windoze users as subscribers, i.e. vim_use and a cygwin
list.
What makes it easier to get the addresses from the body than from the
header? They appear both places.
Post by Chris Bannister
I notice the mutt default setting for the attribution doesn't include
the email address (%D?).
:^)
--
Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535 @ http://counter.li.org
Chris Bannister
2008-12-12 08:59:46 UTC
Permalink
Raw Message
Post by Patrick Shanahan
Post by Chris Bannister
^^^^^^^^^^^^^^^^^
Have you got a "%D" in your set attribution="On ... wrote:"?
he probably does not as that in mutt would not accomplish what you
describe. Look at "man muttrc" and you will find, %n <%a>
Ooops, I think I spent considerable time finding out that wrong info. :(
Post by Patrick Shanahan
Post by Chris Bannister
On some lists you can get flamed for including the email address in the
attribution, (or anywhere in the body, I presume.), ... something about
"address havesters". It was interesting to note that the list(s)
mentioned had windoze users as subscribers, i.e. vim_use and a cygwin
list.
What makes it easier to get the addresses from the body than from the
header? They appear both places.
It could be that the messages are archived on the web without the
headers? or M$ users don't know about headers? (Any one know how to get
outhouse to display the headers?)
--
Chris.
======
I contend that we are both atheists. I just believe in one fewer god
than you do. When you understand why you dismiss all the other
possible gods, you will understand why I dismiss yours.
-- Stephen F Roberts
Michael Kjorling
2008-12-12 11:51:39 UTC
Permalink
Raw Message
(Any one know how to get outhouse to display the headers?)
In Outlook Express 6, open the message, then File -> Properties ->
Details. In Outlook 2007, right-click on the message and pick Message
options, then look under Internet headers.
--
Michael Kjörling .. ***@kjorling.se .. 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 *
David Champion
2008-12-05 15:26:15 UTC
Permalink
Raw Message
Post by Chris Bannister
Have you got a "%D" in your set attribution="On ... wrote:"?
On some lists you can get flamed for including the email address in the
Flame away, if it helps. :) I've been around a long time, and I think
including the address provides more good than harm (if it makes sense
to attribute at all). I don't really think that hiding people's e-mail
addresses on web pages is that much use anymore, but in any case that's
a job for the people putting e-mail on the web, not for me. It's easy
for them to do HTML entity encoding, which is still 100% effective as
far as I can see, without even chopping off domain-parts or converting
to bitmaps or replacing @ with (at) or whatever the flavor of the week
is.

That said, usually I delete the attribution altogether if I don't think
it provides any value. I've come to believe that often it doesn't.
It's cluttery, and if it doesn't really matter who I'm responding to,
why include it? I just forgot on the last one.
--
-D. ***@uchicago.edu NSIT University of Chicago
Rocco Rutte
2008-12-06 10:02:18 UTC
Permalink
Raw Message
Hi,
Post by David Champion
That said, usually I delete the attribution altogether if I don't think
it provides any value. I've come to believe that often it doesn't.
It's cluttery, and if it doesn't really matter who I'm responding to,
why include it? I just forgot on the last one.
On some lists I used to be subsribed to, people had broken mailers and
screwed up threading from time to time. In these cases, attributions
help to find parent messages to repair the threads.

Rocco
Kyle Wheeler
2008-12-06 15:21:14 UTC
Permalink
Raw Message
Post by Rocco Rutte
On some lists I used to be subsribed to, people had broken mailers
and screwed up threading from time to time. In these cases,
attributions help to find parent messages to repair the threads.
Broken mailers??? Say it ain't so!

~Kyle
- --
It was we, the people; not we, the white male citizens; nor yet we,
the male citizens; but we, the whole people, who formed the Union.
[...] Men, their rights and nothing more; women, their rights and
nothing less.
-- Susan B. Anthony
Chris Bannister
2008-12-12 08:59:59 UTC
Permalink
Raw Message
Post by David Champion
Post by Chris Bannister
Have you got a "%D" in your set attribution="On ... wrote:"?
On some lists you can get flamed for including the email address in the
Flame away, if it helps. :) I've been around a long time, and I think
including the address provides more good than harm (if it makes sense
to attribute at all). I don't really think that hiding people's e-mail
addresses on web pages is that much use anymore, but in any case that's
a job for the people putting e-mail on the web, not for me. It's easy
for them to do HTML entity encoding, which is still 100% effective as
far as I can see, without even chopping off domain-parts or converting
is.
That said, usually I delete the attribution altogether if I don't think
it provides any value. I've come to believe that often it doesn't.
It's cluttery, and if it doesn't really matter who I'm responding to,
why include it? I just forgot on the last one.
It helps to know who said what. For example, you can't tell who said the
first paragraph just from this message.
--
Chris.
======
I contend that we are both atheists. I just believe in one fewer god
than you do. When you understand why you dismiss all the other
possible gods, you will understand why I dismiss yours.
-- Stephen F Roberts
Loading...