Re: Assigning multiple labels (X-Label) to a message

2020-12-16 Thread Luis Mochan
I use multiple space separated labels using only one X-label field to
locally to classify my emails. I limit them with ~y and made some
scripts to assign/edit them.

Regards,
Luis

On Wed, Dec 16, 2020 at 03:42:07PM +0100, Marcus C. Gottwald wrote:
>
> Dear fellow Mutt users,
>
> I have incoming email messages which get multiple labels assigned
> by "procmail" piping through "formail -A", adding an "X-Label"
> header line for each label.
>
> Mutt fetches those email messages via IMAP and appears to be
> looking at only the last X-Label header line when (a) formatting
> the index using the "%y" selector in "index_format" and
> (b) limiting using the "~y" pattern. (I'm using Mutt from current
> Debian stable, i.e. version 1.10.1.)
>
> What's the recommended way to deal with multiple labels assigned
> to an email message? Can I make Mutt look at the values of all
> X-Label header lines? Should I change the procmail recipes to
> append (or prepend) additional labels to an existing X-Label
> header line instead of adding new lines? When using multiple
> labels in a single X-Label header line, are there any advantages
> in using a specific delimiter (space, comma, ...)?
>
> Cheers, Marcus
>
> --
>Marcus C. Gottwald  ··  @mcg:cheers.de
>
>

--

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Av. Universidad s/n CP 62210 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB


Re: Muttprint

