Hi Christian,

On Tue, Nov 30, 2010 at 08:10:24AM +0100, Christian Ebert wrote:
> > The idea (suggested by Jostein) was, that there is one (named) screen
> > window per mailbox, and that muttjump selects this precise window and
> > jumps to the message there in *already running* mutt. Since mutt is
> > already running for each mailbox, you can only do that with `screen
> > stuff` I guess.
> 
> Ah, now I understand the setup. But then I would need to have as many mutt
> instances open as I have mailboxes because I don't know in
> advance which one will be opened - to a large extent the purpose
> of muttjump (at least for me): to find out in which Maildir the
> message is. As I have many mailboxes I didn't understand the use
> case in the first place.

Yes, I think Jostein has a setup where he opens one mutt for each
mailbox in advance! I tried to check in screen if a window exists and
if not start mutt, but I couldn't find out how that is possible...
I renamed MUTT_USE_SCREEN to MUTTJUMP_MULTI_SCREEN_MODE for clarity.

> > If one just wants to open a new screen window every time
> > muttjump is called, it would be enough to leave SCREEN mode disabled and
> > set
> >     MUTT="screen -X screen mutt"
> 
> Yes, I reverted to my original proposal: to do the above,
> combined with a test for $STY. If in a running screen session,
> open new screen, use the terminal hack otherwise. - The above
> fallback might also be a good idea if MUTT_USE_SCREEN=yes dies
> and $STY is not empty.

Ok, I uploaded a new version which uses $STY. The setting
MUTT_USE_SCREEN can be "yes", "no" or "auto". If is is "auto",
screen is only used when $STY is set. If it is "yes", screen is always
used (a new screen session might be started), and with "no", the
terminal hack is always applied.

How do you like it?


> P.S. wrt is_callable: if you do not use the full path, you don't
> need the -p option for type.

I used it as a way to silence stderr. But maybe it would be cleaner to
just use `type $1 >/dev/null 2>&1`.


Johannes

Attachment: pgpwTzI5l1LYa.pgp
Description: PGP signature

Reply via email to