Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread clemens fischer
Nicholas Marriott wrote:

> On Sat, Feb 06, 2010 at 11:17:03PM +0100, clemens fischer wrote:
>
>> What I'd like to see after exiting from or suspending vim is this:
>> 
>>   --- (part of) vim output:
>>   ...
>>  /*
>>   * Enter alternative screen mode. A copy of the visible
>>   * screen is saved and the history is not updated
>>   */
>>   ...
>>   
>> /mnt/backup/no-backup/src/bulk/console/tmux/repo-cvs/tmux-build-spott/input.c,C
>>   --- right next comes some bash interaction:
>>   [1]+  3720 Stopped vim -p input.c
>>   /src/bulk/console/tmux/repo-cvs/tmux-build-spott
>>   $ hi 5
>>1027  100206-22:44 g saved_grid *.c
>>1028  100206-22:45 v /root/.tmux*
>>1029  100206-22:46 tmux set-option -g status-interval 12
>>1030  100206-22:47 newsq
>>1031  100206-22:54 hi 5
>> 
>> Instead there's nothing from the vim screen and I just see bash
>> interaction stuff.  This happens with all curses programs, and it might
>> have to do with saving the grid in input_handle_sequence_sm()@input.c on
>> every curses initialisation.  If this is the case, there should be an
>> option to switch it off.  The way I see it this option should still save
>> the original grid coordinates to be able to restore it properly in
>> input_handle_sequence_rm()@input.c.
>> 
>> The problem I see looking at lines 1189pp @ input.c is the GRID_HISTORY
>> flag, which is supposed to be off after handling the sm sequence.  I'm
>> not sure if it should stay on if a new option disables the saved_grid.
>> 

> You should be able to disable this behaviour my modifying the screen
> terminfo entry to remove smcup and rmcup. You can use infocmp to put
> it in a file then tic to compile it to ~/.terminfo.

Ok, but a per window option would be much better!


clemens


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread Nicholas Marriott
On Sat, Feb 06, 2010 at 11:17:03PM +0100, clemens fischer wrote:
> Micah Cowan wrote:
> 
> > clemens fischer wrote:
> >> Micah Cowan wrote:
> >> 
> >>> I think he's referring to the alternate buffer.
> >>>
> >>> clemens, one way of working around that would be to simply suspend
> >>> less or vim (or whatever) with C-z, enter copy-mode and grab what
> >>> you want, then exit copy-mode and resume your app.
> >> 
> >> Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
> >> I get to see whatever was on screen before that, but nothing from the
> >> screen session.
> > 
> > Then I'm not understanding what you're asking for.
> 
> I'm sorry, my description was wrong.  It should have read:
> 
>   Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
>   I get to see whatever was on screen before that, but nothing from the
>   _vim_ session.
> 
> What I'd like to see after exiting from or suspending vim is this:
> 
>   --- (part of) vim output:
>   ...
>  /*
>   * Enter alternative screen mode. A copy of the visible
>   * screen is saved and the history is not updated
>   */
>   ...
>   
> /mnt/backup/no-backup/src/bulk/console/tmux/repo-cvs/tmux-build-spott/input.c,C
>   --- right next comes some bash interaction:
>   [1]+  3720 Stopped vim -p input.c
>   /src/bulk/console/tmux/repo-cvs/tmux-build-spott
>   $ hi 5
>1027  100206-22:44 g saved_grid *.c
>1028  100206-22:45 v /root/.tmux*
>1029  100206-22:46 tmux set-option -g status-interval 12
>1030  100206-22:47 newsq
>1031  100206-22:54 hi 5
> 
> Instead there's nothing from the vim screen and I just see bash
> interaction stuff.  This happens with all curses programs, and it might
> have to do with saving the grid in input_handle_sequence_sm()@input.c on
> every curses initialisation.  If this is the case, there should be an
> option to switch it off.  The way I see it this option should still save
> the original grid coordinates to be able to restore it properly in
> input_handle_sequence_rm()@input.c.
> 
> The problem I see looking at lines 1189pp @ input.c is the GRID_HISTORY
> flag, which is supposed to be off after handling the sm sequence.  I'm
> not sure if it should stay on if a new option disables the saved_grid.
> 

You should be able to disable this behaviour my modifying the screen terminfo
entry to remove smcup and rmcup. You can use infocmp to put it in a file then
tic to compile it to ~/.terminfo.

> 
> clemens
> 
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread Micah Cowan
clemens fischer wrote:
> The problem I see looking at lines 1189pp @ input.c is the GRID_HISTORY
> flag, which is supposed to be off after handling the sm sequence.  I'm
> not sure if it should stay on if a new option disables the saved_grid.

My guess would be that this flag controls whether or not there's
scrollback saved for the currently-displayed screen (grid). So you want
it on so long as you're not in alternate-screen (smcup) mode. So yeah,
it should probably stay on.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread clemens fischer
Micah Cowan wrote:

