From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#32537: 26.1.50; Tramp: Cursor jumps when typing during asynchronous find-file Date: Tue, 28 Aug 2018 12:48:28 -0700 Message-ID: <87r2ii1ddf.fsf@runbox.com> References: <875zzxowlw.fsf@runbox.com> <83mut9568l.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535486843 25084 195.159.176.226 (28 Aug 2018 20:07:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 20:07:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: 32537@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 28 22:07:18 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 1fukGk-0006R6-Js for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 22:07:18 +0200 Original-Received: from localhost ([::1]:39843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fukIq-0004jN-SE for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 16:09:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fukF1-0004Ly-Vt for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 16:05:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fujz5-0008IW-CJ for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 15:49:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59158) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fujz4-0008I2-2q for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 15:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fujz3-0000U8-Se for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 15:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Aug 2018 19:49: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.15354857211836 (code B ref 32537); Tue, 28 Aug 2018 19:49:01 +0000 Original-Received: (at 32537) by debbugs.gnu.org; 28 Aug 2018 19:48:41 +0000 Original-Received: from localhost ([127.0.0.1]:35943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fujyj-0000TY-2C for submit@debbugs.gnu.org; Tue, 28 Aug 2018 15:48:41 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:55890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fujyg-0000TP-Oz for 32537@debbugs.gnu.org; Tue, 28 Aug 2018 15:48:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=u+K38yD/G9BRaFmaJ7h2F4ABoU4qybr+9Bf3ucYio98=; b=IkmIq9LB0xPDo9hbn0jcvhhNmc mZ/Migp6w206TpMDlIzOSd0TGmIk9SBM2AgCruTpWJsxWUkfUBon48tUrg3TLqRx9ZZdraDc9JffO RwTOg706cRmr4bqmmBsA9PwvELyDIbEC5h96o5me712QZmMB+y4kUvNIMBThkooGc1xB8DKeb5X+o ssv8sNU3s+8i3w2yUyeyOgkntc24+uEDFDczSE1BH8M6iUjz7JmsmN/vaDIVJVHb3DgtgT7pQ8BDX RvVw8y4bzUGRUUKEZhy65oPQe3bhKED4tC/1CnyQ937e6bcj2YwCLgrTD/DBWte0XO7BVVlzDOXTj IDFrr/1A==; Original-Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fujyf-0004mV-KC; Tue, 28 Aug 2018 21:48:37 +0200 Original-Received: by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1fujyZ-0002hQ-NZ; Tue, 28 Aug 2018 21:48:32 +0200 In-Reply-To: <83mut9568l.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Aug 2018 21:32:10 +0300") 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:149807 Archived-At: Eli Zaretskii 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*.) 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. 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) [Switching to Thread 0x7f1cad3e1700 (LWP 9151)] Thread 5 "emacs" hit Breakpoint 4, set_point_both (charpos=146, bytepos=146) at intervals.c:1826 1826 { "tramp-sh-handle-file-attributes" (0xad3db0b8) "apply" (0xad3db1f0) "tramp-sh-file-name-handler" (0xad3db498) "apply" (0xad3db648) "tramp-file-name-handler" (0xad3dc688) "file-attributes" (0xad3dc7e0) "tramp-check-cached-permissions" (0xad3dcbb0) "tramp-sh-handle-file-readable-p" (0xad3dcff8) "apply" (0xad3dcff0) "tramp-sh-file-name-handler" (0xad3dd420) "apply" (0xad3dd418) "tramp-file-name-handler" (0xad3de458) "file-readable-p" (0xad3de578) "tramp-handle-file-accessible-directory-p" (0xad3de8f8) "apply" (0xad3de8f0) "tramp-sh-file-name-handler" (0xad3ded20) "apply" (0xad3ded18) "tramp-file-name-handler" (0xad3dfd58) "file-accessible-directory-p" (0xad3dfec8) "file-expand-wildcards" (0xad3e0218) "find-file-noselect" (0xad3e07e0) 0x4867b10 PVEC_COMPILED Thread 5 "emacs" hit Breakpoint 5, temp_set_point_both ( buffer=0xdb5800 , charpos=charpos@entry=146, bytepos=bytepos@entry=146) at intervals.c:1729 1729 { "tramp-sh-handle-file-attributes" (0xad3db0b8) "apply" (0xad3db1f0) "tramp-sh-file-name-handler" (0xad3db498) "apply" (0xad3db648) "tramp-file-name-handler" (0xad3dc688) "file-attributes" (0xad3dc7e0) "tramp-check-cached-permissions" (0xad3dcbb0) "tramp-sh-handle-file-readable-p" (0xad3dcff8) "apply" (0xad3dcff0) "tramp-sh-file-name-handler" (0xad3dd420) "apply" (0xad3dd418) "tramp-file-name-handler" (0xad3de458) "file-readable-p" (0xad3de578) "tramp-handle-file-accessible-directory-p" (0xad3de8f8) "apply" (0xad3de8f0) "tramp-sh-file-name-handler" (0xad3ded20) "apply" (0xad3ded18) "tramp-file-name-handler" (0xad3dfd58) "file-accessible-directory-p" (0xad3dfec8) "file-expand-wildcards" (0xad3e0218) "find-file-noselect" (0xad3e07e0) 0x4867b10 PVEC_COMPILED [Switching to Thread 0x7f1cc590db40 (LWP 8465)] Thread 1 "find-file /scp:" hit Breakpoint 4, set_point_both (charpos=147, bytepos=147) 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)