emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficient debugging of the redisplay.


From: Alin Soare
Subject: Re: Efficient debugging of the redisplay.
Date: Tue, 8 Dec 2009 14:34:16 -0500


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]