* Johannes Weißl on Tuesday, November 30, 2010 at 02:35:54 +0100
> On Mon, Nov 29, 2010 at 01:47:53PM +0100, Christian Ebert wrote:
>>> It used to be like this, but I changed it in commit 6fde4fd [1]. The
>>> reason was that with the simple commands one layer less of quoting
>>> was required... I always had to use two screen commands when using
>>> <commands>.
>> 
>> That's why I'm looking for ways to avoid "screen stuff" where
>> possible.
> 
> I agree that "screen stuff" has problems, but for this solution I think
> it is required, see below.
> 
>>> Another advantage: mutt's history doesn't fill up with
>>> useless long <commands> :-). But you are right, it would be "cleaner" to
>>> use them!
>> 
>> Hm. With the jump to the first message as you suggested, I only get:
>> 
>> 4:~i'<Message-Id limited to>'|
>> 4:all|
> 
> What kind of history is this? mutt?

Yes.

> I meant when using `screen stuff ":push <limit>..."`, the mutt
> history gets crowded.

Haven't tried screen stuff for this yet. See below.

>> screen -X screen mutt ...
>> 
>> would either start a new window in the existing session or create
>> a new screen instance.
> 
> That doesn't work for me...

For me neither. Don't listen to me .. the second part should be:

or start a new window in running screen session (probably not
intended).

> it starts mutt in a new window when screen
> is running, but doesn't start a new session when no screen is running
> ("No screen session found"). Is there a way to do that?

Not without starting a new terminal.

>> Personally, I have just one screen session open usually and
>> therefore do not know about session names etc. So it was more
>> about giving you something to think about. And to avoid
>> "screen stuff" if possible.
> 
> 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.

> 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.

Anyway, thank you for the script!

c

P.S. wrt is_callable: if you do not use the full path, you don't
need the -p option for type.
-- 
Wer auf sein Elend tritt, steht höher.
_HÖLDERLIN:  HYPERION_  --->> http://www.blacktrash.org/hyperion

Reply via email to