Hi, 

it is maybe not as easy to do as I thought it would be. It is similar to 
adding some kind of character control (for adding color, etc.) into the 
output but as the mrxvt structure use a  lot the same character pointer 
which it will increment when it has processed it, it looks impossible to add 
new character in this buffer... 

If ever you can do something like this, it may begin in rxvt_process_getc  
(command.c) which loops through the buffer until  some  limit is reached or 
control character is reached, so that when rxvt_scr_add_lines (screen.c) is 
called, it  will use the same  PVTS(r, page)->rstyle. Maybe you can do 
something like an artificial change of "rstyle" when you see your regexp  
and break the loop in rxvt_process_getc before? 

Or else, you may do something at display time rather than processing time.  
For this, you  must  directly  change PSCR(r, page).rend when  you  see  
your regexp in PSCR(r, page).text.  But  what I find more complicated here 
is that both arrays are indexed by lines!  So you must consider your regexp 
being maybe on several lines (whereas working directly in the output buffer, 
everything is on a single line; and what if the text is not fully  processed 
from the output buffer into the display arrays?).
Such a change should probably begin  in  rxvt_scr_refresh which is the first 
step before display... 

Jehan 

jehan writes: 

> Hi,  
> 
> I have still some doc to write about the mrxvt structure  but  never  find  
> the time  for  anything  lately.  If  you want,  I will give  you the way to 
> do what you want soon.
> Regards,  
> 
> Jehan  
> 
> Charles Acknin writes:  
> 
>> Alright.  Any pointers as to where to start and whether mrxvt already
>> has a regexp engine or dependency on a third-party lib to do the
>> pattern matching?  
>> 
>> Charles  
>> 
>> On Fri, Jan 23, 2009 at 12:50 AM, Gautam Iyer <gi1...@stanford.edu> wrote:
>>> On Thu, Jan 22, 2009 at 01:46:06PM +0000, Charles Acknin wrote:  
>>>
>>>> I often run extremely verbose programs or large compilations in
>>>> parallel (read make -j) and it's hard to catch the errors or other
>>>> interesting information in such a large volume of characters.  I'm
>>>> looking for an mrxvt feature that could highlight patterns in the
>>>> scrollback buffer, probably like colorgcc or as an alternative to the
>>>> macro that fires up vim with the current scrollback buffer, but
>>>> built-in mrxvt (i.e. for any command run inside the terminal) without
>>>> the need of wrappers or external tools.  
>>>>
>>>> Is this something that currently exists or do I have to hack it
>>>> myself? :-)
>>>
>>> This doesn't exist currently, but we'd be very happy if you hacked it.
>>> Support for highlighting regexp's would also be useful for catching
>>> URL's say. This could easily be combined with a macro (or a Ctrl-Click)
>>> that does something with the highlighted region under the cursor (e.g.
>>> opens firefox on it).  
>>>
>>> As of now the only thing you can do is to open the scroll back buffer in
>>> your program of choice, in a new tab (e.g. colorgcc | less).  
>>>
>>> GI  
>>>
>>> --
>>> Alternative definitions of terms from Math Lectures:
>>> IT CAN EASILY BE SHOWN: Even you, in your finite wisdom, should be able
>>> to prove this without me holding your hand.  
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by:
>>> SourcForge Community
>>> SourceForge wants to tell your story.
>>> http://p.sf.net/sfu/sf-spreadtheword
>>> _______________________________________________
>>> Materm-devel mailing list
>>> Materm-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/materm-devel
>>> mrxvt home page: http://materm.sourceforge.net  
>>>
>>>
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>> _______________________________________________
>> Materm-devel mailing list
>> Materm-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/materm-devel
>> mrxvt home page: http://materm.sourceforge.net
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Materm-devel mailing list
> Materm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/materm-devel
> mrxvt home page: http://materm.sourceforge.net

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Materm-devel mailing list
Materm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/materm-devel
mrxvt home page: http://materm.sourceforge.net

Reply via email to