From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32537: 26.1.50; Tramp: Cursor jumps when typing during asynchronous find-file Date: Sat, 01 Sep 2018 16:35:52 +0300 Message-ID: <83wos51gsn.fsf@gnu.org> References: <875zzxowlw.fsf@runbox.com> <83mut9568l.fsf@gnu.org> <87r2ii1ddf.fsf@runbox.com> <83r2ih2poi.fsf@gnu.org> <87wos9vyzs.fsf@runbox.com> <83d0u12g7f.fsf@gnu.org> <87sh2vwuyw.fsf@runbox.com> <83h8jb11ja.fsf@gnu.org> <877ek6wk9u.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535809749 17907 195.159.176.226 (1 Sep 2018 13:49:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2018 13:49:09 +0000 (UTC) Cc: 32537@debbugs.gnu.org To: Gemini Lasswell , Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 01 15:49:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fw6Gs-0004Tu-A7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Sep 2018 15:49:02 +0200 Original-Received: from localhost ([::1]:37255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw6Iy-0003ba-Mk for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Sep 2018 09:51:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw6He-0001aj-OV for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 09:49:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fw65G-0008Br-MY for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 09:37:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36270) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fw65G-0008Bg-1L for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 09:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fw65F-0001Li-O5 for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2018 09:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Sep 2018 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32537 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32537-submit@debbugs.gnu.org id=B32537.15358089785121 (code B ref 32537); Sat, 01 Sep 2018 13:37:01 +0000 Original-Received: (at 32537) by debbugs.gnu.org; 1 Sep 2018 13:36:18 +0000 Original-Received: from localhost ([127.0.0.1]:41288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fw64Y-0001KX-8M for submit@debbugs.gnu.org; Sat, 01 Sep 2018 09:36:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fw64W-0001KI-Ex for 32537@debbugs.gnu.org; Sat, 01 Sep 2018 09:36:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fw64M-0007zz-8i for 32537@debbugs.gnu.org; Sat, 01 Sep 2018 09:36:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw64M-0007zt-4k; Sat, 01 Sep 2018 09:36:06 -0400 Original-Received: from [176.228.60.248] (port=2793 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fw64L-0001QU-N0; Sat, 01 Sep 2018 09:36:06 -0400 In-reply-to: <877ek6wk9u.fsf@runbox.com> (message from Gemini Lasswell on Fri, 31 Aug 2018 09:52:45 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149939 Archived-At: > From: Gemini Lasswell > Cc: 32537@debbugs.gnu.org > Date: Fri, 31 Aug 2018 09:52:45 -0700 > > Eli Zaretskii writes: > > > But I still am not sure whether this is our villain. > > Does buffer position 146 sound correct wrt what you see in *scratch*, > > i.e. is it the position where point jumps? Also, please add to the > > breakpoint commands the command to display the current buffer: > > > > pp current_buffer->name_ > > > > Thanks. > > The case against our suspect keeps getting stronger. The following is > an excerpt from a gdb session where I added to the breakpoint commands > printing the current buffer name and single-line C-level backtraces of > the threads when the main thread is current. I also verified that the > position and distance that point jumped matched what I saw in *scratch*. > [...] > Thread 10 "find-file-nosel" hit Breakpoint 5, set_point_both (charpos=256, > bytepos=256) at intervals.c:1826 > 1826 { > $380 = (struct thread_state *) 0x38b3c80 > "*scratch*" > "tramp-sh-handle-file-attributes" (0xd97f36e8) > "apply" (0xd97f36e0) > "tramp-sh-file-name-handler" (0xd97f3ac0) > "apply" (0xd97f3ab8) > "tramp-file-name-handler" (0xd97f49f8) > "file-attributes" (0xd97f4b28) > "tramp-handle-file-symlink-p" (0xd97f4e58) > "apply" (0xd97f4e50) > "tramp-sh-file-name-handler" (0xd97f5230) > "apply" (0xd97f5228) > "tramp-file-name-handler" (0xd97f6168) > "file-symlink-p" (0xd97f6310) > "tramp-sh-handle-file-truename" (0xd97f7be8) > "apply" (0xd97f7be0) > "tramp-sh-file-name-handler" (0xd97f7fc0) > "apply" (0xd97f7fb8) > "tramp-file-name-handler" (0xd97f8f28) > "file-truename" (0xd97f9308) > "find-file-noselect" (0xd97f9870) > 0x38b0f10 PVEC_COMPILED > > Thread 10 (Thread 0x7fffd97fa700 (LWP 15844)): > #0 set_point_both (charpos=256, bytepos=256) at intervals.c:1826 > #1 0x0000000000631896 in set_point_from_marker (marker=...) at intervals.c:1771 > #2 0x00000000005b82d5 in Fgoto_char (position=..., position@entry=XIL(0x7fffc000f4f5)) at editfns.c:423 > #3 0x00000000005c2dc0 in save_excursion_restore (marker=XIL(0x7fffc000f4f5), window=...) at editfns.c:1023 > #4 0x00000000005c9309 in unbind_to (count=, value=..., value@entry=XIL(0)) at eval.c:3593 OK, but this sounds strange to me, since AFAICT Tramp switches to its own buffer when it sends a script to the remote and waits for it to return the results (which is most probably when the main thread gets control and lets you type). Michael, how come Tramp moves point in the *scratch* buffer in this scenario? Thanks.