Gnus development mailing list
 help / color / mirror / Atom feed
From: Josh Huber <huber@alum.wpi.edu>
Subject: Re: set-window-point in gnus-dribble-enter?
Date: Tue, 11 Jun 2002 00:10:20 -0400	[thread overview]
Message-ID: <87k7p6piab.fsf@alum.wpi.edu> (raw)
In-Reply-To: <v9bsaj9efj.fsf@marauder.physik.uni-ulm.de>

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



  reply	other threads:[~2002-06-11  4:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07 15:05 Josh Huber
2002-06-10 16:32 ` Josh Huber
2002-06-10 18:28 ` Reiner Steib
2002-06-11  4:10   ` Josh Huber [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k7p6piab.fsf@alum.wpi.edu \
    --to=huber@alum.wpi.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).