From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: TRAMP VC optimization: also breaks process filters -_- Date: Tue, 07 May 2019 17:51:37 +0200 Message-ID: <875zqm2rg6.fsf@gmx.de> References: <87lfzi1e4l.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="270088"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Daniel Pittman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 07 17:53:58 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO2Pl-00189f-I9 for ged-emacs-devel@m.gmane.org; Tue, 07 May 2019 17:53:57 +0200 Original-Received: from localhost ([127.0.0.1]:49003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO2Pk-00087W-FL for ged-emacs-devel@m.gmane.org; Tue, 07 May 2019 11:53:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO2Ng-0006R9-IC for emacs-devel@gnu.org; Tue, 07 May 2019 11:51:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO2Nf-0002xp-JU for emacs-devel@gnu.org; Tue, 07 May 2019 11:51:48 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:42859) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO2Nf-0002xX-9A for emacs-devel@gnu.org; Tue, 07 May 2019 11:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557244299; bh=x53W5sm7pT1/RJ8Sf9KVVpoEQX3Y1lrl1sJbw6SDPrk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=lwBcGaA33zB+TriAQCSXVJp5HG9Epify1aboLnZKFrOVnwQ8TKN5s5t9mXGi/vzcj AcaPx7/qm4yGQt4EtMhNrSEUNikIJ92avQFMIi8ZVId2tVB5oE7tmxxcX52C0CSCSx OE20T1+GYvo+8SSRFOWKCnnZ6qSoj4p1FTBTxtWc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([213.220.159.171]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N5mGH-1ge1PU12CJ-017EYk; Tue, 07 May 2019 17:51:39 +0200 X-Provags-ID: V03:K1:8xpRBaQ2T85HnjqLB+ejNtSDlchk2TWfnEh7fETox21j4sYhzwy fIk5Q1iDADG8QoaqRdfcbdvosq9uXl8XVdzh3EMM87MOFVm+ZVu01WRfdg3VArHPaWjqQgh JnsPvfEAa4M7pmkR/35B1C4AbfwhuQomX1aJdhafEnU4IAiNXoyp4AI1vywKt5oYiESQNDp /ZZxu/er4A06cIMGtCVRQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:c2XstjNNhZI=:VGb/d4sB/Fxx/cgbfutBXt xn2rZhoB4E+9YufM/nAxmtQm75FOP3luQTY+o80c7ZskwA/O1tAxtBnw3C6Mcbe11YhNWlZSc aiMMAreMz08d6JkyV/xu+5mDT4ji569/S5hCiWWHt8XIgy5QvNoX84XlukMNonJt+o+ax72nA 4RgjyltiDTloqFsY/YprfoP2T+jygWbJDx6UmmW/eD7+6olisKF0Q3UZLP2Thgil+ndvWwhTf eJXzngJ4r52q83hHtdh0B1f0OFdtthsp03v6y2+s9DSXWavCx2l9EFV9mpT04Swo4jSdULLYc x8liaP6vpjsyhg9DisRZRT/ALG1WmqNADoqa7M8a/YiQ5RU75HmWQZu/vz8IGAzQaBQFCuhyU nXd0gr6/XN/bkYXeeEXyyVKchsePP4DFHVK4IFQ+4qIC0ISc9hcbAKD3CgXwUh552xRPLcTVN El/Spswki7FPtckXsh/PCDH3Wn2hbq4IOPDY3sMErK+Z9KvcijGiWRPNo4jTYoz4hO6wV5IxG i9fldxlfFj/eNAF4WOaqaY+Wpq8qQu0cEMfe6YtAPPt59fyYm8exk2CLxsFagYENP22/KOjfi GhUQHM6UtdrVZq5rVh0mkBpgm3xRgFV++k+hpWtz3xdLNxa7YBlhcEsvCTYm2Nr3CFoPDLW6r 4xeY+vSX0INMbvsa2+aoCVMz+YElup+5LFLKKYCBGocax6+S99m9gequmG5PH9QOW+8R6JecP EXEGykVUK1UUbk0CWbUtI7MlX/hQmkSbMpoUbxeIJ8wq70iLvt13Yggrf3Xw/EONCr2QKldv X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236238 Archived-At: Stefan Monnier writes: >> Daniel's reports have been covered always >> vc-registered. And indeed, the related `tramp-vc-file-name-handler' >> seems to expect always a Tramp file name, which is not true for filters >> and sentinels which run for non-Tramp processes. > > I don't understand what filers and sentinels have to do with it. The last Tramp action as expected was process-send-string (called from tramp-send-string). According to the Elisp manual, filters or sentinels from *other* processes can be called during process-send-string: --8<---------------cut here---------------start------------->8--- Sometimes the system is unable to accept input for that process, because the input buffer is full. When this happens, the send functions wait a short while, accepting output from subprocesses, and then try again. This gives the subprocess a chance to read more of its pending input and make space in the buffer. It also allows filters, sentinels and timers to run=E2=80=94so take account of that in writing your code. --8<---------------cut here---------------end--------------->8--- This happens here, as Daniel has shown. The problem is, that expand-file-name has been forwarded to tramp-vc-file-name-handler due to the remote DIR argument. This isn't relevant, because FILENAME is absolute, but in the next line FILENAME is tried to be dissected without any further check. This I have changed. In the native tramp-file-name-handler, this situation can also happen, but it is handled already. So we have only to fix tramp-vc-file-name-handle= r. > Stefan Best regards, Michael.