Re: external file manager

2011-10-25 Thread Volker Bouffier


> I expect it to break with tabs etc in the filename too.

    call append(6, map(readfile('/tmp/chosenfiles'), '"Attach: 
".substitute(v:val,''\s'',''\\ '',"g")'))

This should handle even tabs. I also replaced the insert line with 6. Here is 
the whole thing:
|  " mutt: insert attachment with ranger
|  fun! RangerMuttAttach()
|      if filereadable('/tmp/chosendir')
|          silent !ranger --choosefiles=/tmp/chosenfiles 
--choosedir=/tmp/chosendir "$(cat /tmp/chosendir)"
|      else
|          silent !ranger --choosefiles=/tmp/chosenfiles 
--choosedir=/tmp/chosendir
|      endif    
|      if filereadable('/tmp/chosenfiles')
|          call append(6, map(readfile('/tmp/chosenfiles'), '"Attach: 
".substitute(v:val,''\s'',''\\ '',"g")'))
|          call system('rm /tmp/chosenfiles')
|      endif
|      redraw!
|  endfun
|  map  :call RangerMuttAttach()
|  imap  :call RangerMuttAttach()a


Re: Help with multiple emails

2011-10-25 Thread Gregor Zattler
Hi 42possibletrash,
* 42possibletr...@googlemail.com <42possibletr...@googlemail.com> [23. Oct. 
2011]:
> Thank you for your replies Gregor Zattler and Jostein Gogstad. I have
> followed Gregor's advice and moved all my emails into one folder,
> /data/mail. This is my current .muttrc:
> http://ompldr.org/vYXh6ZQ]http://ompldr.org/vYXh6ZQ. 

ATM I cannot access this website.  

> The current problem I am having is setting up mutt to my liking
> in terms of composing emails. This may not be a crucial
> problem, but I hope you don't mind helping me out all the
> same. On eudora and previous email clients I was able, albeit
> with some work, to get them to let me compose new emails with
> no 'From' information by default. This helped as it meant that
> I had to consider which account I should be sending emails from
> on an individual basis, hence less mistakes. However as you can
> probably see from my .muttrc I have been having trouble
> configuring this. Ideally I would like mutt to prompt for a
> from address every time I compose a new email, rather than
> having to use a macro which can properly function only once
> (subsequent attempts brings up a list of every alias
> entry). 

3.299. use_from

Type: boolean
Default: yes

When set, Mutt will generate the “From:” header field when
sending messages. If unset, no “From:” header field will be
generated unless the user explicitly sets one using the “my_hdr”
command.

So set use_from.  And:

3.74. from

Type: e-mail address
Default: (empty)

When set, this variable contains a default from address. It can
be overridden using “my_hdr” (including from a “send-hook”) and
$reverse_name. This variable is ignored if $use_from is unset.

This setting defaults to the contents of the environment variable
$EMAIL.

And explicitly set from to an empty string.

I don't have the time to test this, but I assume it gives you an
empty from header.  If you also set

3.57. edit_headers

Type: boolean
Default: no

This option allows you to edit the header of your outgoing
messages along with the body of your message.

Note that changes made to the References: and Date: headers are
ignored for interoperability reasons.

You are able to edit all email header within your editor.


> Also I note that currently my alternate addresses seem
> to have no function, as the index limiting macros have the
> addresses input as literal strings anyway. Any help would be
> appreciated :-) .

Still no access to your settings.  I described in my previous
email how to set alternate email addresses.  What happens if you
hit `l' (for limit) when you are seeing your folder index (the
emails in your folder) and give `~P' as the limiting pattern?

Should show all emails from all your email addresses.

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-


Key binding problem

2011-10-25 Thread Tycho Andersen
Hi all,

I'm trying to bind a key combination to an action. Specifically, I'm
trying to bind ALT+j to something. :exec what-key gives me octal 252
as the value for this key combo, so I stuck:

  bind index,pager \252 sidebar-next

in my ~/.muttrc. However, when I source it and press ALT+j, it tells
me that the key is not bound. What's more confusing is that if I do

  :push \252

I see the desired action.

Thoughts? TIA

\t


Re: Key binding problem

2011-10-25 Thread Veljko
On Tue, Oct 25, 2011 at 01:34:30PM -0500, Tycho Andersen wrote:
> Hi all,
> 
> I'm trying to bind a key combination to an action. Specifically, I'm
> trying to bind ALT+j to something. :exec what-key gives me octal 252
> as the value for this key combo, so I stuck:
> 
>   bind index,pager \252 sidebar-next
> 
> in my ~/.muttrc. However, when I source it and press ALT+j, it tells
> me that the key is not bound. What's more confusing is that if I do
> 
>   :push \252
> 
> I see the desired action.
> 
> Thoughts? TIA
> 
> \t

Hi!

Alt is same as pushed and released Esc, so \ej would give you ALT+j.

-- 
Veljko


“No authenticators available” [1.5.20 on CentOS 6]

2011-10-25 Thread Michael Graham
I’ve got mutt installed on my VPS running CentOS 6 (installed using yum), but I 
can’t get it to send mail.  It reads it just fine, and I can make changes to 
the IMAP server without issue, but can’t send.
  Using the default sendmail mechanism, it appears to send just fine, but 
never arrives.  I tested a variety of different recipients, but no luck with 
any of them; it just seems to disappear.  It does appear in my sent mail folder 
though.
  To get around this, I tried using SMTP, but get the error “No 
authenticators available”, and it refuses to send on a second, third, and 
fourth attempt.
  Any ideas how I can fix this?

Thanks,
Mike

-- 
 __ __ __
/ /_  ___ _/ /__ _/ / _  __
   /  '_/ _ \/ __/ _ `/ / _ `/ __/ _ \ |/ /Raconteur, Mostly
  /_/\_\\___/_/  \_,_/_/\_,_/\__/\___/___/ 



Re: Key binding problem

2011-10-25 Thread Tycho Andersen
On Tue, Oct 25, 2011 at 08:53:59PM +0200, Veljko wrote:
> 
> Hi!
> 
> Alt is same as pushed and released Esc, so \ej would give you ALT+j.

Thanks for the response!

Unfortunately, I still have the same problem (push \ej or push \252
works, but pressing ALT+j doesn't; pressing esc then j does, though).

\t


Re: Key binding problem

2011-10-25 Thread Brandon McCaig
Hello,

On Tue, Oct 25, 2011 at 03:19:38PM -0500, Tycho Andersen wrote:
> Unfortunately, I still have the same problem (push \ej or push
> \252 works, but pressing ALT+j doesn't; pressing esc then j
> does, though).

I am somewhat familiar with this. I know that in irssi it is the
same concept. I have mapped PgUp/PgDn to scroll one line at a
time to make it easier to read (the sudden jumping of a page is
hard to follow otherwise), but sometimes you do need to move
quite far so moving a screen at a time is preferred. So I have
meta-prior and meta-next move a screen at a time. Unfortunately,
this has always meant having to type ESC+(PgUp|PgDn) instead
(it's especially annoying because I have to push and release ESC
every time). I think it is a characteristic of the terminal used.
I imagine it's probably configurable to some extent, but I
haven't figured it out yet.


-- 
Brandon McCaig  
Castopulence Software 
Blog 
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'




Re: Key binding problem

2011-10-25 Thread Veljko
On Tue, Oct 25, 2011 at 03:19:38PM -0500, Tycho Andersen wrote:
> On Tue, Oct 25, 2011 at 08:53:59PM +0200, Veljko wrote:
> > 
> > Hi!
> > 
> > Alt is same as pushed and released Esc, so \ej would give you ALT+j.
> 
> Thanks for the response!
> 
> Unfortunately, I still have the same problem (push \ej or push \252
> works, but pressing ALT+j doesn't; pressing esc then j does, though).
> 
> \t

As Brandon said, it could be related to the terminal you are using. I
just added 
bind index \ej sidebar-next
to my muttrc and ALT+j works.

Acording to Rute User's Tutorial and Exposition "The Alt modifier (i.e.,
Alt-?) is in fact a short way of pressing and releasing Esc before
entering the key combination; hence Esc then f is the same as
Alt-f--UNIX is different from other operating systems in this use of
Esc."

Maybe your /etc/inputrc is mapped some other way?

-- 
Veljko


Cache Filenames Sensitivity

2011-10-25 Thread Paul

I have enabled header_cache and message_cachedir. When I switch to an IMAP 
folder, eg. 'Sent', the cache file Sent.hcache is created. When I switch to the 
same folder, but referring to it as 'sent', sent.hcache is created. I end up 
with Sent.hcache and sent.hcache, even though they are the same IMAP folder. 
The same is true for message_cachedir directories.

I don't know if this is a bug or if I need to fix it with a config setting. I 
didn't see any setting regarding case sensitivity of cache files, nor any bugs 
about it in Trac.

--

.


Re: Key binding problem

2011-10-25 Thread Tycho Andersen
On Tue, Oct 25, 2011 at 11:18:22PM +0200, Veljko wrote:
> 
> Acording to Rute User's Tutorial and Exposition "The Alt modifier (i.e.,
> Alt-?) is in fact a short way of pressing and releasing Esc before
> entering the key combination; hence Esc then f is the same as
> Alt-f--UNIX is different from other operating systems in this use of
> Esc."
> 
> Maybe your /etc/inputrc is mapped some other way?

Ah, yes, xterm was killing the alt. For future xterm users, adding:

  xterm*metaSendsEscape: true

to your ~/.Xresources (and running xrdb ~/.Xresources and restarting
xterm) fixes the issue. It seems strange to me that what-key worked
but the binding w/o the fix didn't, but I'll leave it as one of life's
great mysteries.

Thanks!

\t


IMAP FETCH 'Bug'

2011-10-25 Thread Paul

I am currently suffering with the 'bug' detailed 
http://support.microsoft.com/kb/191504 and 
https://bugzilla.mozilla.org/show_bug.cgi?id=92111

To summarise it, the remote IMAP server reports sizes incorrectly. That in 
itself I can live with. However, the effect I can't live with is when the 
server not provide all the attachments when I view a message, which I think is 
as a result of this bug. It just so happens that, when this happens, Mutt never 
downloads the text/plain part in particular, so what gets displayed in the 
viewer is raw HTML (everyone sends HTML :(). For example, I know that a 
particular message has text/plain and text/html parts, but, when this bug 
happens, Mutt only downloads the text/html part.

I know this is not a fault of Mutt, but that of the server. Is there a 
workaround for this in Mutt, some command I can do that will re-download a 
message from the server? The 'copy it to another folder' workaround mentioned 
in the second link above doesn't work for me.

This also prevents me from using message_cachedir, because if I have a new 
message and download it when the server is behaving badly like this, the cached 
message only contains the text/html part, and there's no way to get the full 
message (including text/plain) without clearing cache, restarting Mutt, and 
downloading the message again, in which case the server might give me only 
text/html again!

There is an enhancement request (http://dev.mutt.org/trac/ticket/3465) to do 
with only downloading a specific part, which might help if it ever gets 
implemented.

--

.


IMAP and '+.' format

2011-10-25 Thread Paul

With

set folder="imaps://server"

and the 'postponed' variable set to this:

set postponed="+.Drafts"

I am not asked if I want to resume a postponed message when I press 'm' to 
compose a message (the postponed message did get saved into the Drafts folder). 
However, with it set like this:

set postponed="imaps://server/Drafts"

I am asked if I want to resume it.

I see a similar behaviour with the 'record' variable. With it set as

set record="+.Sent"

it doesn't put sent mails into the Sent folder (although I'm sure I saw the 
status briefly say it was uploading the message after (or is it before?) it was 
sent). With it set like this:

set record="imaps://server/Sent"

it does save them into the Sent folder.

The '+.' does work for the 'spoolfile' variable, it just doesn't for 
'postponed' and 'record'.

--

.


Re: IMAP and '+.' format

2011-10-25 Thread Paul

Further, it seems that

set postponed="=Drafts"

works, but '=' does not word for 'record', which must be the full URL:

set record="imaps://server/Sent"

--

.


Re: external file manager

2011-10-25 Thread Volker Bouffier
>    call append(6, map(readfile('/tmp/chosenfiles'), '"Attach: 
>".substitute(v:val,''\s'',''\\ '',"g")'))

Sorry, this wasn't correct. But I think the following line should do it.
        call append(6, map(readfile('/tmp/chosenfiles'), '"Attach: 
".substitute(v:val,''\(\s\)'',''\\\1'',"g")'))

But who uses file names with tab characters?