Re: mutt variable expansion in shell command ?

2019-08-29 Thread Mathieu Carpentier
I did few tests and I think I'm going to use environment variable.

Before calling mutt I will source "~/.mutt/my-env.sh" where I'll set the
variable I'd like to use in muttrc (eg. MUTT_MAIL_FOLDER=~/Mail).
mailboxes `echo -n "+ "; cd $MUTT_MAIL_FOLDER/gmail; find . -maxdepth 1
-type d -name "*" -printf "+'%f' "`

It seems to work fine. I was just looking for a way to do it only with mutt
variable.


On Thu, Aug 29, 2019 at 12:45 AM  wrote:

> > I would like to use "folder" for mailboxes command:
> > mailboxes `echo -n "+ "; cd $folder; find . -maxdepth 1 -type d -name
> "*"
> > -printf "+'%f' "`
> >
> > When I run mutt, I get the content of my home directory in the side
> panel:
> > $folder was not "expanded". It works if I use an environment variable set
> > before starting mutt.
> >
> > Is it possible to use a mutt variable (e.g $folder) in a shell command ?
>
> Not a direct answer, but you _could_ use an environment variable, and
> then expand it in both places, ie.
>
> set folder=`echo $FOLDER`
>
>


Re: mutt variable expansion in shell command ?

2019-08-29 Thread Cameron Simpson

On 29Aug2019 19:11, Mathieu Carpentier  wrote:

I did few tests and I think I'm going to use environment variable.

Before calling mutt I will source "~/.mutt/my-env.sh" where I'll set the
variable I'd like to use in muttrc (eg. MUTT_MAIL_FOLDER=~/Mail).
mailboxes `echo -n "+ "; cd $MUTT_MAIL_FOLDER/gmail; find . -maxdepth 1
-type d -name "*" -printf "+'%f' "`


I invoke mutt via an script which sets various environment variables 
(and optionally does other stuff) for the same reason.



It seems to work fine. I was just looking for a way to do it only with mutt
variable.


Well, you can push a string which is subject to variable expansion, eg 
(untested):


 :push "blah $mutt_var blah"

and make hooks or macros to do such a thing.

If what you push then runs a shell script...

It is cumbersome, to say the least.

Cheers,
Cameron Simpson 


Re: flowed text (was: Adding delsp=yes to Content-Type)

2019-08-29 Thread José María Mateos

On Wed, Aug 28, 2019 at 01:37:02PM -0700, Kevin J. McCarthy wrote:
Mutt doesn't add the trailing spaces.  However, if you are replying to 
a flowed message, they won't be removed.  Whether to reflow the quoted 
content is up to you.  There may be some cases where it's not 
appropriate to do so.


This makes sense, now that you mention it. It wouldn't be appropriate to 
automatically reflow code blocks, etc. Thanks for the clarification.


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org/