all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Efficient debugging of the redisplay.
@ 2009-12-08 13:08 Alin Soare
  2009-12-08 18:55 ` Chong Yidong
  2009-12-08 19:08 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Alin Soare @ 2009-12-08 13:08 UTC (permalink / raw
  To: Emacs Dev [emacs-devel]

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

The only documentation about debugging the redisplay of emacs I did find in
./etc/DEBUG

** Debugging Emacs Redisplay problems

The src/.gdbinit file defines many useful commands for dumping redisplay
related data structures in a terse and user-friendly format:

 `ppt' prints value of PT, narrowing, and gap in current buffer.
 `pit' dumps the current display iterator `it'.
 `pwin' dumps the current window 'win'.
 `prow' dumps the current glyph_row `row'.
 `pg' dumps the current glyph `glyph'.
 `pgi' dumps the next glyph.
 `pgrow' dumps all glyphs in current glyph_row `row'.
 `pcursor' dumps current output_cursor.

However, this tells me nothing about an efficient debugging of
redisplay_internal, and about display in general.

Could you suggest me something efficient, please?




Alin

[-- Attachment #2: Type: text/html, Size: 935 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 13:08 Efficient debugging of the redisplay Alin Soare
@ 2009-12-08 18:55 ` Chong Yidong
  2009-12-08 19:10   ` Alin Soare
  2009-12-08 19:08 ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2009-12-08 18:55 UTC (permalink / raw
  To: Alin Soare; +Cc: Emacs Dev [emacs-devel]

Alin Soare <as1789@gmail.com> writes:

> However, this tells me nothing about an efficient debugging of
> redisplay_internal, and about display in general.
>
> Could you suggest me something efficient, please?

I usually just use standard GDB breakpoints.  Maybe you could be a bit
more specific about what you want to do.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 13:08 Efficient debugging of the redisplay Alin Soare
  2009-12-08 18:55 ` Chong Yidong
@ 2009-12-08 19:08 ` Eli Zaretskii
  2009-12-08 19:34   ` Alin Soare
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-12-08 19:08 UTC (permalink / raw
  To: Alin Soare; +Cc: emacs-devel

> Date: Tue, 8 Dec 2009 15:08:59 +0200
> From: Alin Soare <as1789@gmail.com>
> 
> 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.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 18:55 ` Chong Yidong
@ 2009-12-08 19:10   ` Alin Soare
  0 siblings, 0 replies; 7+ messages in thread
From: Alin Soare @ 2009-12-08 19:10 UTC (permalink / raw
  To: Chong Yidong; +Cc: Emacs Dev [emacs-devel]

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

> > However, this tells me nothing about an efficient debugging of
> > redisplay_internal, and about display in general.
> >
> > Could you suggest me something efficient, please?
>
> I usually just use standard GDB breakpoints.  Maybe you could be a bit
> more specific about what you want to do.
>


Thanks.


For example, suppose that I had 2 frames X and Y.

Suppose that Vframe_list = ( X Y Z T ) and selected_frame = X.

What would you do for emacs to display

 (caddr (member (selected-frame)
                         (frame-list) ) ) = Z

instead of X?

In general, suppose that you want to display a frame different of
selected_frame .

 What should you do? Apart from redisplay_internal, in which functions
should modify?




Alin.

[-- Attachment #2: Type: text/html, Size: 1085 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 19:08 ` Eli Zaretskii
@ 2009-12-08 19:34   ` Alin Soare
  2009-12-08 19:52     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Alin Soare @ 2009-12-08 19:34 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: cyd, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2753 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 19:34   ` Alin Soare
@ 2009-12-08 19:52     ` Eli Zaretskii
  2009-12-08 20:39       ` Alin Soare
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-12-08 19:52 UTC (permalink / raw
  To: Alin Soare; +Cc: cyd, emacs-devel

> Date: Tue, 8 Dec 2009 14:34:16 -0500
> From: Alin Soare <as1789@gmail.com>
> Cc: emacs-devel@gnu.org, cyd@stupidchicken.com
> 
> > 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.
> [detailed description omitted].

Well, thanks, but what problem(s) did you need to debug that this code
caused?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Efficient debugging of the redisplay.
  2009-12-08 19:52     ` Eli Zaretskii
@ 2009-12-08 20:39       ` Alin Soare
  0 siblings, 0 replies; 7+ messages in thread
From: Alin Soare @ 2009-12-08 20:39 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: Emacs Dev [emacs-devel]

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

> > In general, to insert a different criteria for displaying a frame.
> > [detailed description omitted].
>
> Well, thanks, but what problem(s) did you need to debug that this code
> caused?
>

In general I lose the control of the keyboard in the best case. Apart from
this, it happens that the cursor blocks somewhere on the screen, or in
another case the redisplay is very slow.

So something is not complete every time.

[-- Attachment #2: Type: text/html, Size: 665 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-08 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 13:08 Efficient debugging of the redisplay Alin Soare
2009-12-08 18:55 ` Chong Yidong
2009-12-08 19:10   ` Alin Soare
2009-12-08 19:08 ` Eli Zaretskii
2009-12-08 19:34   ` Alin Soare
2009-12-08 19:52     ` Eli Zaretskii
2009-12-08 20:39       ` Alin Soare

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.