<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Add $status_hook for xterm title updates



On Monday, 05 March 2007 at 15:58, David Champion wrote:
> * On 2007.03.05, in <20070305214328.GA28253@xxxxxxxxxxxxxxxxx>,
> *     "Brendan Cully" <brendan@xxxxxxxxxx> wrote:
> > 
> > (though in the case of this particular patch, I'm thinking of
> > attempting to fix up dgc's fmtpipe patch instead, since it's a little
> > more general).
> 
> That would be lovely.  Let me know if there's anything I can do to
> help.  I don't think I've ever seen specific problems with this patch
> mentioned, although Thomas once wrote:

I think I may have mentioned in the $xtitle thread, your patch doesn't
handle things like %> which cause recursive invocations of
mutt_FormatString. I think this would be easy to fix by having
mutt_FormatString check for a pipe at the end (or whatever syntax gets
used), and if so pop off the first argument (maybe with extract_token
to get the quoting right) and the pipe, and recursively expand what's
left before piping it through the first argument. It'd be great if you
could take a stab at it.

> > > http://home.uchicago.edu/~dgc/sw/mutt/patch-1.5.6.dgc.fmtpipe.1
> > >       DT_STR variables can be specified as pipes, with syntactic
> > >       advantages over backticking, deferred execution, and
> > >       consistency with DT_PATH.
> >
> > This one has the potential to break quite a few things...  If we
> > want the deferred execution, we should rather think about having a
> > configuration file syntax like double backticks or something.
> 
> But I was never sure what this would break, even if it's perhaps not an
> ideal solution.

The only thing I can see is that it would cause problems for people
who happen to have | at the end of some of their variable
assignments. Thomas, did you have something else in mind?

> It might be nice to see the pipe notation extended to more DT_ types, in
> fact, but I've not often wanted that myself.

Attachment: pgprSNcPZQXFE.pgp
Description: PGP signature