From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alin Soare Newsgroups: gmane.emacs.devel Subject: Re: Efficient debugging of the redisplay. Date: Tue, 8 Dec 2009 14:34:16 -0500 Message-ID: References: <83k4wxi8r6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d7e054da28ad047a3ca887 X-Trace: ger.gmane.org 1260304732 27544 80.91.229.12 (8 Dec 2009 20:38:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Dec 2009 20:38:52 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 08 21:38:44 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NI6pY-0001Rz-3D for ged-emacs-devel@m.gmane.org; Tue, 08 Dec 2009 21:38:44 +0100 Original-Received: from localhost ([127.0.0.1]:35594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NI6pX-0007zz-Ku for ged-emacs-devel@m.gmane.org; Tue, 08 Dec 2009 15:38:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NI5pG-0008NZ-6v for emacs-devel@gnu.org; Tue, 08 Dec 2009 14:34:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NI5pF-0008Md-FO for emacs-devel@gnu.org; Tue, 08 Dec 2009 14:34:21 -0500 Original-Received: from [199.232.76.173] (port=39322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NI5pF-0008MO-Ae for emacs-devel@gnu.org; Tue, 08 Dec 2009 14:34:21 -0500 Original-Received: from ey-out-1920.google.com ([74.125.78.147]:57265) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NI5pC-0007on-6H; Tue, 08 Dec 2009 14:34:18 -0500 Original-Received: by ey-out-1920.google.com with SMTP id 4so739333eyg.34 for ; Tue, 08 Dec 2009 11:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=jgW0X+0VayoEiqifCosvc/0jpE38MVHBB+d3cUHLCfo=; b=IGnilny3TL8sXl62Z+wF5FHbHbCawA9JSyU9Wc06pDDaFIotnF6k0buncX+xA50KuG w8YOxiU7f/s2PVtRiO+aFc0y5RKQLJaPP/i0oJNZrulSt4y1yOUZIB+obHujyx1rO8Pg Osv/YEVBacKjyhhVkSDk0Zq7EtaowfTVKEdp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=PWaFmHVGJ+wDxC0gPOOZY8taqNJdw3kCLEDbBo1MRmUCYcPEFYfKGVXqo53GaAmcX7 JCMih7b0HoPiCP+KwwyMFypUFKbWJSoXhKFZSp2VJsEWZziXjIDex+3MTTEUtcL19hsS 5SC0A0oiztBHyZxhEajZo97IOUJOGmTpUqr9I= Original-Received: by 10.213.104.5 with SMTP id m5mr9329271ebo.40.1260300856338; Tue, 08 Dec 2009 11:34:16 -0800 (PST) In-Reply-To: <83k4wxi8r6.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Tue, 08 Dec 2009 15:37:28 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118401 Archived-At: --0016e6d7e054da28ad047a3ca887 Content-Type: text/plain; charset=ISO-8859-1 > > However, this tells me nothing about an efficient debugging of > > redisplay_internal, and about display in general. > > > > Could you suggest me something efficient, please? > > Please be more specific. What problem(s) are you trying to debug, and > what are your difficulties doing that? The answer(s) depend heavily > on this information. > In general, to insert a different criteria for displaying a frame. For example, suppose that I change Vframe_list to look like this one: Vframe_list = ( ( X Y ) ( Z T ) ) I want to write a function similar to other-frame, but that function should commute from X to Y. If Vframe_list had that form, then the actual code is good to commute from X to Z or from Y to T, but I am interested about a code to commute from X to Y. I did write a specification last days for tabs for emacs, and I want to adapt my code for tabs of console to that specification. I did commutation between frames, but I cannot switch to a tab. The specification must conform all the implementations: for console, gtk, athena, etc. Vframe_list = ( ( Xi . ( X1 X2 ... Xn)) ( Yj . ( Y1 Y2 ... Ym)) ... ) So I want Vframe_list to be composed of groups of frames. the CAR of every group is the active tab of that group. Xi must be one of X1 ... Xn. Yj must be one of Y1 ... Ym. Every frame from every group has a flag main_frame, defined in struct frame { ... Lisp_Object main_frame; ...} that can be t or nil. If it is set to t, then deleting such a frame , will delete all the group where the frame is present. The actual code of Emacs requires minimum changes to commute from the visible tab of a group to a visible tab of another group. frame-list will look something like: DEFUN ("frame-list", Fframe_list, Sframe_list, 0, 0, 0, doc: /* Return a list of all visible frames. */) () { Lisp_Object frames, f, value; value = Qnil; FOR_EACH_FRAME(frames, f) { if (FRAME_LIVE_P (XFRAME (f))) value = Fcons (f, value); } frames = Fcopy_sequence (value); return frames; } FOR_EACH_FRAME looks like #define FOR_EACH_FRAME(list_var, frame_var) \ for ((list_var) = Vframe_list; \ (CONSP (list_var) \ && (frame_var = XCAR (XCAR (list_var)), 1)); \ list_var = XCDR (list_var)) In general, the code requires little changes to implement the Vframe_list so. However, to commute from a tab to another tab, requires more changes. For example, visibility of a frame must be changes, the focus, etc. Here I have no idea about what I have to do. I will send the geeral specification for the tabs soon, and all the implementations for console, gtk, etc must conform to that specification. Alin. --0016e6d7e054da28ad047a3ca887 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> However, this tells me nothing about an efficient debugging of
> redisplay_internal, and about display in general.
>
> Could you suggest me something efficient, please?

Please be more specific. =A0What problem(s) are you trying to debug, = and
what are your difficulties doing that? =A0The answer(s) depend heavily
on this information.

In general, to insert a different criteria for displ= aying a frame.

For example, suppose that I change Vframe_list to loo= k like this one:

Vframe_list =3D ( (=A0 X Y ) ( Z T ) )

I wan= t to write a function similar to other-frame, but that function should comm= ute from X to Y.

If Vframe_list had that form, then the actual code is good to commute f= rom X to Z or from Y to T, but I am interested about a code to commute from= X to Y.

I did write a specification last days for tabs for emacs, a= nd I want to adapt my code for tabs of console to that specification. I did= commutation between frames, but I cannot switch to a tab.

The specification must conform all the implementations: for console, gt= k, athena, etc.

Vframe_list =3D ( ( Xi . ( X1 X2 ... Xn))=A0 ( Yj . = ( Y1 Y2 ... Ym)) ... )

So I want Vframe_list to be composed of group= s of frames. the CAR of every group is the active tab of that group. Xi mus= t be one of X1 ... Xn. Yj must be one of Y1 ... Ym.

Every frame from every group has a flag main_frame, defined in struct f= rame { ... Lisp_Object main_frame; ...} that can be t or nil. If it is set = to t, then deleting such a frame , will delete all the group where the fram= e is present.

The actual code of Emacs requires minimum changes to commute from the v= isible tab of a group to a visible tab of another group.

frame-list = will look something like:

DEFUN ("frame-list", Fframe_list= , Sframe_list,
=A0=A0=A0=A0=A0=A0 0, 0, 0,
=A0=A0=A0=A0=A0=A0 doc: /* Return a list of = all visible frames.=A0 */)
=A0=A0=A0=A0 ()
{
=A0 Lisp_Object frame= s, f, value;

=A0 value =3D Qnil;
=A0 FOR_EACH_FRAME(frames, f)=A0=A0=A0 {
=A0=A0=A0=A0=A0 if (FRAME_LIVE_P (XFRAME (f)))
=A0=A0=A0=A0=A0=A0=A0=A0=A0 value =3D Fcons (f, value);
=A0=A0=A0 }
<= br>=A0 frames =3D Fcopy_sequence (value);

=A0 return frames;
}
FOR_EACH_FRAME looks like

#define FOR_EACH_FRAME(list_var, fra= me_var)=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 \
=A0 for ((list_var) =3D Vframe_li= st;=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 \
=A0=A0=A0=A0=A0=A0 (CONSP (list_var)=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0= =A0=A0=A0 \
=A0=A0=A0 && (frame_var =3D XCAR (XCAR (list_var)),= 1));=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 \
=A0=A0=A0=A0=A0=A0 list_var =3D= XCDR (list_var))


In general, the code requires little changes t= o implement the Vframe_list so. However, to commute from a tab to another t= ab, requires more changes. For example, visibility of a frame must be chang= es, the focus, etc. Here I have no idea about what I have to do.

I will send the geeral specification for the tabs soon, and all the imp= lementations for console, gtk, etc must conform to that specification.
<= br>



Alin.




--0016e6d7e054da28ad047a3ca887--