Gnus development mailing list
 help / color / mirror / Atom feed
* set-window-point in gnus-dribble-enter?
@ 2002-06-07 15:05 Josh Huber
  2002-06-10 16:32 ` Josh Huber
  2002-06-10 18:28 ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Josh Huber @ 2002-06-07 15:05 UTC (permalink / raw)


I'm not sure why I'm seeing this now, but perhaps it's an XEmacs bug.
When I hit RET on a topic to fold/unfold it, the point jumps to the
end of the *Groups* buffer /every/ time.  This is irritating, to say
the least.  The reason for it is the line:

       (set-window-point (get-buffer-window (current-buffer)) (point-max))

in gnus-dribble-enter, called from gnus-dribble-touch, which is called
from gnus-topic-select-group.

Anyone know what the goal of this call was?  I suspect this is also
the cause of random groups getting redrawn at the bottom of my groups
buffer as well.  I'm not sure why it started happening recently
though.  Does anyone else see this?

ttyl,
-- 
Josh Huber



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-07 15:05 set-window-point in gnus-dribble-enter? Josh Huber
@ 2002-06-10 16:32 ` Josh Huber
  2002-06-10 18:28 ` Reiner Steib
  1 sibling, 0 replies; 8+ messages in thread
From: Josh Huber @ 2002-06-10 16:32 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

>        (set-window-point (get-buffer-window (current-buffer)) (point-max))

So, could someone else please take a look at this and see why it's
there?  After staring at it for a while I can't figure out what it's
for, and since it's causing problems for me I'm inclined to remove it.

Of course, since no one else has mentioned it, perhaps there's
something wrong with my gnus/emacs installation?

Have a nice day,

-- 
Josh Huber



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-07 15:05 set-window-point in gnus-dribble-enter? Josh Huber
  2002-06-10 16:32 ` Josh Huber
@ 2002-06-10 18:28 ` Reiner Steib
  2002-06-11  4:10   ` Josh Huber
  1 sibling, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2002-06-10 18:28 UTC (permalink / raw)


On Fri, Jun 07 2002, Josh Huber wrote:

> I'm not sure why I'm seeing this now, but perhaps it's an XEmacs bug.
> When I hit RET on a topic to fold/unfold it, the point jumps to the
> end of the *Groups* buffer /every/ time.

I can't see this.

> I suspect this is also the cause of random groups getting redrawn at
> the bottom of my groups buffer as well. I'm not sure why it started
> happening recently though. Does anyone else see this?

Maybe: When I jump `j' to a group in a hidden topic, enter the group
and copy an article to another hidden group, the last mentioned group
(and sub-topic) appears at the bottom:

[ Gnus * 893 ]
  [ Mail --- all * 2 ]...
...
  [ Documentation --- all * 0 ]...
      [ Trash + Test * 0 ]
*             0: Test (08.06.2002) [?0 !2]

`Trash + Test' is a sub-sub-topic of `Mail --- all', so the group
should appear near the top rather than at the bottom.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-10 18:28 ` Reiner Steib
@ 2002-06-11  4:10   ` Josh Huber
  2002-06-11 11:01     ` Kai Großjohann
  2002-06-11 19:35     ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Josh Huber @ 2002-06-11  4:10 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> Maybe: When I jump `j' to a group in a hidden topic, enter the group
> and copy an article to another hidden group, the last mentioned group
> (and sub-topic) appears at the bottom:
>
> [ Gnus * 893 ]
>   [ Mail --- all * 2 ]...
> ...
>   [ Documentation --- all * 0 ]...
>       [ Trash + Test * 0 ]
> *             0: Test (08.06.2002) [?0 !2]
>
> `Trash + Test' is a sub-sub-topic of `Mail --- all', so the group
> should appear near the top rather than at the bottom.

Hmm, does commenting out that line change this behavior?  I've been
running for a few days without the call to set-window-point, and
things are working fine with me.

I'm still curious as to what it would be for.  I'm also curious as to
how it doesn't break it for everyone, and why it only started
happening to me recently ;)  I run CVS XEmacs so perhaps some behavior
changed wrt. set-window-point...hmm.