> clemens fischer wrote:
>> Micah Cowan wrote:
>> 
>>> I think he's referring to the alternate buffer.
>>>
>>> clemens, one way of working around that would be to simply suspend
>>> less or vim (or whatever) with C-z, enter copy-mode and grab what
>>> you want, then exit copy-mode and resume your app.
>> 
>> Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
>> I get to see whatever was on screen before that, but nothing from the
>> screen session.
> 
> Then I'm not understanding what you're asking for.

I'm sorry, my description was wrong.  It should have read:

  Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
  I get to see whatever was on screen before that, but nothing from the
  _vim_ session.

What I'd like to see after exiting from or suspending vim is this:

  --- (part of) vim output:
  ...
 /*
  * Enter alternative screen mode. A copy of the visible
  * screen is saved and the history is not updated
  */
  ...
  
/mnt/backup/no-backup/src/bulk/console/tmux/repo-cvs/tmux-build-spott/input.c,C
  --- right next comes some bash interaction:
  [1]+  3720 Stopped vim -p input.c
  /src/bulk/console/tmux/repo-cvs/tmux-build-spott
  $ hi 5
   1027  100206-22:44 g saved_grid *.c
   1028  100206-22:45 v /root/.tmux*
   1029  100206-22:46 tmux set-option -g status-interval 12
   1030  100206-22:47 newsq
   1031  100206-22:54 hi 5

Instead there's nothing from the vim screen and I just see bash
interaction stuff.  This happens with all curses programs, and it might
have to do with saving the grid in input_handle_sequence_sm()@input.c on
every curses initialisation.  If this is the case, there should be an
option to switch it off.  The way I see it this option should still save
the original grid coordinates to be able to restore it properly in
input_handle_sequence_rm()@input.c.

The problem I see looking at lines 1189pp @ input.c is the GRID_HISTORY
flag, which is supposed to be off after handling the sm sequence.  I'm
not sure if it should stay on if a new option disables the saved_grid.


clemens


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread clemens fischer
Micah Cowan wrote:

> I think he's referring to the alternate buffer.

I'm sorry:  where is this "alternate buffer" implemented?  Does it have
to do with "input.c: * Enter alternative screen mode." and the
"*saved_grid" pointer?  Maybe I should try to add an option for
switching it off, per window or even per session.


clemens


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread Micah Cowan
clemens fischer wrote:
> Micah Cowan wrote:
> 
>> I think he's referring to the alternate buffer.
>>
>> clemens, one way of working around that would be to simply suspend
>> less or vim (or whatever) with C-z, enter copy-mode and grab what you
>> want, then exit copy-mode and resume your app.
> 
> Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
> I get to see whatever was on screen before that, but nothing from the
> screen session.

Then I'm not understanding what you're asking for.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread clemens fischer
Micah Cowan wrote:

> I think he's referring to the alternate buffer.
> 
> clemens, one way of working around that would be to simply suspend
> less or vim (or whatever) with C-z, enter copy-mode and grab what you
> want, then exit copy-mode and resume your app.

Oh, I'm doing that all the time, but no dice.  Suspend vim and poof,
I get to see whatever was on screen before that, but nothing from the
screen session.


clemens


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread Micah Cowan
Nicholas Marriott wrote:
>> - Any time I view a manual page, use the "less" pager or the "vim"
>>   editor, I get a fresh screen page.  This disturbs me somewhat, because
>>   I'm used to go up in copy-mode, select some text and paste it where
>>   it's needed.
> 
> I don't understand what you mean by this.

I think he's referring to the alternate buffer.

clemens, one way of working around that would be to simply suspend less
or vim (or whatever) with C-z, enter copy-mode and grab what you want,
then exit copy-mode and resume your app.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: terminal-overrides: proper terminfo entries?

2010-02-06 Thread Nicholas Marriott
On Sat, Feb 06, 2010 at 06:58:19PM +0100, clemens fischer wrote:
> (using CVS HEAD from today on linux with urxvt-unicode)
> 
> Hi,
> 
> I have the following problems:
> 
> - In "tin" (the ncurses newsreader) I had a black background with
>   various colours on it, while the urxvt has a brownish background with
>   light sand coloured text on it.  With "screen", the background of the
>   entire screen was black in "tin", with "tmux", it is black only where
>   "tin" writes something, otherwise it is brown.  This is hard to read.

Sounds like it isn't using default colours properly. Send me the log and
tmux.out files from starting a fresh tmux with -, running tin, then killing
tmux.

> 
> - Any time I view a manual page, use the "less" pager or the "vim"
>   editor, I get a fresh screen page.  This disturbs me somewhat, because
>   I'm used to go up in copy-mode, select some text and paste it where
>   it's needed.

I don't understand what you mean by this.

> 
> I suspect these being repairable by setting proper terminfo
> capabilities, but how do I find them?  For example I imagine the "tin"
> problem get fixed by making "tmux" always redraw the entire screen space
> even when "tin" wouldn't.
> 
> 
> clemens
> 
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users