From: Barry OReilly <gundaetiapo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 15045@debbugs.gnu.org, deng@randomsample.de
Subject: bug#15045: Point jumps inappropriately around time of Semantic lexing
Date: Thu, 8 Aug 2013 13:07:01 -0400 [thread overview]
Message-ID: <CAFM41H2Am39sGpsPKtcb_VrqQ1hN5B9dqfBnKYvHvWzBu0GLFA@mail.gmail.com> (raw)
In-Reply-To: <83zjssucnc.fsf@gnu.org>
Eli:
> Can you identify the area in this trace where the unwarranted scroll
> was visible?
Barry:
> but redisplay didn't need to scroll
Undesired scrolling is a downstream symptom. Upstream from it is point
visibly moving around inappropriately. I have scroll-margin set to 4,
so when point briefly moves into the top scroll-margin, I get
undesired scrolling. I don't know that I've seen point move to outside
the visible part of the buffer. If so, then users with scroll-margin 0
won't see undesired scrolling, but would still see point moving
around.
Thus, I'm debugging the symptom of point moving.
> A, B, and C are local variables whose meaning depends on the email
> in which they're used.
Ah, so it's not in "thread local storage".
> in Fredisplay, walk the specpdl stack looking for a
> save_excursion_restore where the saved position is different from
> the current value of point in that buffer.
Thanks for the tip. I tested this change and it seems to implement
what you described.
diff --git a/src/dispnew.c b/src/dispnew.c
index 522a0e6..cf0103e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5815,6 +5815,32 @@ immediately by pending input. */)
(Lisp_Object force)
{
ptrdiff_t count;
+ bool noninteractive_old = noninteractive;
+ noninteractive = true;
+ Lisp_Object curPtMarker = Fpoint_marker();
+ union specbinding *pdl = specpdl_ptr;
+ while (pdl > specpdl)
+ {
+ --pdl;
+ if (pdl->kind == SPECPDL_UNWIND
+ && pdl->unwind.func == save_excursion_restore
+ && ! EQ (Fequal (XSAVE_OBJECT (pdl->unwind.arg, 0),
curPtMarker), Qt))
+ {
+ { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm)
+ printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: Found
save_excursion_restore with mismatched point markers ", // TODO:
debugging
+ debug_dateStr, debug_ts.tv_nsec, getpid(),
pthread_self(), __FILE__, __LINE__ ); }
+ Fprin1(XSAVE_OBJECT (pdl->unwind.arg, 0), Qnil);
+ Fprin1(curPtMarker, Qnil);
+ printf("\n");
+ Fbacktrace();
+ fflush(stdout);
+ }
+ }
+ /* { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm); } */
+ /* printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: redisplay
\n", // TODO: debugging */
+ /* debug_dateStr, debug_ts.tv_nsec,
getpid(), pthread_self(), __FILE__, __LINE__ ); fflush(stdout); } */
+ /* Fbacktrace(); */
+ noninteractive = noninteractive_old;
swallow_events (1);
if ((detect_input_pending_run_timers (1)
We'll see what I get next time it comes up.
next prev parent reply other threads:[~2013-08-08 17:07 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 17:59 bug#15045: Point jumps inappropriately around time of Semantic lexing Barry OReilly
2013-08-07 18:30 ` Stefan Monnier
2013-08-07 18:42 ` David Engster
2013-08-07 19:31 ` Barry OReilly
2013-08-07 19:44 ` Eli Zaretskii
2013-08-07 20:39 ` Barry OReilly
2013-08-08 2:41 ` Eli Zaretskii
2013-08-08 17:07 ` Barry OReilly [this message]
2013-08-08 17:46 ` Eli Zaretskii
2013-08-07 21:23 ` Stefan Monnier
2013-08-08 17:21 ` David Engster
2013-08-08 18:06 ` Stefan Monnier
2013-08-08 18:13 ` David Engster
2013-08-08 21:39 ` Eli Zaretskii
2013-08-08 22:51 ` Stefan Monnier
2013-08-09 7:56 ` Eli Zaretskii
2013-08-09 14:03 ` Stefan Monnier
2013-08-09 14:16 ` Eli Zaretskii
2013-08-09 17:34 ` Stefan Monnier
2013-08-09 18:23 ` Eli Zaretskii
2013-08-08 20:03 ` Barry OReilly
2013-08-08 20:30 ` David Engster
2013-08-08 21:49 ` Eli Zaretskii
2013-08-09 5:36 ` David Engster
2013-08-09 7:53 ` Eli Zaretskii
2013-08-09 11:50 ` Eric M. Ludlam
2013-08-09 13:31 ` Eli Zaretskii
2013-08-09 14:04 ` Stefan Monnier
2013-08-09 14:19 ` Eli Zaretskii
2013-08-09 18:08 ` Stefan Monnier
2013-08-09 18:38 ` Eli Zaretskii
2013-08-09 18:41 ` David Engster
2013-08-09 20:49 ` Eli Zaretskii
2013-08-09 21:36 ` Stefan Monnier
2013-08-10 9:42 ` David Engster
2013-08-09 21:46 ` Stefan Monnier
2013-08-09 16:10 ` David Engster
2013-08-09 18:31 ` Eli Zaretskii
2013-08-10 9:54 ` David Engster
2013-08-10 10:22 ` Eli Zaretskii
2013-08-10 18:06 ` Barry OReilly
2013-10-14 19:32 ` Barry OReilly
2013-10-14 19:51 ` Eli Zaretskii
2013-10-15 13:42 ` Stefan Monnier
2013-10-15 14:12 ` Barry OReilly
2013-10-15 16:28 ` Eli Zaretskii
2013-10-15 17:08 ` Barry OReilly
2013-10-15 18:48 ` Eli Zaretskii
2013-10-15 19:19 ` Barry OReilly
2013-10-16 2:57 ` Stefan Monnier
2013-10-16 14:57 ` Barry OReilly
2013-10-16 17:50 ` Stefan Monnier
2013-10-16 18:32 ` Barry OReilly
2013-10-17 15:03 ` Barry OReilly
2013-10-17 18:18 ` Stefan Monnier
2013-10-17 20:01 ` Barry OReilly
2013-10-18 0:27 ` Stefan Monnier
2013-10-18 14:03 ` Barry OReilly
2013-10-25 19:15 ` Barry OReilly
2013-11-14 18:21 ` Barry OReilly
2013-11-16 4:14 ` Stefan Monnier
2013-11-16 4:54 ` Barry OReilly
2013-11-16 17:37 ` Stefan Monnier
2013-11-16 20:33 ` Barry OReilly
2013-11-16 21:29 ` Stefan Monnier
2013-08-09 18:50 ` Stefan Monnier
2013-08-09 9:12 ` martin rudalics
2013-08-09 16:27 ` David Engster
2013-08-09 17:10 ` martin rudalics
2013-08-09 18:51 ` Stefan Monnier
2013-08-08 21:26 ` Stefan Monnier
2013-08-08 21:57 ` Eli Zaretskii
2013-08-08 22:50 ` Stefan Monnier
2013-08-09 7:54 ` Eli Zaretskii
2013-08-08 21:47 ` Eli Zaretskii
2013-08-09 3:26 ` Eric M. Ludlam
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=CAFM41H2Am39sGpsPKtcb_VrqQ1hN5B9dqfBnKYvHvWzBu0GLFA@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=15045@debbugs.gnu.org \
--cc=deng@randomsample.de \
--cc=eliz@gnu.org \
/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.
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.