From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: David Engster <deng@randomsample.de>
Cc: 22287@debbugs.gnu.org
Subject: bug#22287: 25.1.50; Sudden jumping point in buffer
Date: Sun, 3 Jan 2016 21:51:04 +0100 [thread overview]
Message-ID: <20160103205104.GB11570@scotty.home> (raw)
In-Reply-To: <87twmumzqm.fsf@engster.org>
Mail von David Engster, Sun, 03 Jan 2016 at 16:47:29 +0100:
Hello,
> That's interesting. Why do timers run here at all? Since your
> 'out:'-Message comes before that, it is clear that this is not because
> of `accept-process-output'.
I extended semanticdb-save-all-db-idle a little bit and replaced the
semantic-exit-on-input macro with its code:
,----
| (defun semanticdb-save-all-db-idle ()
| "Save all semantic tag databases from idle time.
| Exit the save between databases if there is user input."
| (semantic-safe "Auto-DB Save: %S"
| ;; FIXME: Use `while-no-input'?
| ;; (save-excursion
| (let ((start (point)))
| (setq my-msg t)
| (message "*** sem start: buffer %s %d" (buffer-name) (point))
| (let ((semantic-current-input-throw-symbol 'semanticdb-idle-save)
| (semantic--on-input-start-marker (point-marker)))
| (catch 'semanticdb-idle-save
| ;; ,@forms)))
| ;;(semantic-exit-on-input 'semanticdb-idle-save
| (mapc (lambda (db)
| (message "*** sem: buffer %s %d" (buffer-name) (point))
| (when
| (and semantic-current-input-throw-symbol
| (or
| (let
| ((pos
| (point))
| rc)
| (setq rc
| (input-pending-p))
| (message "*** input: rc=%s %d %d" rc pos
| (point))
| rc)
| (let ((pos (point))
| rc)
| (with-current-buffer
| (marker-buffer semantic--on-input-start-marker)
| (save-excursion
| (goto-char semantic--on-input-start-marker)
| (setq rc (accept-process-output))))
| (message "*** out: rc=%s %d %d" rc pos (point))
| rc)))
| (message "throw %d"
| (point))
| (throw semantic-current-input-throw-symbol 'semanticdb-idle-save))
| (let ((pos (point)))
| (semanticdb-save-db db t)
| (if (/= pos (point))
| (message "*** db %s %d->%d" db pos (point)))
| ))
| semanticdb-database-list)
| (message "*** sem end: buffer %s %d->%d" (buffer-name) start (point))
| )
| (message "*** sem end2: buffer %s %d->%d" (buffer-name) start (point))
| (message "*** sem end2: timer %s" timer-list)
| (message "*** sem end2: idle-timer %s" timer-idle-list)
| (message "*** sem end2: post-command-hook %s" post-command-hook)
| (message "*** sem end2: pre-command-hook %s" pre-command-hook)
| )
| (setq my-msg nil)
| )
| ))
`----
This shows:
- With my-msg I tried to show running timers inside semantic-exit-on-input.
There where just calls to jit-lock-deferred-fontify, but never when
jumping point.
- point is never moving inside the "catch" ("sem end" has never shown up)
- every time point was jumping was with "sem end2"
> before calling `accept-process-output'. This here seems to be something
> different, in that not Semantic is moving point but some timer (which
> does not mean there isn't a bug in Semantic here).
> This makes sense as I cannot reproduce it here with
>
> emacs -Q -f semantic-mode
>
> I'd suggest that you also start with 'emacs -Q' and activate minor-modes
> you're using until you see the bug. Reducing `auto-save-interval' might
That was a good hint. I sat it to 20 and it happened more often.
When started with
emacs -Q
I got following minor-modes enabled in "intervals.c" buffer:
- abbrev-mode
- transient-mark-mode
- line-number-mode
- auto-compression-mode
- auto-encryption-mode
- auto-composition-mode
- blink-cursor-mode
- font-lock-mode
- global-font-lock-mode
- file-name-shadow-mode
- menu-bar-mode
- tool-bar-mode
- mouse-wheel-mode
- electric-indent-mode
- global-eldoc-mode
- tooltip-mode
- semantic-mode
- semantic-idle-scheduler-mode
- global-semantic-idle-scheduler-mode
- global-semanticdb-minor-mode
- diff-auto-refine-mode
- global-semantic-decoration-mode
- semantic-decoration-mode)
I tried to shut them off one after another. The minimum set of switched on
minor modes where the error happened was:
- menu-bar-mode
- semantic-mode
- semantic-idle-scheduler-mode
- global-semantic-idle-scheduler-mode
- global-semanticdb-minor-mode)
Output of one of moving point errors:
,----
| *** sem start: buffer intervals.c 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem: buffer intervals.c 49510
| *** input: rc=nil 49510 49510
| *** out: rc=nil 49510 49510
| *** sem end2: buffer intervals.c 49510->49391
| *** sem end2: timer nil
| *** sem end2: idle-timer ([nil 0 1 0 t semantic-idle-scheduler-function nil idle 0] [nil 0 60 0 t semantic-idle-scheduler-work-function nil idle 0])
| *** sem end2: post-command-hook (diff-post-command-hook t)
| *** sem end2: pre-command-hook nil
`----
When switching semantic-mode off, the error seems not to be reproducible.
This should it be for today.
With kind regards,
Stefan
--
Stefan-W. Hahn It is easy to make things.
It is hard to make things simple.
next prev parent reply other threads:[~2016-01-03 20:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 11:10 bug#22287: 25.1.50; Sudden jumping point in buffer Stefan-W. Hahn
2016-01-03 11:26 ` David Engster
2016-01-03 13:07 ` Stefan-W. Hahn
2016-01-03 15:47 ` David Engster
2016-01-03 20:51 ` Stefan-W. Hahn [this message]
2016-01-04 15:22 ` Eli Zaretskii
2016-01-05 15:01 ` Stefan-W. Hahn
2016-01-05 16:27 ` Eli Zaretskii
2016-01-05 19:51 ` Stefan-W. Hahn
2016-01-05 20:12 ` Eli Zaretskii
2016-01-05 21:08 ` Stefan-W. Hahn
2016-01-06 14:13 ` Stefan-W. Hahn
2016-01-06 21:52 ` David Engster
2016-02-21 16:29 ` David Engster
2016-01-04 15:22 ` Eli Zaretskii
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=20160103205104.GB11570@scotty.home \
--to=stefan.hahn@s-hahn.de \
--cc=22287@debbugs.gnu.org \
--cc=deng@randomsample.de \
/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.