Ah hah:

@@ -1757,14 +1778,20 @@

 DEFUN ("set-window-point", Fset_window_point, 2, 2, 0, /*
 Make point value in WINDOW be at position POS in WINDOW's buffer.
+If WINDOW is the selected window, this actually changes the buffer's point
+instead of the window's point. (The equivalence of the selected window's
+point with its buffer's point is maintained throughout XEmacs.)
 */
        (window, pos))
 {
   struct window *w = decode_window (window);

   CHECK_INT_COERCE_MARKER (pos);
-  if (w == XWINDOW (Fselected_window (Qnil)))
-    Fgoto_char (pos, Qnil);
+  /* Don't dereference selected-window because there may not
+     be one -- e.g. at startup */
+  if (EQ (wrap_window (w), Fselected_window (Qnil)))
+    /* Even though window selected, buffer may not be current */
+    Fgoto_char (pos, w->buffer);
   else
     set_marker_restricted (w->pointm[CURRENT_DISP], pos, w->buffer);

Of course, I'm missing the distiction between the buffer point and the
window point.

This happened in the past 6 weeks, so it seems plausible that it's the
cause of my problems. bummer.

Still, I wonder what the intended purpose of the call was?

-- 
Josh Huber



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-11  4:10   ` Josh Huber
@ 2002-06-11 11:01     ` Kai Großjohann
  2002-06-11 19:35     ` Reiner Steib
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2002-06-11 11:01 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

> Of course, I'm missing the distiction between the buffer point and the
> window point.

Open a buffer, do C-x 2.  Now move point in one of the windows.  Now
you see that you have the same buffer in two windows, with two
different values of point.

It is not enough to have a point in each window: what happens if you
insert text at point in a buffer which is not displayed in a window?
Therefore, each buffer also has point.

XEmacs makes sure that buffer's point is always the same as the
current window's point.  (This means C-x o in the example above will
move buffer's point.)

Whee.  Thanks for bringing this up.  It wasn't clear to me before.
But it seems logical.

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-11  4:10   ` Josh Huber
  2002-06-11 11:01     ` Kai Großjohann
@ 2002-06-11 19:35     ` Reiner Steib
  2002-06-11 20:37       ` Josh Huber
  1 sibling, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2002-06-11 19:35 UTC (permalink / raw)


On Tue, Jun 11 2002, Josh Huber wrote:

> Reiner Steib <4uce.02.r.steib@gmx.net> writes:
[...]
>> `Trash + Test' is a sub-sub-topic of `Mail --- all', so the group
>> should appear near the top rather than at the bottom.
>
> Hmm, does commenting out that line change this behavior?  I've been
> running for a few days without the call to set-window-point, and
> things are working fine with me.

After commenting out the line from gnus-dribble-enter, the group and
topics appear at the expected position.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-11 19:35     ` Reiner Steib
@ 2002-06-11 20:37       ` Josh Huber
  2002-06-12  9:48         ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Josh Huber @ 2002-06-11 20:37 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> After commenting out the line from gnus-dribble-enter, the group and
> topics appear at the expected position.

Well, I'm about to commit a change commenting this out, let's see who
screams.  :)

Have a nice day,

-- 
Josh Huber



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

* Re: set-window-point in gnus-dribble-enter?
  2002-06-11 20:37       ` Josh Huber
@ 2002-06-12  9:48         ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2002-06-12  9:48 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

> Well, I'm about to commit a change commenting this out, let's see who
> screams.  :)

Thanks!

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



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

end of thread, other threads:[~2002-06-12  9:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07 15:05 set-window-point in gnus-dribble-enter? Josh Huber
2002-06-10 16:32 ` Josh Huber
2002-06-10 18:28 ` Reiner Steib
2002-06-11  4:10   ` Josh Huber
2002-06-11 11:01     ` Kai Großjohann
2002-06-11 19:35     ` Reiner Steib
2002-06-11 20:37       ` Josh Huber
2002-06-12  9:48         ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).