all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 32537@debbugs.gnu.org
Subject: bug#32537: 26.1.50; Tramp: Cursor jumps when typing during asynchronous find-file
Date: Wed, 29 Aug 2018 17:49:33 +0300	[thread overview]
Message-ID: <83r2ih2poi.fsf@gnu.org> (raw)
In-Reply-To: <87r2ii1ddf.fsf@runbox.com> (message from Gemini Lasswell on Tue,  28 Aug 2018 12:48:28 -0700)

> From: Gemini Lasswell <gazally@runbox.com>
> Cc: 32537@debbugs.gnu.org
> Date: Tue, 28 Aug 2018 12:48:28 -0700
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I guess some code in the background thread calls a yielding function
> > inside save-excursion or something?  I'd try running with a breakpoint
> > in set_point_both and temp_set_point_both, with commands that show the
> > backtrace and immediately continue the program.  Then you might see
> > the culprit.
> 
> Here is an excerpt from my gdb output from following your instructions.
> (I made the breakpoints conditional on the buffer being *scratch*.)

Thanks.

> It looks like your guess is correct, since there is a save-excursion
> in tramp-sh-handle-file-attributes wrapping code that executes
> commands on the remote machine.

Hmm... does that mean tramp-sh-handle-file-attributes runs with
*scratch* is its current buffer?  It was *scratch* that you were
typing into when this point jumps happened, right?  It's strange that
Tramp uses the current buffer for its processing, but Michael should
know.

If tramp-sh-handle-file-attributes is not using *scratch*, then we'll
need to find some other code in the functions run in backtrace that
does.

> Thread 1 "find-file /scp:" hit Breakpoint 4, set_point_both (charpos=195, 
>     bytepos=195) at intervals.c:1826
> 1826	{
> "electric-indent-post-self-insert-function" (0xf9420)
> "self-insert-command" (0xf9620)
> "funcall-interactively" (0xf9618)
> "call-interactively" (0xf98f0)
> "command-execute" (0xf9c08)

Wait a minute, why does self-insert-command run in a non-main thread?
Could it be that somehow a non-main thread started receiving and
interpreting your keyboard input?  (The "find-file /scp:" thread is
not the main thread, right?)





  reply	other threads:[~2018-08-29 14:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-26 17:39 bug#32537: 26.1.50; Tramp: Cursor jumps when typing during asynchronous find-file Gemini Lasswell
2018-08-26 18:32 ` Eli Zaretskii
2018-08-28 19:48   ` Gemini Lasswell
2018-08-29 14:49     ` Eli Zaretskii [this message]
2018-08-29 17:55       ` Gemini Lasswell
2018-08-29 18:14         ` Eli Zaretskii
2018-08-30 18:49           ` Gemini Lasswell
2018-08-31  6:40             ` Eli Zaretskii
2018-08-31 16:52               ` Gemini Lasswell
2018-09-01 13:35                 ` Eli Zaretskii
2018-09-01 15:27                   ` Michael Albinus
2018-09-02  0:24                   ` Gemini Lasswell
2018-09-02  2:35                     ` Eli Zaretskii
2018-09-02  8:33                       ` Michael Albinus
2018-09-02 16:09                         ` Gemini Lasswell
2018-09-02 17:40                           ` Michael Albinus

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=83r2ih2poi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32537@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    /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.