2018-03-07 Thread Luis Mochan
On Thu, Mar 08, 2018 at 09:42:02AM +1100, Brian Salter-Duke wrote:
> Is there a recent version of muttprint? After an upgrade of Ubuntu to 17.10, I
> get this error:-
> 
> $* is no longer supported. Its use will be fatal in Perl 5.30 at 
> ./bin/muttprint line 1649.
> String found where operator expected at ./bin/muttprint line 1693, near "if 
> ($_[0] eq ""
> Global symbol "$text" requires explicit package name (did you forget to 
> declare "my $text"?) at ./bin/muttprint line 1650.
> 

Found this on my perl manual (perldoc perlvar):
   $* was a variable that you could use to enable multiline matching.
   After a deprecation cycle, its magic was removed in Perl v5.10.0.
   Using it now triggers a warning: "$* is no longer supported". You
   should use the "/s" and "/m" regexp modifiers instead.
   Deprecated in Perl 5.
   Removed in Perl v5.10.0.



-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: Emacs automatic line wrapping

2017-08-03 Thread Luis Mochan
On Wed, Aug 02, 2017 at 08:49:30PM -0700, Ian Zimmerman wrote:
> On 2017-08-02 21:47, Jason wrote:
> 
> > I am using emacs24 for my text editor with mutt (in a terminal).
> > How can I set it to automatically wrap the lines at a certain number
> > of characters?
> 
> "M-x auto-fill-mode" will do it in a new buffer, provided you set your
> fill-column variable.

If you have already opened your buffer, you can wrap the lines of a paragraph 
with M-q.

You can set the fill column to say, 72 with C-u 7 2 C-x f

Regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




[SPAM?] Re: [SPAM?] Re: Re: Can I use Mutt from Bash to extract attachments into an arbitrary directory?

2016-09-16 Thread Luis Mochan
On Fri, Sep 16, 2016 at 11:45:44AM -0300, Marcelo Laia wrote:
> On 15/09/16 at 08:10am, Luis Mochan wrote:
> ...
> When I press 
> 
> Shift+y followed by s in index mode view, current body message is saved inside
> $HOME/attachments/ as textfile0 name.
Yes. The text parts of the message are saved as texfile0, textfile1,...
The named attachments, if present, are saved using their names.
> 
> The next commands is one line or they are 3 lines?
> 
> set - ~/attachments/*
> [ "$*" != "$HOME/attachments/*" ] && rm ~/attachments/*
> ripmime -i - -d ~/attachments
> 
They are three lines.
> Thankx
Regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




[SPAM?] Re: [SPAM?] Re: [SPAM?] Can I use Mutt from Bash to extract attachments into an arbitrary directory?

2016-09-15 Thread Luis Mochan
On Thu, Sep 15, 2016 at 11:33:41AM +0200, Richard Z wrote:
> On Thu, Sep 15, 2016 at 10:53:02AM +1000, Cameron Simpson wrote:
> > On 14Sep2016 16:12, Are Troi  wrote:
> > > Last night at a technical talk I lamented the loss around 5 years ago
> ...
> tried ripmime and munpak about a year ago to save all attachments from 
> a large MBOX and it was everything but a hasslefree experience. Various 
> attachments were missed or not processed, some segfaults.
> Those tools are apparently not as robust as mutt is.

I have used ripmime without problems but on individual messages from a
Maildir, not on a large mbox.

Luis




[SPAM?] Re: Can I use Mutt from Bash to extract attachments into an arbitrary directory?

2016-09-15 Thread Luis Mochan
On Thu, Sep 15, 2016 at 07:55:12AM -0300, Marcelo Laia wrote:
> On 14/09/16 at 08:06pm, Luis Mochan wrote:
>  
> > Maybe you could use the program 'ripmime' directly from bash. I found
> > it in the debian repositories. I use it manually through a mutt macro
> > 
> > macro index Ys "| ~/.mutt/saveattachments\n" "Save attachments"
> > 
>  
> Hi, I try to use your script, nut, when I hint Y, mutt tell me that "Key Y is
> not mapped"
You should first define the macro! You could do it interactively (for
testing purposes) by typing : (colon) followed by the macro definition
above, i.e.,
  :macro index Ys...
by making a text file whose content is the macro definition and
sourcing it from mutt
  :source filename.txt
or by adding it to you ~/.mutt/muttrc file so that it is loaded
automatically on the next mutt startup. Afterwards, you should be
able to call the macro when you are in the 'index' view. You could
replace Ys to the key sequence of your choice to call the macro. 

> 
> What could I doing wrong?
> 
> -- 
> Marcelo
> 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




[SPAM?] Re: Can I use Mutt from Bash to extract attachments into an arbitrary directory?

2016-09-14 Thread Luis Mochan
On Wed, Sep 14, 2016 at 04:12:48PM -0700, Are Troi wrote:
> Hi All,
> 
> Last night at a technical talk I lamented the loss around 5 years ago
> from Fedora of command-line tools to extract email attachments from a
> BASH script and a colleague told me Mutt can do this.
> ...

Maybe you could use the program 'ripmime' directly from bash. I found
it in the debian repositories. I use it manually through a mutt macro

macro index Ys "| ~/.mutt/saveattachments\n" "Save attachments"

in my muttrc file. The script 'saveattachments' is the following

#!/bin/bash
# put filenames into arguments
# empty directory unless it is already empty
set - ~/attachments/*   
[ "$*" != "$HOME/attachments/*" ] && rm ~/attachments/*
ripmime -i - -d ~/attachments

I always use the same directory to save the attachments manually, but
I guess the lines above may be modified to let mutt save the
attachments automatically in the desired directory.

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




[SPAM?] Re: add the content of another email to new message

2016-08-16 Thread Luis Mochan
To this end I always run several instances of mutt simultaneously
under tmux. One with inbox, others with inbox-read-only,  mbox, and
sent.

On Wed, Aug 17, 2016 at 08:17:43AM +1000, Cameron Simpson wrote:
> On 16Aug2016 19:58, Jethro Tull  wrote:
> > I'm using vim as editor in mutt. I would like to find a way to dump the
> > content of another email or part to a new message while being composed.
> > Of course without running a new instance of mutt.
> 
> Why not by running a new instance of mutt?
> 
> Without that, you need some kind of tool that _vim_ can invoke to access
> message content. How are you intending to designate that message from inside
> vim?
> 
> Note that you can reply to more that one message from mutt itself, before
> you start composing: tag multiple messages, then  (or
>  or whatever). You'll get all their text quoting in the reply
> template.
> 
> Cheers,
> Cameron Simpson 
> 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: Very annoying quirk in mutt 1.5.24 on xubuntu 16.04

2016-05-13 Thread Luis Mochan
> > ...Why would you ever exit Mutt anyway? =8^)
> > 
> :-)
> 
> On my desktop machine I *don't* often exit from mutt as it tends to
> have a  dedicated terminal window.  However I ssh into my dekstop
> machine from all sorts of remote locations using various different
> means and then multiple terminals with one dedicated to mutt aren't
> really possible.

I guess that if you were to run mutt under tmux (or screen) in your
desktop, you could ssh to it from your other locations, attach to your
tmux session running your mutt window and when finished detach from
tmux instead of closing mutt. 

Regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: utf-8 characters not shown

2016-04-26 Thread Luis Mochan
Hello,
I was able to see the cat and the mouse in K9/Android, but not in
mutt under Debian/stretch running in an xterm. However, while I write
this reply using emacs as my editor, I see the codes 01F 40B and 01F
401, so I guess the characters were not removed by mutt, but my system
is lacking the fonts to display them.

 

Regards,
Luis


On Tue, Apr 26, 2016 at 08:08:23AM +0200, Florian Lohoff wrote:
> 
> Hi,
> 
> i found the below utf-8 string in perl6 examples and thought that it would be 
> a
> good test in a signature - I immediatly found my own mutt wouldnt display it. 
> I
> see it correctly in vim editing the mail. Locale is UTF-8, everythings fine. I
> send the email and find the utf8 characters in the mail display to be removed.
> 
> I am currently puzzled to why and where this happens. As i dont
> see garbage characters my impression is that the encoding is
> correct but some tool in the processing path removes the characters
> for beeing malicious or not in the display font or whatever.
> 
> I do see the correct output with k9 mail on android though ...
> 
> I checked that mutt correctly detects utf-8 locales.
> 
> This happens with mutt 1.5.24-1 Debian/Jessie and
> 1.5.20-9+squeeze4 on Debian/Squeeze.
> 
> Flo
> -- 
> Florian Lohoff f...@zz.de
>   UTF-8 Test: The  ran after a , but the  ran away



-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




signature.asc
Description: PGP signature


Re: How do you survive without notmuch?

2016-04-07 Thread Luis Mochan
On Thu, Apr 07, 2016 at 10:50:13PM +0200, bastian-muttu...@t6l.de wrote:
> On 07Apr16 19:53 +0200, Andreas wrote:
> > Am 07.04.2016 um 01:19 schrieb Cameron Simpson:
> ...
> By now I cannot imagine any solution which is more flexible (for me).
> Comments welcome!
I do basically the same, with some scripts to add Xlabels to
individual messages, instead of saving them in different
mailboxes/maildirs. 
> > Me too and while it does find the message it does not tell me /where/ it
> > is. How do you do this?
> 
> I do not precisely know about notmuch, but the indexers I know about
> they create links to the original mail in a temporary maildir folder. At
> least follow those links.
> Actually, to find the location of a mail file grepmail is a nice tool,
> which I used long time ago.

I use maidir-utils. mu find can show you the actual location of a
message if you use the option --fields "... l" as in

  mu find from:somefriend tag:somelabel --fields "d f s l"

which prints date, from, subject and location for each matching message.

Regards,
Luis


Re: Is there a tool I can use to convert a whole email to webpage or something alike?

2015-11-19 Thread Luis Mochan
Maybe a script calling mhonarc (though I haven't used for some time).
Luis

On Mon, Nov 16, 2015 at 12:03:46PM +0800, Magicloud Magiclouds wrote:
> Hi,
> 
> Using Mutt, one pain is dealing with multi-media emails. Yes, with
> w3m, I could almost read the email. And I could save the pictures then
> view them. But this is too much work if I repeat it too many times.
> 
> So is there a way that, I could press a hotkey in Mutt, it would pipe
> current email to some converter then open browser with the result
> webpage?
> 
> -- 
> 竹密岂妨流水过
> 山高哪阻野云飞
> 
> And for G+, please use magiclouds#gmail.com.
> 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `>/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: Invoking an alternative command on a MIME part

2015-04-28 Thread Luis Mochan
 Oh, but now you need a different pipe depending on the file type,
 e.g. for PDF and PNG. I don't really want that as mailcap already
 handles this.
I use it only when I want to override mailcap for whatever
reason, and then I specify the program I want to use in the pipe
command. Otherwise I simply use Return or m to view-attach or
view-mailcap.
Regards,
Luis



signature.asc
Description: Digital signature


Re: Invoking an alternative command on a MIME part

2015-04-27 Thread Luis Mochan
What I do in similar situations is pipe the attachment to a helper (I
call it muttfilter) that accepts as first argument a file name, as
second argument a command name and as further arguments any options to
that command. The helper copies the attachment to the filename, runs
the command with all its arguments and with the file name as the last
argument. Thus, to open a password protected pdf from the attachments
menu I would type
   |muttfilter mydocument.pdf xpdf -upw mysecretpassword
and to edit a picture with gimp I would type
   |muttfilter mypicture.jpg gimp
For temporal filenames I always use the same name (rem.pdf or
rem.jpg), so new files replace old ones.

The muttfilter script is

  #!/bin/bash
  cat -  $1
  $2 ${@:3} $1

Hope it's helpful.
Best regards,
Luis


On Tue, Apr 28, 2015 at 12:17:46PM +1000, Cameron Simpson wrote:
 On 27Apr2015 09:23, martin f krafft madd...@madduck.net wrote:
 also sprach Cameron Simpson c...@zip.com.au [2015-04-26 22:54 +0200]:
  Apphelper first asks whether to view the file, offering the
  supplied view command in [square brackets] as the default.  Pressing
  return or entering y or yes' accepts this default and runs the
  viewer.  Entering n or no skips running the viewer.  Other
  answers are taken to be the name (and optional arguments) of a
  viewing program.
 
 Superficially that sounds like exactly what you're asking for.
 
 Yes, it does and thanks for being so persistent. I am sorry for
 being finicky about this, but I know how things go and I don't want
 to have to press enter 99% of the time just to accept a default so
 that I can select a different viewer in 1% of the cases.
 
 That is why my ah wraper (specific to my own preferences) passes the -y
 option to apphelper. Note also that apphelper honours a $APPHELPER_OPTS
 environment variable so you can tune your default options.
 
 What I really want is view-attach to grow a sibling:
 edit-attach, which would spawn run-mailcap --action=edit instead
 of the default --action=view. And then I could view or edit at the
 press of one of two button without having to engage in an
 interactive session requiring me to react to prompts.
 
 Sounds like a job for a mutt macro. A first cut would be to write a macro
 which pointed $mailcap_path at a different mailcap file, then ran
 view-attach, then restored the old value.
 
 Keeping two mailcaps can be tedious unless you autogenerate one from the
 other, eg by making the ask version prepend apphelper or similar to the
 front of end mailcap command.
 
 Another approach would be a macro that pipes the attachment into a script
 that saves its input (making your temp file) and prompts for a command to
 issue with that file.
 
 If mutt had a setenv command you could also write a macro to set an
 environment variable (eg $APPHELPER_OPTS for apphelper) before invoking
 view-attach, causing different behaviour from the same mailcap command. Eg
 to make apphelper ask or not ask about the viewer.
 
 But it doesn't, AFAIK.
 
 yet anothe possibility: let me direct your attention to mutt's
 view-mailcap command, bound to m in the attachments menu.  (return
 runs view-attach.) view-mailcap is described in section 3.2.2 Search
 Order in the mutt manual.  I have just read it 3 or 4 times and believe I
 now have a slight handle on what it does. It might be possible to adapt it
 to get you a view with default (return) and a view with question for
 command (view-mailcap/m). I am not yet convinced though.
 
 I do not properly understand view-mailcap versus view-attach. I would
 appreciate someone else chiming in here.
 
 Alternatively, this could probably be solved even more generically
 e.g. by allowing a sequence like '%' to appear in the shell-escape
 command line, which, if present, causes a temporary file to be
 written and injected into the command line. I bet there could be
 plenty of use-cases for this. The advantage of letting mutt write
 the temporary file is that mutt knows more about the file than
 children commands. mutt could even substitute %n for the filename
 and %t for the mime-type.
 
 Yes, that would help.
 
 Cheers,
 Cameron Simpson c...@zip.com.au
 
 Yes, [congress is] petty and venal and selfish.  That's why they're called
 _representatives_.  - Will Durst
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
Consider using GnuPrivacyGuard https://www.gnupg.org/
My key: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB, yours?





Re: mutt's counterpart feature to gmail's archive?

2015-04-16 Thread Luis Mochan
BTW, you would also need 'formail'
Regards,
Luis
ps. I just read about notmuchfs. Looks nice too.

On Thu, Apr 16, 2015 at 05:34:57PM +0200, M. Fioretti wrote:
 On 2015-04-16 16:33, Luis Mochan wrote:
 
 Dear Marco,
 Please find attached my perl script.
 
 thanks for the script and the clear explanations!
 
 Marco
 -- 
 http://mfioretti.com
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: mutt's counterpart feature to gmail's archive?

2015-04-16 Thread Luis Mochan
On Thu, Apr 16, 2015 at 07:08:50AM +0200, M. Fioretti wrote:
 On 2015-04-16 03:28, Luis Mochan wrote:
 The system is not too
 polished but serves me fine and has some similarities to gmails label
 system. If interested, I can share it.
 
 I **am** interested, please do it

Dear Marco,
Please find attached my perl script. You should have the packages
Term::Readline (I use Term::Readline::Gnu) and File::Copy. It takes
two arguments, an action and the name of the file with the message to
edit. The action should be one of menu, edit, append, remove, show,
clean, list (in practive I only use 'edit'). If a change is performed,
the message is replaced by the edited version. To use the programs I
made some mutt macros. The relevant part of my muttrc file is:



# labels
# remember original editor. 
# Might not be what you want if editor is changed afterwards
set my_editor=$editor

macro index y enter-commandset editor=\~/.mutt/editlabel.pl edit\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Edit labels

macro index YE enter-commandset editor=\~/.mutt/editlabel.pl edit\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Edit labels

macro index YM enter-commandset editor=\~/.mutt/editlabel.pl menu\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Loop over label menu

macro index YA enter-commandset editor=\~/.mutt/editlabel.pl append\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Append labels

macro index YR enter-commandset editor=\~/.mutt/editlabel.pl remove\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Remove labels

macro index YS enter-commandset editor=\~/.mutt/editlabel.pl show\\n\
tag-prefixedit\
enter-commandset editor=\$my_editor\\n Show labels

macro index YC enter-commandset editor=\~/.mutt/editlabel.pl clean\\n\
tag-prefixeditnext-undeleted\
enter-commandset editor=\$my_editor\\n Clean labels

macro index YL enter-commandset editor=\~/.mutt/editlabel.pl list\\n\
tag-prefixedit\
enter-commandset editor=\$my_editor\\n List labels

macro index YX limit!~h X-Label:enter Limit to unlabelled
macro index YY limit~h X-Label:enter Limit to labelled

macro index \Cy limit~y  Limit view to label

#show labels in index
set index_format=%4C %Z %{%b %d} %-15.15L %?M?(#%03M)(%5l)? %?y?(%.20Y) ?%s

#display labels in messages
unignore X-Label:
##

In practice I only use
  YX to display only unlabelled (i.e., unprocessed messages),
  YY to only show processed messages (afterwards I use T to tag those
 messages and move all of them to mbox) 
  y to insert/add/modify space separated labels
  \Cy to display only messages with a given label
The program has history and completion to ease label edition. To that
end, I use a file .mutt/Xlabels to store all the previously used
labels. 

I use this system under debian linux using perl 5.18 (haven't upgraded
it) under perlbrew.

Regards,
Luis


 
 Thanks,
 Marco
 -- 
 http://mfioretti.com
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
Consider using GnuPrivacyGuard https://www.gnupg.org/
My key: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB, yours?



#! /usr/bin/env perl

use strict;
use warnings;
use Fcntl qw(:DEFAULT :flock);
use Term::ReadLine;
use File::Copy;
use locale;

my ($action, $filename)=@ARGV;
my $labelfilename=$ENV{HOME} . /.mutt/Xlabels;
die $filename not readable unless -r $filename;
#die $labelfilename not readable. Create it. unless -r $labelfilename;
die strange filename unless $filename=~m{([^/]*)$};
my $basefilename=$1;
my $tmpfilename=/tmp/editlabels-$basefilename.$$;
my $history=$ENV{HOME}/.editlabelhistory;
my $maxhistory=100; #how many labels to remember in history
my $current=''; #current labels
my %current;
my %previouscurrent;
my %labels;
my %previouslabels;


sysopen LABELS, $labelfilename, O_RDWR|O_CREAT or die Can't open $labelfilename $!; 
flock(LABELS, LOCK_SH) 
or die Can't lock $labelfilename $!; #puts a shared lock
chomp(my @labels=LABELS);
foreach(@labels){ #use %labels to remove duplicates
$labels{$_}++;
}
%previouslabels=%labels;

my $term=new Term::ReadLine 'X-Labels'; # prepare terminal to read labels
my $attribs=$term-Attribs;
$attribs-{completion_entry_function}=
$attribs-{list_completion_function};
$term-using_history;
$term-ReadHistory($history) if -r $history;

my $wrong=;

if($action eq menu){
for(;;){
	$attribs-{completion_word} = 
	[qw(append clean edit list remove show quit 
Append Clean Edit List Remove Show Quit)];
	$action=lc $term-
	readline($wrong Append/Edit/Remove/Show/Clean/List/Quit: );
	$action=~s

Re: mutt's counterpart feature to gmail's archive?

2015-04-15 Thread Luis Mochan
 What is mutt's counterpart feature to gmail's archive? what is used here?
 I don't want to delete messages, but I want to have them locally searchable, 
 like gmail can do.
 What is the best practice? Just to move to another folder?

It might not be the 'best' but I made a perl program to edit X-Labels
and use mutt's macros to call it and to limit mutt's view to labelled,
unlabelled, or labelled with a desired set of labels. I save incoming
mails to a single maildir after processing them. When it grows too
large, I move old messages to the latest of a stack of maildirs. I
index with 'mu' my maildirs daily. When I need to view old messages I
use 'mu find' to make a virtual maildir of all messages that satisfy
any criteria, such as having specified labels. I use tmux to open
several windows with mutt: one for inbox, one for the current maildir,
one for sent not yet labelled messages, one for a read only version of
inbox, and one for not yet deleted spam. The system is not too
polished but serves me fine and has some similarities to gmails label
system. If interested, I can share it. 

Regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB




Re: Disabling specific SMTP authenticator

2014-08-19 Thread Luis Mochan
 I don't think i have a .msmtprc file, what program is that associated with?
msmtp, lightweight smtp client, http://msmtp.sourceforge.net/



mask

2013-11-18 Thread Luis Mochan
In my email setup I recently changed from mboxes to maildirs. I access
my maildirs directly from my office and through imap from home using
dovecot. When I made the conversion using dovecot's dsync program
the maildir folders acquired a leading dot in their names. I found
that agreeable, as it allowed me to distinguish maildir names from other
files that dovecot put within the maildirs. To that end, I changed my 'mask'
to 
  set mask=^\\.[^.]
which works reasonably well when listing maildirs.

My problem is that when I enter the file browser, for example, to
attach a file, I don't see any file, as I would with the default mask 
  set mask=!^\\.[^.]

My question is, is there a hook or something I can use to change
the mask according to what I'm browsing for, either a
maildir or a file? I guess I could define a macro to do that, bind it
to some key, and execute it whenever needed, but I would like to know
if it can be done automatically.

Thanks and best regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: I have forgotten ...

2013-06-20 Thread Luis Mochan
I use alt-q.

On Thu, Jun 20, 2013 at 08:35:25AM -0600, Paul E Condon wrote:
 I am having a mental block, and cannot remember how to
 wrap text in Emacs while composing an email. Specifically,
 I need help remembering what key, or keys, should be
 pressed after selecting a region of text to get that 
 region reflowed according to the current settings.
 I am using Debian Wheezy. I am using Mutt and Emacs as
 installed by the Debian installer. Or maybe I have also
 forgotten some special configuring that I had to do to
 get this reflow working.
 
 I really don't need to be told RTFM. I am 80 yrs old. 
 I forget things. 
 Please help
 
 -- 
 Paul E Condon   
 pecon...@mesanetworks.net
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: using a file selection command

2013-05-10 Thread Luis Mochan
 To a degree. In edit mode, add an Attach: header. When you exit
 edit mode, mutt will attach the named file.
 
Thanks! Very nice trick. 


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: Long urls - update

2013-04-02 Thread Luis Mochan
Dear Kyle,
 ...
  /etc/urlhandler/url_handler.sh is a shell script that obtains its 
  url doing '$url=$1'.
 
 Ahh, indeed, that could cause a problem. Variables are substituted 
 simply, in an as if typed manner. Take this simple example:
 ...
Thanks for your explanation. As I wrote last night, the problem
seems to have been solved (following one of your early suggestions).
Best regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




signature.asc
Description: Digital signature


Re: Long urls - update

2013-04-02 Thread Luis Mochan
Hello James,
 You are not using the program correctly. extract_urlview has worked
 perfectly with mutt, for me, for probably about 2 years now. Why bother
 trying to integrate it into your shell script, just use it as a
 stand-alone program and don't use urlview at all.
 
 the contents of my ~/.extract_urlview:
 COMMAND firefox %s 
 ...
As there are so many types of URLs, and I am not sure whether my
browser can handle all of them correctly, I wanted to continue using
the same handler that urlview, the program I used until a few days
ago, used. I guess your suggestion would work for most, or maybe all
of the cases, and the complexity of /etc/urlview/url_handler.sh may be
unnecessary, but now it is working and, at the end, the fix was
trivial, i.e. changing 'COMMAND /etc/urlview/url_handler.sh' into
'COMMAND /etc/urlview/url_handler.sh %s'.
Thanks and regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




signature.asc
Description: Digital signature


Re: Long urls - update

2013-04-01 Thread Luis Mochan
Hi John,

 I guess I'm the slow one on the list.
 Is there more to the patch than commenting out
 
 # $command =~ s/%s/'$url'/g;
 
 and replacing it with
 
 $command=~s//\\/g
I didn't comment out that line; it is needed to replace %s by the URL
in the 'COMMAND' that actually opens the URL. What I did was modify
the two 'system' calls. In a previous email to the list I included the
patch.
 Ahh, see it's included in a message by Luis Mochan in this thread.
By the way, the author of the program, Kyle Wheeler, wrote to me that
he expects that adding the line
 COMMAND /etc/urlview/url_handler.sh '%s'
to the configuration file ~/.extract_urlview would be enough to solve
the problem (with %s between quotes). I believe I had tried that and
that it didn't work, but now I'm not completely sure. You could try it. 
Best regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: Long urls - update

2013-04-01 Thread Luis Mochan
 By the way, the author of the program, Kyle Wheeler, wrote to me that
 he expects that adding the line
  COMMAND /etc/urlview/url_handler.sh '%s'
 to the configuration file ~/.extract_urlview would be enough to solve
 the problem (with %s between quotes). I believe I had tried that and
 that it didn't work, but now I'm not completely sure. You could try it. 

Well I tried it and it doesn't work without the patch; it is not
enough to add '%s' to COMMAND.  
Regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: Long urls - update

2013-04-01 Thread Luis Mochan
Hi Kyle,
 I'm the author of extract_url.pl, so perhaps I can shed some light 
 here.
Thanks.
 The *correct* place to fix the issue of escaping (or otherwise 
 sanitizing) ampersands is in the sanitizeuri function (line 208). The 
 current version of extract_url.pl uses this:
 
  sub sanitizeuri {
  my($uri) = @_;
  $uri =~ 
 s/([^a-zA-Z0-9_.!*()\@:=\?\/%~+-])/sprintf(%%%X,ord($1))/egs;
  return $uri;
  }

I tried now your fix, and it didn't work for me; my browser doesn't
find the resulting pages when the url has ampersands that are
converted to %26 (probably because the % itself is further encoded as
%25 before been sent to the server by the browser (?))

 ...
 I've personally never had a problem with ampersands, and I'm not sure 
 why some people do. Extract_url.pl constructs system commands like so:
 
/path/to/handler 'http://url.with/anampersand'

I changed my handler to '/bin/echo %s tmp.txt' and it wrote the
correct result, so I guess you're right here. 

 ... which should be perfectly safe and work just fine (and does for 
 me). I suspect the problem stems from using other wrapper script (e.g. 
 /etc/urlhandler/urlhandler.sh). I bet the that wrapper script is not 
 properly quoting its first argument.

I don't know much about shell programming, but I found that
/etc/urlhandler/url_handler.sh is a shell script that obtains its url
doing '$url=$1'. I replaced the whole handler by the following
program:
#! /bin/bash 
url=$1; shift
echo $url tmp.txt; 
and found out that the url is cut short at the first ampersand. 

I don't understand why echo by itself yields the correct result (above)
while echo through a bash script yields the truncated result.

Thanks and best regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




signature.asc
Description: Digital signature


Re: Long urls - update

2013-04-01 Thread Luis Mochan
 Unix shell handles variables abysmally.  You need to help it a lot to
 do the right thing.  *Always* quote variables, else if they're empty
 they tend to blow up on you.
Thanks for the advice! Your script did work from the command line, but
it was not enough when called from extract_url.pl.
Anyway, I believe that the fix is as simple as adding %s to the COMMAND
COMMAND /etc/urlview/url_handler.sh %s
(as suggested by Kyle) without touching anything else. I thought I had
attempted that before, but I guess now that I made some mistake (as
also suggested by Kyle). I still don't understand why %s fixes the
problem, though. Thanks everybody. 
Best regards,
Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




signature.asc
Description: Digital signature


Re: Long urls - update

2013-03-31 Thread Luis Mochan

Dear John,

On Sat, Mar 30, 2013 at 05:15:28PM +0100, John Niendorf wrote:
 This looks really great, but where do I put the script?
 I made it exicutable and put it in my path and I got the error that it wasn't 
 there.
 I coped it to ~/ and got the same error.
 
 John
 
 http://www.memoryhole.net/~kyle/extract_url/
 
 Try this. It's brilliant.

I put it in one of the subdirectories of my $PATH (in ~/bin) and made
the program executable (chmod +x ~/bin/extract_url.pl). I made a
configuration file (~/.extract_urlview) with a sinngle line (COMMAND
/etc/urlview/url_handler.sh) which is the COMMAND used by default by
urlview, the program I employed previously, I installed the
prerequisite perl packages and it worked nicely (under
Debian/testing). I hope it helps. In particular, I liked the fact that I
can see the context of the url's so I don't have to guess anymore which url to
choose. 
Best regards,
Luis
 
-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: Long urls - update

2013-03-31 Thread Luis Mochan
I found a mistake in the extract_url.pl program: it doesn't escape
ampersands when present in the url, so when the command to actually
view the url is invoked, the shell gets confused. I made a quick fix
by substituting $command=~s//\\/g before running command.

  http://www.memoryhole.net/~kyle/extract_url/
  Try this. It's brilliant.

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: Long urls - update

2013-03-31 Thread Luis Mochan
 Line 633?  634?  So:
 
# $command =~ s/%s/'$url'/g;
$command=~s//\\/g;

Sorry for not having given the line numbers, etc. I actually made
changes around  522 and 647, and defined a new subroutine (I named it
wlmsanitize) which modifies the command to run. A patch
follows. 
 
 I'm a perl guy, yet that's non-trivial here.  Thx.  :-)
 
You're welcome. I don't know if there are other characters that appear
in an url and need to be escaped for the shell ([;]?); they could
easily be accomodated by modifying 'wlmsanitize'. The page for the
extract_url project (http://www.memoryhole.net/~kyle/extract_url/)
mentions that the program already transforms characters dangerous to
the shell, but then it only mentions explicitly single quotes and
dollar signs. 

Best regards,
Luis

--
patch to fix ampersands in urls :
 

--- extract_url.pl~ 2013-03-31 12:35:39.303174972 -0600
+++ extract_url.pl  2013-03-31 15:10:47.822005282 -0600
@@ -519,7 +519,7 @@
} else {
$urlviewcommand .=  $url;
}
-   system $urlviewcommand;
+   system wlmsanitize($urlviewcommand);
exit 0;
}
 
@@ -644,7 +644,7 @@
);
}
if ($return) {
-   system $command;
+   system wlmsanitize($command);
if ($stayopen == 0) {
exit 0 if ($persist == 0);
} else {
@@ -689,6 +689,14 @@
print $value\n;
}
 }
+
+sub wlmsanitize {
+my $cmd=shift @_;
+$cmd =~ s//\\/g;
+return $cmd;
+}
+
+
 =head1 NAME
 
 Bextract_url.pl -- extract URLs from email messages


signature.asc
Description: Digital signature


Re: Run command on an attachment

2013-02-27 Thread Luis Mochan
Dear Salve, Thomas,

On Wed, Feb 27, 2013 at 08:36:44PM +0100, Thomas Wallrafen wrote:
 Hello once more,
 
 On Wed, Feb 27, 2013 at 08:28:43PM +0100, Thomas Wallrafen wrote:
  Hej,
  
  On Wed, Feb 27, 2013 at 08:14:13PM +0100, Salve Håkedal wrote:
   ...
   Is it possible to scp an attachment directly from mutt?
  

A short time ago I posted here a small script which may be useful to
run arbitrary commands on arbitrary attachments. I put the cursor on
the desired attachment and tipe:

| muttfilter filename program [arguments ...]

where filename is the name with which you want to save the attachment
(maybe temporarily) and program is the program or script you want to
run on that file. The arguments are optional. Maybe it can be useful
to run the script that copies to the other machine and runs
openoffice, etc. You could have a different script for each required file type
The script is:

#!/bin/bash
# muttfilter
# to filter from mutt
#first copy standard in to regular file giving some name
# then open with some program using some arguments
#Usage muttfilter name program args
cat -  $1
# Then run command with given arguments on filename
$2 ${@:3} $1


  Well, you could try at least something like below:
  
  macro attach ,p 'pipe-entryssh -X  user@remotehost cat -  ~/out.odt; 
  oowriter ~/out.odtenter
  
  So you can type ,p upon the attachment and get it opened on the remote
  host.
  
  Obvious drawback is the hard coded program on the remote host - but
  that should be easily replacable by sth acting dependent upon the file
  extension.
 
 ok, the latter was rubbish because afaik you will not be able to set
 the file name on the remote host dynamically. However, you could still
 (a) define one macro per file extension or (b) try to use file(1) to
 invoke the right program.
 
 bye,
 
 thomas

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: sidebar patch

2013-02-11 Thread Luis Mochan
On Tue, Feb 12, 2013 at 08:02:39AM +1100, Brian Salter-Duke wrote:
 On Mon, Feb 11, 2013 at 09:53:17AM +0100, Scott Stevenson wrote:
  On Mon, Feb 11, 2013 at 06:56:46AM +1100, Brian Salter-Duke wrote:
   On Sun, Feb 10, 2013 at 06:46:11PM +0100, Scott Stevenson wrote:
On Sun, Feb 10, 2013 at 07:52:57PM +0530, dexter wrote:
 ...
 easier to use mutt without it. Unfortunately installing mutt-patched
 installed /usr/bin/mutt-patched but overwrote /usr/bin/mutt to be a soft
 link to mutt-patched. I had to uninstall mutt-patched and then reinstall
 mutt to get rid of the sidebar. Back to normal now.
 

Under Debian you could run 

  sudo update-alternatives --config mutt

to choose which mutt (patched or not) to run by default. I guess that
Ubuntu is similar. Thus, it was not really necessary to
uninstall/reinstall in order to test and choose among the two mutt versions. Of
course, you already did...
Best regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: sidebar patch

2013-02-11 Thread Luis Mochan
On Tue, Feb 12, 2013 at 08:29:29AM +1100, Brian Salter-Duke wrote:
 ...
  
  Under Debian you could run 
  
sudo update-alternatives --config mutt
  
  to choose which mutt (patched or not) to run by default. I guess that
  Ubuntu is similar. Thus, it was not really necessary to
  uninstall/reinstall in order to test and choose among the two mutt 
  versions. Of
  course, you already did...
 
 Indeed. I used the synaptic package manager. That is probably more
 simple minded than updating from a prompt in the terminal. Nevertheless
 it is very easy to use.
 

I guess there is some confusion: Synaptic, like aptitude and apt-get,
is for installing and removing packages. Update-alternatives is to
choose which program to use when you have several programs installed
that offer similar functionality, such as the patched and the
un-patched versions of mutt. You may install both using synaptics and
then choose which one to use (by default) without uninstalling the
other. 
Regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG: DD344B85,  2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: sidebar patch

2013-02-11 Thread Luis Mochan
On Tue, Feb 12, 2013 at 09:22:20AM +1100, Brian Salter-Duke wrote:
 ...
  I guess there is some confusion: Synaptic, like aptitude and apt-get,
  is for installing and removing packages. Update-alternatives is to
  choose which program to use when you have several programs installed
  that offer similar functionality, such as the patched and the
  un-patched versions of mutt. You may install both using synaptics and
  then choose which one to use (by default) without uninstalling the
  other. 
 
 No, that is not how it worked. I had the normal mutt for months.
 Yesterday I installed mutt-patched and it overwrote mutt. It was just a
 link to mutt-patched. Am I missing something?
 
Dear Brian,

 I guess there is still some confusion. When you installed
mutt-patched, mutt was overwritten. The same thing happened to me.  In
my system, /usr/bin/mutt is a link pointing to
/etc/alternatives/mutt. Furthermore, /etc/alternatives/mutt is a link
pointing to /usr/bin/mutt-patched, which is the actual binary for the
patched version of mutt. Using the command update-alternatives as I
mentioned a couple of messages ago, this link may be replaced by a
link to /usr/bin/mutt-org, which is the binary for the unpatched
mutt. Thus I can experiment alternating freely between mutt-patched
and mutt (unpatched) without having to uninstall either. I use Debian,
but I understand that the 'alternatives' system is available in Ubuntu
also. 

Best regards,
Luis


Re: mktemp: failed to create file via template

2013-02-05 Thread Luis Mochan
I use mutt under Debian/wheezy. I don't have the directory
/home/user/tmp and yet I don't have this problem. Where is the template for
the temporal files defined?
Best regards,
Luis


On Tue, Feb 05, 2013 at 06:57:15PM +0100, Csanyi Pal wrote:
 
 Hi,
 
 after the upgrade of my operating system Debian GNU/Linux 7.0 (wheezy) I
 can't send anymore mails in Mutt. 
 
 Whenever I type 'y' to send a newly created or postponed message, I get
 an error message:
 
 mktemp: failed to create file via template '/home/user/tmp/mutt.XX':
 No such file or directory 
 
 What is the problem and how can I solve it?
 
 -- 
 Regards from Pal
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
GPG id: DD344B85 fngrprnt: 2ADC B65A 5499 C2D3 4A3B  93F3 AE20 0F5E DD34 4B85




Re: headers in mail vs forward vs bounce

2013-02-01 Thread Luis Mochan

Thanks! This must be it! I'm using mutt as distributed by
Debian/testing. I'm attaching the output of mutt -v in case it helps
to completely identify my version.
Thanks and best regards,
Luis



On Fri, Feb 01, 2013 at 04:15:58AM +, Michael Elkins wrote:
 On Fri, Feb 01, 2013 at 04:10:52AM +, Michael Elkins wrote:
 I just did a test and it does appear that Mutt is properly
 encoding the header:
 
 Resent-To: Luis =?iso-8859-1?Q?Moch=E1n?= m...@sigpipe.org
 
 This is change that fixed the above problem.  It looks like the
 package of mutt you are using doesn't include this fix.
 
 http://dev.mutt.org/hg/mutt/rev/b574d6f9f532
 
 changeset:   6183:b574d6f9f532
 branch:  HEAD
 user:Michael Elkins m...@mutt.org
 date:Mon Jun 20 16:39:27 2011 -0700
 summary: rfc2047 encode recipient list in resent-to header
 field.  closes #3512

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 


Mutt 1.5.21 (2010-09-15)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 3.2.0-4-686-pae (i686)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
libidn: 1.25 (compiled with 1.25)
hcache backend: tokyocabinet 1.4.47
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  +USE_SMTP  
-USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET 
 +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE  
-ISPELL
SENDMAIL=/usr/sbin/sendmail
MAILPATH=/var/mail
PKGDATADIR=/usr/share/mutt
SYSCONFDIR=/etc
EXECSHELL=/bin/sh
MIXMASTER=mixmaster
To contact the developers, please mail to mutt-...@mutt.org.
To report a bug, please visit http://bugs.mutt.org/.

misc/am-maintainer-mode
features/ifdef
features/xtitles
features/trash-folder
features/purge-message
features/imap_fast_trash
features/sensible_browser_position
features-old/patch-1.5.4.vk.pgp_verbose_mime
features/compressed-folders
features/compressed-folders.debian
debian-specific/Muttrc
debian-specific/Md.etc_mailname_gethostbyname.diff
debian-specific/use_usr_bin_editor.diff
debian-specific/correct_docdir_in_man_page.diff
debian-specific/dont_document_not_present_features.diff
debian-specific/document_debian_defaults
debian-specific/assumed_charset-compat
debian-specific/467432-write_bcc.patch
debian-specific/566076-build_doc_adjustments.patch
misc/define-pgp_getkeys_command.diff
misc/gpg.rc-paths
misc/smime.rc
upstream/531430-imapuser.patch
upstream/537818-emptycharset.patch
upstream/543467-thread-segfault.patch
upstream/542817-smimekeys-tmpdir.patch
upstream/548577-gpgme-1.2.patch
upstream/553321-ansi-escape-segfault.patch
upstream/568295-references.patch
upstream/547980-smime_keys-chaining.patch
upstream/528233-readonly-open.patch
upstream/228671-pipe-mime.patch
upstream/383769-score-match.patch
upstream/578087-header-strchr.patch
upstream/603288-split-fetches.patch
upstream/537061-dont-recode-saved-attachments.patch
upstream/608706-fix-spelling-errors.patch
upstream/620854-pop3-segfault.patch
upstream/611412-bts-regexp.patch
upstream/624058-gnutls-deprecated-set-priority.patch
upstream/624085-gnutls-deprecated-verify-peers.patch
upstream/584138-mx_update_context-segfault.patch
upstream/619216-gnutls-CN-validation.patch
upstream/611410-no-implicit_autoview-for-text-html.patch
upstream/path_max
misc/579967-fixes-german-translation.patch
mutt.org


Re: headers in mail vs forward vs bounce

2013-01-30 Thread Luis Mochan
 Could have to do with your character set, or whether the email itself is
 encoded as 7 bit or 8 bit,

I believe you are right, but I don't know though how to control this. On
the other hand, forwarding mails, as opposed to bouncing them, has not
failed. 

 but I'm suspecting it may have more to do
 with:
 
 X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char C3
 hex):
 Resent-To: Luis Moch\303\241n mochan@fis.[...]
 
 
 In other words, is it possible that Amavis is what's causing the
 rejection, and not mutt (or your MTA itself)?
 

Of course, in this example Amavis rejected the message, but it seems
it did so for a good reason, as the message had this strange
characters \303\241. So I guess the problem is my configuration of
mutt (or mutt itself).

Thanks and regards,
Luis



 w
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: headers in mail vs forward vs bounce

2013-01-29 Thread Luis Mochan
I made some tests and... I'm even more confused. For some reason, if I
bounce your message to myself (through my alias) it arrives without
problem. However, if I compose a message to myself and then bounce it
to myself, it is rejected. The rejection has to do with the
'Resend-to:' header. In the former case it reads as expected (Luis
Mochán moc...@fis.unam.mx) but in the latter case the accented a is
displayed as two question marks (Luis Moch??n
moc...@fis.unam.mx). Thus, I guess the problem has to do with the coding of
the message. I'm attaching examples of an accepted and a rejected
message.
Regards,
Luis


On Tue, Jan 29, 2013 at 09:23:07AM -0800, Will Yardley wrote:
 On Mon, Jan 28, 2013 at 10:33:36PM -0600, Luis Mochan wrote:
  I mean the fullname. For example, my alias file contains the line 
  
 alias mochan Luis Mochán moc...@fis.unam.mx
  
  so if I bounce a mail to myself (b mochan) the alias is expanded and
  the á in my last name produces the failure. 
 
 Hrm. I tested with a similar alias, and wasn't able to reproduce your
 problem.
 
 w
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 


From moc...@em.fis.unam.mx Tue Jan 29 12:55:09 2013
Return-path: moc...@em.fis.unam.mx
Envelope-to: moc...@em.fis.unam.mx
Delivery-date: Tue, 29 Jan 2013 12:55:09 -0600
Received: from ce.fis.unam.mx ([132.248.33.1])
by em.fis.unam.mx with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from moc...@em.fis.unam.mx)
id 1U0GKr-0004ni-Ap
for moc...@em.fis.unam.mx; Tue, 29 Jan 2013 12:55:09 -0600
Received: by ce.fis.unam.mx (Postfix)
id B3E61CA4A5; Tue, 29 Jan 2013 12:54:23 -0600 (CST)
Delivered-To: moc...@fis.unam.mx
Received: from localhost (amavis.fis.unam.mx [10.33.33.8])
by ce.fis.unam.mx (Postfix) with ESMTP id B257ACA49F
for moc...@fis.unam.mx; Tue, 29 Jan 2013 12:54:23 -0600 (CST)
X-Quarantine-ID: 1EfpuPuctajl
X-Virus-Scanned: Debian amavisd-new at amavis.fis.unam.mx
X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char C3 hex):
Resent-To: Luis Moch\303\241n mochan@fis.[...]
Received: from ce.fis.unam.mx ([10.33.33.9])
by localhost (amavis.fis.unam.mx [10.33.33.8]) (amavisd-new, port 10024)
with ESMTP id 1EfpuPuctajl for moc...@fis.unam.mx;
Tue, 29 Jan 2013 12:54:44 -0600 (CST)
Received: from em.fis.unam.mx (unknown [132.248.33.45])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by ce.fis.unam.mx (Postfix) with ESMTPS id 9D7FECA47D
for moc...@fis.unam.mx; Tue, 29 Jan 2013 12:54:23 -0600 (CST)
Received: from [132.248.33.229] (helo=yapaque.localdomain)
by em.fis.unam.mx with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.72)
(envelope-from moc...@em.fis.unam.mx)
id 1U0GKq-0004ne-15
for moc...@fis.unam.mx; Tue, 29 Jan 2013 12:55:08 -0600
Received: from mochan by yapaque.localdomain with local (Exim 4.80)
(envelope-from moc...@yapaque.fis.unam.mx)
id 1U0GKf-0001A6-2o
for moc...@fis.unam.mx; Tue, 29 Jan 2013 12:54:57 -0600
Resent-From: Luis Mochan moc...@fis.unam.mx
Resent-Date: Tue, 29 Jan 2013 12:54:56 -0600
Resent-Message-ID: 20130129185456.gp28...@yapaque.fis.unam.mx
Resent-To: Luis Mochán moc...@fis.unam.mx
Received: from ce.fis.unam.mx ([132.248.33.1])
by em.fis.unam.mx with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from owner-mutt-users-m20...@mutt.org)
id 1U0Evm-0004aA-9s
for moc...@em.fis.unam.mx; Tue, 29 Jan 2013 11:25:10 -0600
Received: by ce.fis.unam.mx (Postfix)
id 75F70CA4C9; Tue, 29 Jan 2013 11:24:24 -0600 (CST)
Received: from localhost (amavis.fis.unam.mx [10.33.33.8])
by ce.fis.unam.mx (Postfix) with ESMTP id 74109CA4AD
for moc...@fis.unam.mx; Tue, 29 Jan 2013 11:24:24 -0600 (CST)
X-Virus-Scanned: Debian amavisd-new at amavis.fis.unam.mx
Received: from ce.fis.unam.mx ([10.33.33.9])
by localhost (amavis.fis.unam.mx [10.33.33.8]) (amavisd-new, port 10024)
with ESMTP id 83qXLLzhx-UW for moc...@fis.unam.mx;
Tue, 29 Jan 2013 11:24:43 -0600 (CST)
Received: from gbnet.net (shtjevan.gbnet.net [194.70.142.36])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by ce.fis.unam.mx (Postfix) with ESMTPS id 099BFCA4AB
for moc...@fis.unam.mx; Tue, 29 Jan 2013 11:24:21 -0600 (CST)
Received: (qmail 20409 invoked by uid 611); 29 Jan 2013 17:23:24 -
Received: (qmail

Re: headers in mail vs forward vs bounce

2013-01-28 Thread Luis Mochan

I mean the fullname. For example, my alias file contains the line 

   alias mochan Luis Mochán moc...@fis.unam.mx

so if I bounce a mail to myself (b mochan) the alias is expanded and
the á in my last name produces the failure. 

Regards,
Luis



On Mon, Jan 28, 2013 at 08:18:19PM -0800, Will Yardley wrote:
 On Sat, Jan 26, 2013 at 12:34:55PM -0600, Luis Mochan wrote:
 
  I wonder if someone knows how to 'bounce' a message to
  a  recipient whose name contains special characters, such as the
  accents áéíóú? I can 'forward', but 'bounce' fails. The manual
  http://www.mutt.org/doc/manual/manual-2.html#forwarding_mail doesn't
  seem to address this problem. Of course, I could remove non-ascii
  characters from my alias file, but I'd rather stick to correct
  orthography, if possible. (Sorry for insisting; won't ask again). 
 
 Are you talking about in the LHS of the email address, or the fullname
 field? I tried to bounce myself this email (same build date / version as
 you) with an accented character in the realname field, and didn't have a
 problem.
 
 w
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: headers in mail vs forward vs bounce

2013-01-26 Thread Luis Mochan
I wonder if someone knows how to 'bounce' a message to
a  recipient whose name contains special characters, such as the
accents áéíóú? I can 'forward', but 'bounce' fails. The manual
http://www.mutt.org/doc/manual/manual-2.html#forwarding_mail doesn't
seem to address this problem. Of course, I could remove non-ascii
characters from my alias file, but I'd rather stick to correct
orthography, if possible. (Sorry for insisting; won't ask again). 
Thanks and regards,
Luis

On Wed, Jan 23, 2013 at 11:35:17AM -0600, Luis Mochan wrote:
 Some names in my alias file include accented characters such as
 áéíóú. When I compose/forward a message to someone with those
 characters in his name the message has no problem, but when I bounce a
 message delivery fails with the message INVALID HEADER Non-encoded
 8-bit data. Is there a fix? 
 Regards,
 Luis
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




headers in mail vs forward vs bounce

2013-01-23 Thread Luis Mochan
Some names in my alias file include accented characters such as
áéíóú. When I compose/forward a message to someone with those
characters in his name the message has no problem, but when I bounce a
message delivery fails with the message INVALID HEADER Non-encoded
8-bit data. Is there a fix? 
Regards,
Luis


Re: Making changes by edit-type persistent

2013-01-21 Thread Luis Mochan
 I don't believe it is (with Mutt).  You'd have to edit the raw message
 with a text editor.
I sometimes have had a related problem; not persistency but simply
being able to choose which command to run in order to open an
attachment. For example, I when I receive
a pdf attachment I open it with xpdf by default, but sometimes I have
to open it with acroread (for example, to see an animation). Thus, I made a
simple and maybe naive script to write out the attachment and run an
arbitary command with arbitrary extra arguments on it. I named it
muttfilter, so, for example, to open a pdf with acroread instead of my
default xpdf, I would position the cursor on the attachment and type
   | muttfilter temp.pdf acroread
Seems to work under linux. 
Regards,
Luis

---
#!/bin/bash
#to open arbitrary attachments with arbitrary commands
#Usage (from mutt attachment menu)
#  | muttfilter filename command arg1 arg2...
# (Change muttfilter to the name with which you save this file, which
# should be made executable and put somewhere in your path)
# First copy the file from STDIN to filename
cat -  $1
# Then run command with given arguments on filename
$2 ${@:3} $1
---



Re: duplicates and x-labels

2013-01-11 Thread Luis Mochan



On Wed, Jan 09, 2013 at 10:10:52PM -0600, Luis Mochan wrote:
 On Wed, Jan 09, 2013 at 10:04:30PM -0600, Luis Mochan wrote:
  ... It seems that after adding an
  X-Label to a message locally, offlineimap doesn't propagate that
  change back to the mail server.
 I meant the imap server.
 

I tried mbsync as an alternative to offlineimap and it seems to solve
my problem: it propagates changes to X-Labels back and forth between
local and remote computers.

Thanks and regards,
Luis


Re: duplicates and x-labels

2013-01-09 Thread Luis Mochan
I tried to solve my problem (below) using offlineimap instead of
imap. But now I have another problem. It seems that after adding an
X-Label to a message locally, offlineimap doesn't propagate that
change back to the mail server. I end up with messages that are
labelled in my laptop but not in my work computer. I guess (haven't
tried) that the reciprocal problem also exist and that messages
labelled in my server wouldn't be labelled in my laptop. Is there a
way to convince offlineimap to synch messages after being 'edited'
through mutt? 

Best regards,
Luis




On Sat, Jan 05, 2013 at 10:01:54PM -0600, Luis Mochan wrote:
 I have an occasional but somewhat annoying problem. I made a program
 to edit X-Labels to somewhat emulate the behavior of gmail. When using
 my mail account remotely I use IMAP to access a dovecot server. Everything 
 works
 fine, but occasionally, the network fails and the connection is broken
 before I sync the mailbox. When I open the mailbox again, there are two
 versions of each edited message: the original that had been marked for
 deletion but had not been deleted and had lost the mark, and the same
 message but with the X-Label in place. Currently I order my mailbox by
 threads, and when I find a message that is x-labeled and marked as
 duplicate, I know that I can (manually) delete its predecessor. Is
 there some mutt expression that would  allow me to select all those
 messages automatically? The expression ~= doesn't work, as it
 correspond to the successors, i.e., the messages that have been
 labelled and that I want to keep.
 
 Best regards,
 Luis 
 
 
 -- 
 
   o
 W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
 Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
 Apdo. Postal 48-3, 62251 |   (*)/\/  \
 Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
 
 O ascii ribbon campaign - stop html mail - www.asciiribbon.org  

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: duplicates and x-labels

2013-01-09 Thread Luis Mochan
On Wed, Jan 09, 2013 at 10:04:30PM -0600, Luis Mochan wrote:
 ... It seems that after adding an
 X-Label to a message locally, offlineimap doesn't propagate that
 change back to the mail server.
I meant the imap server.


duplicates and x-labels

2013-01-05 Thread Luis Mochan
I have an occasional but somewhat annoying problem. I made a program
to edit X-Labels to somewhat emulate the behavior of gmail. When using
my mail account remotely I use IMAP to access a dovecot server. Everything works
fine, but occasionally, the network fails and the connection is broken
before I sync the mailbox. When I open the mailbox again, there are two
versions of each edited message: the original that had been marked for
deletion but had not been deleted and had lost the mark, and the same
message but with the X-Label in place. Currently I order my mailbox by
threads, and when I find a message that is x-labeled and marked as
duplicate, I know that I can (manually) delete its predecessor. Is
there some mutt expression that would  allow me to select all those
messages automatically? The expression ~= doesn't work, as it
correspond to the successors, i.e., the messages that have been
labelled and that I want to keep.

Best regards,
Luis 


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Putting table in email?

2012-11-20 Thread Luis Mochan
Emacs' org-mode permits editing of text tables. There is an orgtbl
minor mode to edit tables outside of an .org file. 
Regards,
Luis


On Tue, Nov 20, 2012 at 06:59:57AM -0800, Ray Van Dolson wrote:
 On Tue, Nov 20, 2012 at 09:32:16AM -0500, Peter Davis wrote:
  I'm using mutt on OS X, with emacs as my editor. It's a great
  combination, but there are times when I really *REALLY* want to put a
  table in a message. I tried creating an HTML attachment containing the
  table, but HTML-capable mail readers just display this as an
  attachment that has to be opened separately.
  
  Is there any reasonly easy (non-painful) way to put a table in a
  message? A plain text table would be fine if I could limit it to 72
  characters wide or so, and if there were a reasonable way to edit it,
  preferably in emacs.
  
  Otherwise, I think I'd have to resort to an HTML table, but even that
  can't easily be done with mutt, as far as I can tell.
  
  Ideas?
  
  Thanks!
  
  -pd
 
 Hmm... maybe you could modify your editor script to pipe output through
 a reStructuredText[1] or Wiki (or something else you prefer like even
 HTML) parser and output to plain text with the width restrictions you
 require.
 
 Ray
 
 [1] http://docutils.sourceforge.net/rst.html

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Marking mail as read after move

2012-11-01 Thread Luis Mochan
I have a related question: after I edit a message (to add X-labels
with an ad-hoc editor), it is marked as new. I would like it to have
the same flags as it had before editing. How can it be done?
Regards,
Luis



On Fri, Nov 02, 2012 at 01:04:20AM +0200, Nikola Petrov wrote:
 Hi,
 
 Is there a way to make mutt treat a moved(saved) message as read. I am
 not sure if this is related to my setup and if it's fault but it
 suspect it is. I am currently using the following:
 
 imapfilter - to filter messages properly
 offlineimap - to fetch email from multiple imap accounts
 mutt - to read the messages
 
 This doesn't even work for 'trash' and 'mbox' handling. 
 
 Of course I can batch match messages as read with T but this just
 doesn't seem right
 
 Best, Nikola

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: select wrapped lines / click long url / bug 3453

2012-10-23 Thread Luis Mochan
On Tue, Oct 23, 2012 at 08:38:56PM +0530, Mandar Mitra wrote:
 ...
 My setup works, but some might call it convoluted. I run mutt within a
 multi-term running inside emacs, and use emacsclient as the viewer +
 editor. I put the cursor anywhere on the URL and type C-xo to open it in
 a browser (actual browser program is configurable). This handles long
 URLs without any problems.
 
 If you think this option would be worth trying, I can provide more
 details.
 
 mandar.
I hadn't heard of multi-term. I just tried it and it seems very
nice. Thanks for the hint.
Luis


Re: Android MUA does not display mail correctly because of Content-Disposition in header

2012-09-27 Thread Luis Mochan
I don't recall any problem reading with Android 2.1 mail sent by
mutt. I use K-9 as my Android mail client in my phone. 
Best regards,
Luis

On Wed, Sep 26, 2012 at 11:06:00PM +0200, Ambrevar wrote:
 [Mutt 1.5.21 on FreeBSD and Arch Linux]
 
 Hi
 
 My fellows recently let me aware of the fact that all the e-mail I've sent 
 them
 with Mutt could not be displayed correctly on their Android 2.* smartphone. 
 The
 mails display an empty body, the actual body being displayed as an attachment
 (which Android may name 'Unknown.txt').
 
 I've been investigating around for a while and I've come to the conclusion 
 that
 it comes from the 'Content-Disposition' that Mutt includes in the header of
 every e-mail. This feature does not seem to be toggable by the end-user (even
 though you can change the value of the Content-Disposition, but this does not
 solve the issue). This header is standard but rarely used by MUA. I've patched
 my local Mutt to remove this line from the header and it works perfectly.
 
 I've reported the issue on the bugtracker.
 
 I just wanted to know if someone ever noticed a similar issue, since I'm quiet
 surprised I couldn't find any clue on the net.
 
 Cheers

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt on an IMAP-Server (dovecot): folder names and structure

2012-08-16 Thread Luis Mochan
I used to have my password in the .muttrc file; bad mistake (I found
out after mailing my rc file to this list). After introducing it
manually for awhile, I wrote it in a small file with restricted
permissions (set imap_pass='my_password')  which I source 
from the rc file (source ~/my/password/file). The password file is
onle readable and writable by me. This setup is convenient, as I don't
have to type my password every session, though that is not a big
inconvenience.  Would this be considered unsafe?
Regards,
Luis



On Thu, Aug 16, 2012 at 06:36:11PM +0200, Thomas Wallrafen wrote:
 Hi,
 
 On Thu, Aug 16, 2012 at 06:29:42PM +0200, martin f krafft wrote:
  also sprach Nicolas KOWALSKI nicolas.kowal...@gmail.com [2012.08.16.1823 
  +0200]:
   ...
  What do you do about the password? I don't want to store that in
  .muttrc!
 
 You could enter the password manually, of course.
 
 For me, a small shell script is does the trick  that decrypts a file via gpg
 and echoes the necessary config directives into mutt.
 
 Bye,
 
 Thomas

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt on an IMAP-Server (dovecot): folder names and structure

2012-08-16 Thread Luis Mochan
 What exactly is the problem with entering the password manually?
Laziness. Not a very strong reason, but I just wondered if restricting
the permissions of the file would be enough protection. From the
answers so far, I gather not.

Related to my previous question, I have a text file,
/etc/exim4/passwd.client  with the password for accesing my
'smarthost' mail server from my laptop. I guess this presents similar
risks. 

Best regards,
Luis


resend

2012-08-08 Thread Luis Mochan
Due to a misconfiguration in my mail server, I sent several messages
that were not delivered but were sent back to me enclosed in a failure
notification . Now that I have fixed the problem I want to
send those messages again. What is the best procedure to do it? Does
mutt have something similar to the emacs function
'rmail-retry-failure' to strip away the failure notification of a
returned message and resend the original message? 
Regards,
Luis



-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: resend

2012-08-08 Thread Luis Mochan
On Wed, Aug 08, 2012 at 03:35:35PM -0400, Nathan Stratton Treadway wrote:
 On Wed, Aug 08, 2012 at 12:58:05 -0500, Luis Mochan wrote:
  send those messages again. What is the best procedure to do it? Does
  mutt have something similar to the emacs function
  'rmail-retry-failure' to strip away the failure notification of a
  returned message and resend the original message? 
 
 Are the original messages included in the bounce messages as MIME
 message/rfc822 attachments?

Yes.

 
 If so, you can use the view-attachments menu (i.e. hit v while viewing
 the bounce message), then navigate down to the attachment containing
 the original message and use either bounce-message or resend-message
 (bound to b and Esce by default) to resend that message.
 

Thanks Nathan! I was not aware that you could bounce or resend
individual attachments. However, it seems that the failed message
comes in the same part as the failure message, preceded by a message such as:

...
-- This is a copy of the message, including all the headers. -- 

Return-path: ...
Received: from...
...


I wonder if simply typing Esc e and deleting whatever comes before
the copy of the message and the original headers would work, i.e.,
everything above 'Return-path:' above would work.

Regards,
Luis


Re: resend

2012-08-08 Thread Luis Mochan
Thanks Paul,
The problem is that I don't want to bounce the complete message; first
I want to strip the failure notification part.
Regards,
Luis

On Wed, Aug 08, 2012 at 03:16:29PM -0400, Paul Hoffman wrote:
 On Wed, Aug 08, 2012 at 12:58:05PM -0500, Luis Mochan wrote:
  Due to a misconfiguration in my mail server, I sent several messages
  that were not delivered but were sent back to me enclosed in a failure
  notification . Now that I have fixed the problem I want to
  send those messages again. What is the best procedure to do it? Does
  mutt have something similar to the emacs function
  'rmail-retry-failure' to strip away the failure notification of a
  returned message and resend the original message? 
 
 That sounds like what mutt calls a bounce.  From the manual:
 
 | 7. Forwarding and Bouncing Mail
 |
 | Bouncing and forwarding let you send an existing message to recipients 
 | that you specify. Bouncing a message sends a verbatim copy of a 
 | message to alternative addresses as if they were the message's 
 | original recipients specified in the Bcc header. Forwarding a message, 
 | on the other hand, allows you to modify the message before it is 
 | resent (for example, by adding your own comments).  Bouncing is done 
 | using the bounce function and forwarding using the forward 
 | function bound to b and f respectively. 
 
  Regards,
  Luis
 
 HTH,
 
 Paul.
 
 -- 
 Paul Hoffman nkui...@nkuitse.com


Re: resend

2012-08-08 Thread Luis Mochan
On Wed, Aug 08, 2012 at 04:05:29PM -0500, Luis Mochan wrote:
 On Wed, Aug 08, 2012 at 03:35:35PM -0400, Nathan Stratton Treadway wrote:
  On Wed, Aug 08, 2012 at 12:58:05 -0500, Luis Mochan wrote:
   send those messages again. What is the best procedure to do it? Does
   mutt have something similar to the emacs function
   'rmail-retry-failure' to strip away the failure notification of a
   returned message and resend the original message? 
  
  Are the original messages included in the bounce messages as MIME
  message/rfc822 attachments?
 
 Yes.
Sorry, I meant no. Some messages include mime attachments, somes do not.
Regards,
Luis


Re: alias

2012-07-28 Thread Luis Mochan
Thanks John for change of cipher suggestion. My problem is though when
I am far away from my office.
Regards,
Luis


the On Fri, Jul 27, 2012 at 03:53:36PM +, John Long wrote:
 On Fri, Jul 27, 2012 at 10:20:16AM -0500, Luis Mochan wrote:
  Thanks everybody for their answers and suggestions. I have tried X
  forwarding, but sometimes it is too slow (my network's fault, I
  believe), so I guess I'll just keep my separate configuration files in
  sync.
 
 Hi Luis,
 
 If you are working across the internet then many things can cause SSH to be
 slow and it requires both ends to do encryption/decryption so running on
 slow PCs can also affect it. If you are on your own network, one thing you
 can do that can significantly speed up X forwarding is using the RC4
 (ARCFOUR) cipher instead of the default. It is not as secure as the other
 ciphers, but it is much, much faster. It is worth trying if you need X
 forwarding for some reason.
 
 On my local network I use several servers and use X forwarding heavily. The
 performance is as good as direct connection, but in reality only a few
 meters of cables are separating me from the servers so I would expect
 nothing less.
 
 -- 
 ASCII ribbon campaign ( ) Powered by Lemote Fuloong
  against HTML e-mail   X  Loongson MIPS and OpenBSD
and proprietary/ \http://www.mutt.org
  attachmentsCode Blue or Go Home!

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: alias

2012-07-27 Thread Luis Mochan
On Fri, Jul 27, 2012 at 12:06:00PM +, John Long wrote:
 On Fri, Jul 27, 2012 at 01:57:02PM +0200, SK wrote:
 ...
  I too have this problem. I use SSH to connect to a remote server and
  run mutt inside a tmux session, But I don't know how to view
  attachments or more importantly attach something locally from the
  machine accessing the tmux connection to the email from mutt!
 
 The part you quoted above asked if you have X forwarding enabled and if
 you're using it. There is nothing stopping you from opening attachments if
 you have X forwarding enabled and you ssh with -X or -Y.
 

Maybe this is a dumb question: as we can use IMAP to access remote 
mailboxes, could we also use it to access other remote files with 
configuration commands and 'source' them?

Regards,
Luis




Re: alias

2012-07-27 Thread Luis Mochan
Thanks everybody for their answers and suggestions. I have tried X
forwarding, but sometimes it is too slow (my network's fault, I
believe), so I guess I'll just keep my separate configuration files in
sync.

Regards, 
Luis




On Fri, Jul 27, 2012 at 02:26:15PM +, John Long wrote:
 On Fri, Jul 27, 2012 at 02:18:59PM +, John Long wrote:
  On Fri, Jul 27, 2012 at 08:22:20AM -0500, Luis Mochan wrote:
 
   Maybe this is a dumb question: as we can use IMAP to access remote 
   mailboxes, could we also use it to access other remote files with 
   configuration commands and 'source' them?
  
  No, IMAP is specifically an email protocol and isn't good for the general
  case of files. And even if it was, you would need IMAP servers running on
  all the other computers...
 
 I didn't explain this very well. The issue (as I understand it from reading
 3 posts in this thread) is you want to be able to access a file wherever it
 is and open it with whatever application is appropriate. You can't usually
 do that because most of these applications can't find the file.
 
 What X forwarding does is allow you to run X applications for example a
 browser, a file manager, OpenOffice.org on some PC and actually control it
 from the PC you're using now. If you're running Mutt over SSH then it is
 going to save and read files from the remote machine. When you try to open
 an attachment that needs X (like a PDF, .doc, etc) if you have X forwarding
 set in SSH the program on the same box Mutt is already running on can open
 it, but it will display it on *your* terminal. The problem of accessing
 files remotely doesn't exist in this case because Mutt, the file you want to
 open, and the application are *all* running on the remote host, only the
 *display* part of it is being done on your local system.
 
 This is much harder to understand than to actually do. You should try and
 see if you can SSH to the Mutt host with the -X or -Y options and then start
 a program that uses X and see if you get an error about invalid display or
 whether your application pops up on your local machine. Then we can go from
 there.
 
 
 -- 
 ASCII ribbon campaign ( ) Powered by Lemote Fuloong
  against HTML e-mail   X  Loongson MIPS and OpenBSD
and proprietary/ \http://www.mutt.org
  attachmentsCode Blue or Go Home!

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




alias

2012-07-26 Thread Luis Mochan
I receive my email at a desktop in my office and I access it through mutt at my
office and remotely through my laptop using IMAP. Thus, I have
configuration files at my desktop and at my laptop. However, there are
parts of the configuration which should be identical, such as my list
of alias and a few macros. Having several copies yields occasional
inconsistencies. Is there a reasonable way to keep some configuration
files at my office and source them remotely from my laptop when I
start mutt? Similarly, I would like to be able to update the files at
my office when I define a new alias at my laptop.  An
alternative would be to use a revision control system to update and
synchronize the relevant files among my computers, but I wonder if
there is a simpler solution.  

Thanks and best regards,
Luis



-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: alias

2012-07-26 Thread Luis Mochan
Hi Patrick,
I use screen but locally. I used to access my mail on the server
through ssh/screen/mutt, but then I had trouble seeing some non-text
attachments. Sometimes I use a VNC server on my office and a client in
my laptop in order to use mutt at the server and display my
attachments correctly, but my network is not too reliable, so a local
mutt and a remote IMAP server seems to have worked best for me, with
the small annoyance of duplicated configuration files.
Regards and thanks,
Luis


On Thu, Jul 26, 2012 at 10:29:49PM -0400, Patrick Shanahan wrote:
 * Luis Mochan moc...@fis.unam.mx [07-26-12 22:25]:
  I receive my email at a desktop in my office and I access it through
  mutt at my office and remotely through my laptop using IMAP.  Thus, I
  have configuration files at my desktop and at my laptop.  However, there
  are parts of the configuration which should be identical, such as my
  list of alias and a few macros.  Having several copies yields occasional
  inconsistencies.  Is there a reasonable way to keep some configuration
  files at my office and source them remotely from my laptop when I start
  mutt?  Similarly, I would like to be able to update the files at my
  office when I define a new alias at my laptop.  An alternative would be
  to use a revision control system to update and synchronize the relevant
  files among my computers, but I wonder if there is a simpler solution.
 
 I have my mail and mutt on a server and remotely access it so there is
 only one place for configuration files and   I open a tmux session,
 similar to screen, and remotely access that tmux session from where-ever. 
 I even read my mail on site from another computer.  
 
 -- 
 (paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
 http://en.opensuse.org   openSUSE Community Member
 Registered Linux User #207535@ http://linuxcounter.net

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: alias

2012-07-26 Thread Luis Mochan
Dear Leo,
Maybe I don't know enough about tmux (nor screen). How do you get to
the mail server/mutt program? Through a ssh session? How do you
visualize attachments? Do you use the -X option of ssh?  Does tmux
offer a tools for connecting to the server?

Anyway, thanks for your suggestions.

Best regards,
Luis



 This is what I do, too but if Luis prefers not to work that way, one
 easy way to maintain a single, authoritative configuration on all
 systems is to use Dropbox, box.net or one of their competitors. I
 know that Dropbox provides the versioning he wants and I expect the
 competitor products do as well.
 
 Regards,
 
 Leo

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Thank you for Mutt

2012-07-24 Thread Luis Mochan
On Tue, Jul 24, 2012 at 06:29:33PM +0100, Joe McCool wrote:
 On Tue, Jul 24, 2012 at 6:19 PM, stargr...@stargrave.org wrote:
 
  Thanks to all the Mutt developers, contributors, and user community. Mutt 
  is
  a great app! It doesn't suck at all.
  Joining in! Really, Mutt is absolutely the best email client and there
  is nothing at all that sucks in it! No Mutt → no email → computer is not
  needed ☺. Big thanks to all developers!
 
 I'll second that and third it, if need be :-)
 
 Joe
Me too!

Luis


Re: archive messages in gmail

2012-07-22 Thread Luis Mochan
 
 AAH!
 
 I get it.
 
 That's because you have trash= set to Google's Trash, which is how
 you tell it that you want things purged forever.
 
 So $ obeys the trash= variable, which trashes it completely.
 
 If you drop trash= and use my macros instead for deleting, which
 actually save to Trash instead of deleting, you should be fine.
 

Thanks again. The culprit was the line trash variable indeed. 
Regards,
Luis



Re: archive messages in gmail

2012-07-20 Thread Luis Mochan
On Thu, Jul 19, 2012 at 01:38:21PM -0700, Robin Lee Powell wrote:
 On Tue, Jul 17, 2012 at 06:56:19PM -0500, Luis Mochan wrote:
  I have used gmail from mutt occasionally using the attached rc
  file. Today I decided to clean my gmail account, deleting some
  messages and saving others in their corresponding folders under,
  for example =here or =there (under imaps://imap.gmail.com:993/).
  Things seemed to be working well. After saving each message, it
  was marked as Deleted from my INBOX. My problem is that when I
  expunged the messages from the INBOX, they also dissapeared from
  the folder to which I had copied them! 
 
 You're going to need to tell us the exact keystrokes you're pressing
 for us to be able to usefully comment.
If I remember correctly (I haven't reproduced the problem) I typed 
s=mailboxenter to save a message, 
$ to purge the message, which had been marked with a D, from the INBOX
c=mailboxenter to open the mailbox
and the message seems to have disappeared.

If I omit the $, the message does appear in its folder, but it also
appears in the INBOX with the 'D' mark. What I wanted is to clean the
inbox, although, as you mentioned, it may be unnecessary.

Actually, using the web interface, I found my messages in the Trash
with the labels corresponding to the 'mailboxes' I had used.

 ...
 I've had no problem whatsoever with just:
 s=Labelenter
 But then I don't use labels with gmail very much at all because the
 search is so good; in fact I have s rebound to save to all mail,
 which removes things from the inbox but does nothing else.
 Here's all my gmail-related stuff, with comments, in case it helps:
 
 
 # Gmail-related keyboard shortcuts
 
 # This allows going to space-containing folders
 bind editor space noop
...

Thanks!

So I still don't quite understand. After you do an immediate save or a
normal save with your configuration, what happens with the message? Is
it marked as deleted? Do you find it if you look for it after purging
it from the INBOX? 

I guess that my problem is that I still don't quite get the relation
between adding and deleting labels and archiving in gmail, using its
web interface, and copying, saving and deleting messages in gmail using mutt. 

Regards,
Luis



 
 # The trash variable doesn't exist in this version of mutt, so we
 # trash with delete; we also turn off pattern delete due to no ask
 # for user input command; just use the tag functions
 #
 # Note that saving to Trash immediately, forcefully, deletes the message from
 # the inbox; this causes a Mailbox was externally modified.  Flags
 # may be wrong. message, and often causes the cursor to go
 # somewhere weird.  This does not seem to be fixable, although you
 # could add last-entry or something to these macros and at least
 # end up in a predictable place.
 #
 macro index,pager d save-message=[Gmail]/Trashenter Gmail trash 
 message
 macro index,pager D noop
 macro index,pager ^D 
 tag-threadtag-prefixsave-message=[Gmail]/Trashenter Gmail trash 
 thread
 macro index,pager escd 
 tag-subthreadtag-prefixsave-message=[Gmail]/Trashenter Gmail trash 
 thread
 
 # Saving to Trash immediately, forcefully, deletes the message from
 # the inbox; this means undelete of all kinds is useless, you have
 # to go to the trash and save them to another label, or use the web
 # interface.
 macro index,pager u noop
 macro index,pager ^u noop
 macro index,pager escu noop
 
 # I don't use labels basically ever, so by default save just means
 # get it out of my inbox
 macro index,pager s save-message=[Gmail]/All Mailenter Remove from 
 inbox/save to all mail
 macro index,pager ,s save-message Normal save
 macro index,pager S save-message Normal save
 
 # Macros to go to common gmail labels.
 macro index,pager ,i change-folder=INBOXenter Go to inbox
 macro index,pager ,a change-folder=[Gmail]/All Mailenter Go to all 
 mail
 macro index,pager ,s change-folder=[Gmail]/Sent Mailenter Go to outbox
 macro index,pager ,d change-folder=[Gmail]/Draftsenter Go to drafts
 
 -Robin
 
 -- 
 http://singinst.org/ :  Our last, best hope for a fantastic future.
 .i ko na cpedu lo nu stidi vau loi jbopre .i danfu lu na go'i li'u .e
 lu go'i li'u .i ji'a go'i lu na'e go'i li'u .e lu go'i na'i li'u .e
 lu no'e go'i li'u .e lu to'e go'i li'u .e lu lo mamta be do cu sofybakni li'u

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




archive messages in gmail

2012-07-17 Thread Luis Mochan
I have used gmail from mutt occasionally using the attached rc
file. Today I decided to clean my gmail account, deleting some
messages and saving others in their corresponding folders under, for
example =here or =there (under imaps://imap.gmail.com:993/). Things
seemed to be working well. After saving each message, it was marked as
Deleted from my INBOX. My problem is that when I expunged the messages
from the INBOX, they also dissapeared from the folder to which I
had copied them! 

Visiting the corresponding folders through the gmail.com page I found
that before the messages are deleted, they do appear in their
corresponding folder, but they have the Inbox.

I also found that some of the deleted messages appeared in the Trash
folder; those that I had not looked for in their intended folder!

This is very confusing to me (and probably I couldn't explain the
situation clearly). How could one manage gmail labels in gmail from
within mutt in a safe way?

Best regards,
Luis


-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: archive messages in gmail

2012-07-17 Thread Luis Mochan

I forgot to attach the rc file, sorry.

Regards,
Luis

On Tue, Jul 17, 2012 at 06:56:19PM -0500, Luis Mochan wrote:
 I have used gmail from mutt occasionally using the attached rc
 file. Today I decided to clean my gmail account, deleting some
 messages and saving others in their corresponding folders under, for
 example =here or =there (under imaps://imap.gmail.com:993/). Things
 seemed to be working well. After saving each message, it was marked as
 Deleted from my INBOX. My problem is that when I expunged the messages
 from the INBOX, they also dissapeared from the folder to which I
 had copied them! 
 
 Visiting the corresponding folders through the gmail.com page I found
 that before the messages are deleted, they do appear in their
 corresponding folder, but they have the Inbox.
 
 I also found that some of the deleted messages appeared in the Trash
 folder; those that I had not looked for in their intended folder!
 
 This is very confusing to me (and probably I couldn't explain the
 situation clearly). How could one manage gmail labels in gmail from
 within mutt in a safe way?
 
 Best regards,
 Luis
 
 
 -- 
 
   o
 W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
 Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
 Apdo. Postal 48-3, 62251 |   (*)/\/  \
 Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/
 
 O ascii ribbon campaign - stop html mail - www.asciiribbon.org   
   
 
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 


set from=wlmoc...@gmail.com
set realname=Luis Mochan
set imap_user=wlmoc...@gmail.com
set imap_pass=leika1980
set folder = imaps://imap.gmail.com:993
set spoolfile = +INBOX
set postponed =+[Gmail]/Drafts
set trash = imaps://imap.gmail.com/[Gmail]/Trash
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set smtp_url = smtp://wlmoc...@smtp.gmail.com:587/
set smtp_pass = leika1980
bind editor space noop
macro index gi change-folder=INBOXenter Go to inbox
macro index ga change-folder=[Gmail]/All Mailenter Go to all mail
macro index gs change-folder=[Gmail]/Sent Mailenter Go to Sent Mail
macro index gd change-folder=[Gmail]/Draftsenter Go to drafts
set move = no  #Stop asking to move read messages to mbox!
set imap_keepalive = 900


Re: archive messages in gmail

2012-07-17 Thread Luis Mochan
Thanks James.
I hadn't notice any peculiar behavior before, but I only used mutt to
browse over my gmail messages, not to move messages around. I noticed the
problems today, as I decided to organize my account. I used mutt in
order to easily select and manipulate blocks of messages (without
having to learn gmail's keyboard shortcuts).
Best regards,
Luis


On Wed, Jul 18, 2012 at 01:44:30AM +0100, James Freer wrote:
 On 18 July 2012 01:17, Luis Mochan moc...@fis.unam.mx wrote:
 
  I forgot to attach the rc file, sorry.
 
  Regards,
  Luis
 
  On Tue, Jul 17, 2012 at 06:56:19PM -0500, Luis Mochan wrote:
  I have used gmail from mutt occasionally using the attached rc
  file. Today I decided to clean my gmail account, deleting some
  messages and saving others in their corresponding folders under, for
  example =here or =there (under imaps://imap.gmail.com:993/). Things
  seemed to be working well. After saving each message, it was marked as
  Deleted from my INBOX. My problem is that when I expunged the messages
  from the INBOX, they also dissapeared from the folder to which I
  had copied them!
 
  Visiting the corresponding folders through the gmail.com page I found
  that before the messages are deleted, they do appear in their
  corresponding folder, but they have the Inbox.
 
  I also found that some of the deleted messages appeared in the Trash
  folder; those that I had not looked for in their intended folder!
 
  This is very confusing to me (and probably I couldn't explain the
  situation clearly). How could one manage gmail labels in gmail from
  within mutt in a safe way?
 
  Best regards,
  Luis
 
 Did you have any problems before Gmail was revamped a few months ago.
 I've noticed a number of quirks over the last few months. For example:
 i used to transfer all messages straight to All Mail having put a
 filter on the Inbox From:  Skip Inbox - now it doesn't seem to work.
 
 iirc Gmail always claimed to be fully IMAP compatible. I don't know
 that Mutt is - i actually stopped using Mutt a while back (just wasn't
 to my liking) and used Alpine and only really because it seems to be
 totally IMAP compatible although does need a new release.
 
 I haven't answered the question How could one manage gmail labels in
 gmail from within mutt in a safe way?. I think Gmail does some odd
 things as they intended Gmail to be used on the UI. I just live with
 it and do some things on the UI. However, i've never heard of any
 problems with POP which i've considered wrongly perhaps 'the old
 fashioned way'. OfflineIMAP seems to be increasingly popular i've
 noticed.
 
 james

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Two dictionaries in emacs to compose

2012-07-08 Thread Luis Mochan
Thanks! It solves my similar problem with Spanish and English. I used
castellano8 instead of russian below.
Regards,
Luis


On Sat, Jul 07, 2012 at 06:49:27AM -0700, fe...@crowfix.com wrote:
 On Sat, Jul 07, 2012 at 10:03:20AM -0300, Marcelo Luiz de Laia wrote:
  Hello, I use emacs to compose messages to mutt. However, I speak
  Portuguese and often have to write in English. Is it possible to call
  the two dictionaries, in emacs, at the same time? For example, take the
  dictionary Portuguese and English in the same buffer?
 
 I googled for emacs two dictionaries and found this, which toggles
 between two dictionaries:
 
 
 http://stackoverflow.com/questions/11361603/how-to-define-two-ispell-dictionaries-in-emacs-for-latex-mode
 
 I have a way to toggle between two languages:
 
 ;; You should have aspell-ru and aspell-en packages installed
 (let ((langs '(english russian)))
   (setq lang-ring (make-ring (length langs)))
   (dolist (elem langs) (ring-insert lang-ring elem)))
 (defun cycle-ispell-languages ()
   (interactive)
   (let ((lang (ring-ref lang-ring -1)))
 (ring-insert lang-ring lang)
 (ispell-change-dictionary lang)))
 
 (global-set-key (kbd C-1) 'cycle-ispell-languages)
 
 There's one down vote because the voter wants to automate it, but I
 don't think that makes sense.  You don't want it to guess at the
 language of each word.  If it is correct in the correct language, but
 wrong in the other language, should it still show the possibilities?
 You'd have to choose as is for every 90% of the words.
 
 -- 
 ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
  Felix Finch: scarecrow repairman  rocket surgeon / fe...@crowfix.com
   GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
 I've found a solution to Fermat's Last Theorem but I see I've run out of room 
 o

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt deletes attachement before libreoffice tries to open it

2012-06-22 Thread Luis Mochan
I guess a solution used for browsing html attachments (discussed
here some time ago; see attached perl script) may be adapted for
running libreoffice. The main idea would be to make a copy of the
file, send it to libreoffice and sleep a short time before returning
to mutt,
Regards,
Luis


On Fri, Jun 22, 2012 at 10:52:08AM -0300, Marcelo Laia wrote:
 Hi
 
 2012/6/22 steve dl...@bluewin.ch:
  Have you found a solution?
 
 Unfortunately, no!
 
 
 -- 
 Marcelo Luiz de Laia

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 


#!/usr/bin/env perl

use warnings;
use strict;

# SYNOPSIS
#   mutt_browse file
#
# DESCRIPTION
#   Runs a browser on a copy of a file, and sleeps for a while
#   before deleting it. It solves the problem that mutt may delete
#   the file too fast.
# EXAMPLE
#   To use a sensible browser to view HTML attachments from mutt, add the
#   following line to the .mailcap file.
#
#   text/html;  /path/to/mutt_browse %s
#
# AUTHOR
#   Luis Mochan moc...@fis.unam.mx
#   Shamelessly adapted from mutt_netscape by
#   Gary A. Johnson garyj...@spk.agilent.com
# 
# WARNING
#   This program has been tested in a Debian system
#   The temporal file is created in the /tmp directory
#   


# Variables to be customized
#
# template filename for temporal file
my $template=muttX; 

# Path to desired browser. Under Debian sensible-browser defaults to
# my prefered browser, but an explicit choice such as chrome,
# iceweasel, etc. may be used here.
my $browser=/usr/bin/sensible-browser; 

# Delay to give time for browser to read file before it is destroyed
my $delay=3; #in seconds
#
# End of customizations


use File::Temp qw(tempfile);

die EOF unless @ARGV==1;
Usage $0 file
  to run a sensible-browser over copy of file
EOF
die Can't read $ARGV[0] unless -r $ARGV[0];
my ($fh, $fname) = tempfile($template, DIR=/tmp, SUFFIX=.html, 
UNLINK=1);
open IN, , $ARGV[0];
while(IN){
print $fh $_;
}
close $fh;
system $browser, $fname;
sleep $delay; 


Re: mutt deletes attachement before libreoffice tries to open it

2012-06-22 Thread Luis Mochan
Thanks Chris! You're right (it was a fast translation from Spanish).
Regards,
Luis

On Sat, Jun 23, 2012 at 04:57:04AM +1200, Chris Bannister wrote:
 On Fri, Jun 22, 2012 at 09:38:10AM -0500, Luis Mochan wrote:
  # DESCRIPTION
  #   Runs a browser on a copy of a file, and sleeps for a while
  #   before deleting it. It solves the problem that mutt may delete
  #   the file too fast.
 
 IMHO, change fast to soon.  The *speed* of deletion is not the issue
 but *when* it is deleted.
 
 -- 
 If you're not careful, the newspapers will have you hating the people
 who are being oppressed, and loving the people who are doing the 
 oppressing. --- Malcolm X

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt deletes attachement before libreoffice tries to open it

2012-06-22 Thread Luis Mochan
David,
Thanks for the suggestion!
Luis


On Fri, Jun 22, 2012 at 12:50:02PM -0500, David Champion wrote:
 * On 22 Jun 2012, Luis Mochan wrote: 
  I guess a solution used for browsing html attachments (discussed
  here some time ago; see attached perl script) may be adapted for
  running libreoffice. The main idea would be to make a copy of the
  file, send it to libreoffice and sleep a short time before returning
  to mutt,
 
 I usually recommend hard linking (not symbolic linking!) over copying,
 if possible.
 
 -- 
 David Champion • d...@uchicago.edu • IT Services • University of Chicago

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt deletes attachement before libreoffice tries to open it

2012-06-22 Thread Luis Mochan
 But that would defeat the purpose of the copy which is to have a
 stable file for LibreOffice to read while allowing mutt to wipe and
 delete its temporary file.  A hard link would work if it wasn't that
 mutt wipes the file before unlinking it.
 

I guess not. If I understand correctly, the file will remain alive
while its link count of the file is possitive. Even if mutt deletes
(it's link), the other link (and the file) will survive. 

Regards,
Luis


Re: mutt deletes attachement before libreoffice tries to open it

2012-06-22 Thread Luis Mochan
On Fri, Jun 22, 2012 at 11:27:23AM -0700, Gary Johnson wrote:
 On 2012-06-22, Luis Mochan wrote:
   But that would defeat the purpose of the copy which is to have a
   stable file for LibreOffice to read while allowing mutt to wipe and
   delete its temporary file.  A hard link would work if it wasn't that
   mutt wipes the file before unlinking it.
   
  
  I guess not. If I understand correctly, the file will remain alive
  while its link count of the file is possitive. Even if mutt deletes
  (it's link), the other link (and the file) will survive. 
 
 Yes, but mutt overwrites the contents of the file with zeros first
 (what I meant by wiping), leaving the other link pointing to a file
 full of zeros, and leaving LibreOffice with nothing useful to read.
 
Got it. Anyway, what is the rationale for wiping the file contents? 
Security?   
Regards,
Luis 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt, html and chrome

2012-05-16 Thread Luis Mochan
Dear Marco,
Of course, simplicity is usually best! Thanks!
Luis

 This seems more like an hack but it works most of the times:
 
   text/html; /usr/bin/sensible-browser '%s'  sleep 2; ...
   text/html; /usr/bin/iceweasel '%s'  sleep 2; ...

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




mutt, html and chrome

2012-05-15 Thread Luis Mochan
Very recently I started having a curious situation when I open the
html version of messages with mutt. My default browser is
'chrome'. Typically, in mutt I press 'v', I find the html message from
the list, I press return and the message is displayed in a new window
in my running 'chrome'. Nevertheless, I sometimes get the error
message 'No webpage found for the web address:
file:///tmp/mutt.html'. If I insist enough times, the message
eventually is successfully displayed in my browser. My guess is that
there is some kind of race condition which becomes apparent only when
my computer is busy, as if the browser tries to read the temporal file before
mutt finishes writing and closing it. My system is debian/stable and I
am using the mutt package from the distribution. Any idea/suggestion will be
appreciated. 

Best regards,
Luis

pd. The output of mutt -v is:

Mutt 1.5.20 (2009-06-14)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.6.32-5-amd64 (x86_64)
ncurses: ncurses 5.7.20100313 (compiled with 5.7)
libidn: 1.15 (compiled with 1.15)
hcache backend: tokyocabinet 1.4.37
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  +USE_SMTP  
-USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET 
 +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE  
-ISPELL
SENDMAIL=/usr/sbin/sendmail
MAILPATH=/var/mail
PKGDATADIR=/usr/share/mutt
SYSCONFDIR=/etc
EXECSHELL=/bin/sh
MIXMASTER=mixmaster
To contact the developers, please mail to mutt-...@mutt.org.
To report a bug, please visit http://bugs.mutt.org/.

misc/am-maintainer-mode
misc/hg.pmdef.debugtime
debian-specific/build_doc_adjustments.diff
features/ifdef
features/xtitles
features/trash-folder
features/purge-message
features/sensible_browser_position
features-old/patch-1.5.4.vk.pgp_verbose_mime
features/compressed-folders
features/compressed-folders.debian
debian-specific/Muttrc
debian-specific/Md.etc_mailname_gethostbyname.diff
debian-specific/use_usr_bin_editor.diff
debian-specific/correct_docdir_in_man_page.diff
debian-specific/dont_document_not_present_features.diff
debian-specific/document_debian_defaults
debian-specific/assumed_charset-compat
debian-specific/467432-write_bcc.patch
misc/define-pgp_getkeys_command.diff
misc/gpg.rc-paths
misc/smime.rc
upstream/533209-mutt_perror.patch
upstream/533459-unmailboxes.patch
upstream/533439-mbox-time.patch
upstream/531430-imapuser.patch
upstream/534543-imap-port.patch
upstream/538128-mh-folder-access.patch
upstream/537818-emptycharset.patch
upstream/535096-pop-port.patch
upstream/542910-search-segfault.patch
upstream/533370-pgp-inline.patch
upstream/533520-signature-highlight.patch
upstream/393926-internal-viewer.patch
upstream/543467-thread-segfault.patch
upstream/544180-italian-yesorno.patch
upstream/542817-smimekeys-tmpdir.patch
upstream/544794-smtp-batch.patch
upstream/537694-segv-imap-headers.patch
upstream/548577-gpgme-1.2.patch
upstream/548494-swedish-intl.patch
upstream/553321-ansi-escape-segfault.patch
upstream/553238-german-intl.patch
upstream/557395-muttrc-crypto.patch
upstream/545316-header-color.patch
upstream/568295-references.patch
upstream/547980-smime_keys-chaining.patch
upstream/528233-readonly-open.patch
upstream/228671-pipe-mime.patch
upstream/383769-score-match.patch
upstream/547739-manual-typos.patch
upstream/311296-rand-mktemp.patch
upstream/573823-imap_internal_date
upstream/542344-dont_fold_From_
upstream/537061-dont-recode-saved-attachments.patch
upstream/619216-gnutls-CN-validation.patch
upstream/path_max
misc/hyphen-as-minus.patch
misc/smime_keys-manpage.patch
mutt.org



Re: mutt, html and chrome

2012-05-15 Thread Luis Mochan
 Looks more like mutt is handing over the URI file:///tmp/mutt.html to
 your browser and before this has time to fetch the file, mutt has
 deleted it again; depends on your configuration in .mailcap

I'm using the system's defaults since some long time ago. I guess the
relevant lines in my /etc/mailcap are:

  text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; 
nametemplate=%s.html
  text/html; /usr/bin/iceweasel '%s'; description=HTML Text; test=test -n 
$DISPLAY;  nametemplate=%s.html
  text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML 
Text; nametemplate=%s.html
  text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML 
Text; nametemplate=%s.html
  text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; 
description=HTML Text; nametemplate=%s.html
  text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
  text/html; /usr/bin/lynx -dump -force_html '%s'; copiousoutput; 
description=HTML Text; nametemplate=%s.html

Years ago I used to have 
  text/html; w3m %s; needsterminal; description=HTML Text; nametemplate=%s.html
  text/html; w3m -dump %s; copiousoutput; description=HTML Text; 
nametemplate=%s.html
in my own .mailcap, in order to display html in a terminal, but now they
are commented out. 

So the question now is, what should I put in my .mailcap?

The other question is what changed? This problem seems to be very
recent in my setup.

Thanks and best regards,
Luis

-- 
  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 






Re: mutt, html and chrome

2012-05-15 Thread Luis Mochan
Thanks Michael,
I'll try that when I get to my office. I found an alternative solution at 
   http://www.spocom.com/users/gjohnson/mutt/#html 
by running a simple script that saves the file and then call's the browser.
Best regards,
Luis


On Wed, May 16, 2012 at 12:27:19AM +0200, Michael Ludwig wrote:
 Luis Mochan schrieb am 15.05.2012 um 15:22 (-0500):
 ...
 IIRC there was an issue where the file would get deleted before the
 browser would get its hands on it. There's a set of Python scripts
 that fixes this problem:
 
 https://bitbucket.org/blacktrash/muttils
 
 Relevant Mutt configuration:
 
 # call viewhtmlmsg from macro
 macro index,pager F7 \
 ...
 Michael

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: mutt, html and chrome

2012-05-15 Thread Luis Mochan
I made a small perl script (attached) that replicates the behavior of
mutt_netscape by Gary A. Johnson garyj...@spk.agilent.com and which
seems to solve my problem of disappearing temporal files before the
browser reads them. 
Thanks for your kind help!
Luis




On Tue, May 15, 2012 at 07:30:06PM -0500, Luis Mochan wrote:
 Thanks Michael,
 I'll try that when I get to my office. I found an alternative solution at 
http://www.spocom.com/users/gjohnson/mutt/#html 
 by running a simple script that saves the file and then call's the browser.
 Best regards,
 Luis

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 


#!/usr/bin/env perl

use warnings;
use strict;

# SYNOPSIS
#   mutt_browse file
#
# DESCRIPTION
#   Runs a browser on a copy of a file, and sleeps for a while
#   before deleting it. It solves the problem that mutt may delete
#   the file too fast.
# EXAMPLE
#   To use a sensible browser to view HTML attachments from mutt, add the
#   following line to the .mailcap file.
#
#   text/html;  /path/to/mutt_browse %s
#
# AUTHOR
#   Luis Mochan moc...@fis.unam.mx
#   Shamelessly adapted from mutt_netscape by
#   Gary A. Johnson garyj...@spk.agilent.com
# 
# WARNING
#   This program has been tested in a Debian system
#   The temporal file is created in the /tmp directory
#   


# Variables to be customized
#
# template filename for temporal file
my $template=muttX; 

# Path to desired browser. Under Debian sensible-browser defaults to
# my prefered browser, but an explicit choice such as chrome,
# iceweasel, etc. may be used here.
my $browser=/usr/bin/sensible-browser; 

# Delay to give time for browser to read file before it is destroyed
my $delay=3; #in seconds
#
# End of customizations


use File::Temp qw(tempfile);

die EOF unless @ARGV==1;
Usage $0 file
  to run a sensible-browser over copy of file
EOF
die Can't read $ARGV[0] unless -r $ARGV[0];
my ($fh, $fname) = tempfile($template, DIR=/tmp, SUFFIX=.html, 
UNLINK=1);
open IN, , $ARGV[0];
while(IN){
print $fh $_;
}
close $fh;
system $browser, $fname;
sleep $delay; 


Re: mutt and stdin

2012-04-17 Thread Luis Mochan
On Tue, Apr 17, 2012 at 01:10:43PM -0300, Andrei Mikhailov wrote:
 Thank you !
 I think I now understand, more or less, why it does not work as expected.
 Perhaps my question is more about Linux, than about Mutt. What I really
 want to achieve is the following:
 
   echo mydata | myscript.sh
 
 where myscript.sh is the following:
 
   #!/bin/bash
   some-program-which-reads-from-stdin.sh
   mutt
If your purpose is automatically sending mail based on 'mydata' and
the results of some-program..., maybe you shouldn't use mutt, which I
believe is designed for interactive use. For example, in my perl
scripts I use Mime::Lite to send email as

my $msg=MIME::Lite-new(
From='My Name my@address',
To='Her name her@address',
Subject=My subject,
Type='text/plain; charset=utf-8',
Data=The message text with interpolated $variables,
);
$msg-attach(
Type='text/plain;charset=utf8',
Path='aTextFile.txt',
Disposition='inline'
);
$msg-attach(
Type='image/jpg',
Path='anImageFile.jpg',
Disposition='attachment'
);
   $msg-send;

Best regards,
Luis

 
 In other words, the script first reads the pipe and does something, 
 and then just calls mutt.
 Somehow, beteween ``some-program-...'' and ``mutt'' I have to insert
 some command, saying:
   ``finished reading pipe, control is now returning to the terminal''
 Is that possible?
 Is it possible to call Mutt from within scripts accepting pipe input?
 
 On Tue, Apr 17, 2012 at 10:37:55AM -0500, Derek Martin wrote:
  On Tue, Apr 17, 2012 at 11:46:15AM -0300, Andrei Mikhailov wrote:
   I would expect that this command:
   
 echo mymaildir | xargs mutt -f 
   
   be equivalent to:
   
 mutt -f mymaildir
   
   But instead, mutt complains about ``no recipient specified''.
   Please help me to figure this out!
  
  The problem here is that when you run it this way, Mutt's stdin is not
  a terminal.  When that's the case, mutt expects you're composing a
  message on the command line, and will complain when you don't provide
  it enough options to specify the message envelope:
  
  $ mutt -f Mailbox  /dev/null
  No recipients were specified.
  
  For the UI to work, stdin must be a terminal, so that mutt (or rather,
  whichever terminal control library it uses) knows what to send to the
  terminal to draw the screen, etc.  AFAIK there's no way around that.
  
  -- 
  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.
  
 
 

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Editing multiple messages with bash

2012-04-02 Thread Luis Mochan
I made an enhanced version of editlabel available at 
http://sourceforge.net/projects/editxlabel/ 
It handles tag-prefix but it still edits messages one at a
time. However, I added a history mechanism so that adding the same
labels to multiple files is relatively easy.
Regards,
Luis




On Tue, Apr 03, 2012 at 10:33:52AM +1000, Cameron Simpson wrote:
 On 02Apr2012 11:00, Jostein Gogstad jostein.gogs...@gmail.com wrote:
 | I stumbled upon editlabel [1] for editing labels (actually the X-Label 
 header)
 | with mutt. It sets the editor variable to a bash script, calls edit and 
 then
 | sets the variable back to vim.
 | 
 | Unfortunately, this only works on a single message. I'd like to tag N 
 messages
 | and then send all of them to a bash script for editing the X-Label header.
 
 Does tag-prefixedit work? Or is it a disaster?
 -- 
 Cameron Simpson c...@zip.com.au DoD#743
 http://www.cskk.ezoshosting.com/cs/
 
 Footnotes that extend to a second page are an abject failure of design.
 - Bringhurst, _The Elements of Typographic Style_

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: Macro to move mail to trash in Gmail.

2012-01-12 Thread Luis Mochan
Acoording to the manual, there is a variable:

resolve

Type: boolean
Default: yes

When set, the cursor will be automatically advanced to the next 
(possibly undeleted) message whenever a command that modifies the 
current message is executed.

I guess unsetting 'resolve' would help.

Regards,
Luis


On Thu, Jan 12, 2012 at 08:55:22AM +0200, Alexander Gattin wrote:
 Hello,
 
 On Wed, Jan 11, 2012 at 08:24:20AM -0600,
 Christian Dysthe wrote:
  macro index,pager D clear-flagNsave-message+Gmail/trashenter
  move message to the trash
  
  This one works, but iit moves to the next mail
  and deletes it instead of the current mail
  selected.
 
 Is it possible to remember position, mark message
 as read, then return to it and delete?
 
 Probably, simpler solution like mark, step up,
 delete would also work 99% of times...
 
 -- 
 With best regards,
 xrgtn

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




Re: flags on re-edited message

2012-01-04 Thread Luis Mochan
Well, I found today that if I remove the New flag, the Read flag
becomes visible if I had read the original message, so that flag is
not actually lost, but only hidden by the New flag. Thus, I have now a
reasonable solution: I can tag all my X-labelled and unread messages
and toogle the New flag of all of them.

On Tue, Jan 03, 2012 at 09:54:13PM -0600, Luis Mochan wrote:
 Hello,
 After I re-edit a message I have sent or a message I have received,
 usually to set or modify the X-Labels header, I loose the flags of the
 message. For example, if I read a message, reply to it and later edit
 it to set its X-Labels, the original message is marked for deletion
 and the new message is marked... New. I would like the new message in
 this example to be marked as read and replied-to. Is there a way to
 keep the old flags in the newwly edited message?
 Thanks and best regards,
 Luis
 


Re: flags on re-edited message

2012-01-04 Thread Luis Mochan
Mistake: I meant 'replied' instead of 'read' flag.

On Wed, Jan 04, 2012 at 12:58:30PM -0600, Luis Mochan wrote:
 Well, I found today that if I remove the New flag, the Read flag
 becomes visible if I had read the original message, so that flag is
 not actually lost, but only hidden by the New flag. Thus, I have now a
 reasonable solution: I can tag all my X-labelled and unread messages
 and toogle the New flag of all of them.
 
 On Tue, Jan 03, 2012 at 09:54:13PM -0600, Luis Mochan wrote:
  Hello,
  After I re-edit a message I have sent or a message I have received,
  usually to set or modify the X-Labels header, I loose the flags of the
  message. For example, if I read a message, reply to it and later edit
  it to set its X-Labels, the original message is marked for deletion
  and the new message is marked... New. I would like the new message in
  this example to be marked as read and replied-to. Is there a way to
  keep the old flags in the newwly edited message?
  Thanks and best regards,
  Luis
  

-- 

  o
W. Luis Mochán,  | tel:(52)(777)329-1734 /(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388 `/   /\
Apdo. Postal 48-3, 62251 |   (*)/\/  \
Cuernavaca, Morelos, México  | moc...@fis.unam.mx   /\_/\__/

O ascii ribbon campaign - stop html mail - www.asciiribbon.org 




flags on re-edited message

2012-01-03 Thread Luis Mochan
Hello,
After I re-edit a message I have sent or a message I have received,
usually to set or modify the X-Labels header, I loose the flags of the
message. For example, if I read a message, reply to it and later edit
it to set its X-Labels, the original message is marked for deletion
and the new message is marked... New. I would like the new message in
this example to be marked as read and replied-to. Is there a way to
keep the old flags in the newwly edited message?
Thanks and best regards,
Luis