From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Error with tramp-archive-autoload-file-name-handler Date: Wed, 06 Apr 2022 20:13:03 +0200 Message-ID: <87y20igjww.fsf@gmx.de> References: <87bkxtzjf1.fsf@web.de> <871qyphzv1.fsf@gmx.de> <87r16o4jxo.fsf@web.de> <871qyouuls.fsf@web.de> <87y20vg5gu.fsf@gmx.de> <87fsn2q0mk.fsf@web.de> <87o81qwqwi.fsf@sperrhaken.name> <87h77ifk6w.fsf@gmx.de> <87v8vx7gsz.fsf@web.de> <87wngddxm0.fsf@gmx.de> <87pmm11sdw.fsf@web.de> <877d873dak.fsf@sperrhaken.name> <87v8vre7y6.fsf@gmx.de> <87lewiy4t5.fsf@sperrhaken.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="715"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Felix Dietrich Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 06 20:13:56 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncAAF-000AVX-Kl for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Apr 2022 20:13:55 +0200 Original-Received: from localhost ([::1]:43764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncAAE-00011B-HM for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Apr 2022 14:13:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncA9U-0000x8-PC for help-gnu-emacs@gnu.org; Wed, 06 Apr 2022 14:13:08 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:35209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncA9S-0002qd-Bh for help-gnu-emacs@gnu.org; Wed, 06 Apr 2022 14:13:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649268784; bh=+oLiGbTfnxz8x6AfoEtK3uVN4hbqOeWHYSRJdu/aHYY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=FVGgl/uEOAMSdWv0ndLJeAhazUSMh5ywqdXBHi+jfp9F+AJFhbHOx5G8mr4l+79HR r6FXEDzNxvvAsTlL79FxOI1G9qz3msbTQVCQRUvJH5cXoAfKkFD1Mfg/54nSNNflCN z1/0SBpPV5Xnsx69CkWzMYSeT6LHWhEWqBZ2ddYc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.118.138]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmUHj-1oJmcr1N1F-00iRs7; Wed, 06 Apr 2022 20:13:04 +0200 In-Reply-To: <87lewiy4t5.fsf@sperrhaken.name> (Felix Dietrich's message of "Wed, 06 Apr 2022 10:49:42 +0200") X-Provags-ID: V03:K1:T+pDSUQFLMuY4COikgTubr2XhuI/XJigXUsgJsmo17S5YIaQGGN YbxkNZPIzvE1eIMH2EtTSo9XAVQEtGZMmgEOq1brW20ij2spYm5fgLdlThVvSWyLxpoijSc db2hHp1VBNhKLljmzDGOMvmqL5P+Gfhu88UbqSqN4JykeOGT0+cREZdI/10ki4WDYr8DYVD JmXAjyjObbmdAEcIaeb1Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:W4F6R9yRxD8=:zVEfPF18uG39hwYGWh6fQE BWCmlYiWA4pttJ3ZfllYD9Kst5j4a4N9jR2A/bOMqVCnxl70BMgy+d+wFf34KdArYrzCytni6 MFFq/dxex8xF0WDslKp9CnhKhhbrI1r1n1XJv+e+ZKoibc1BNVrnVFrru54qem+s6VHMFSKhr GViuIHykA9AsQbIN+mt8mqMOjycEmAL3zUMQ8lJb5SvmgfHMIjtx8wrms/4rPc9V1+Ge/oTN2 qj9HXq09xxcy03OEplLZkF/T8r1rAxZuocLSxHRWldx1iufqh042UN/UmQJWYp5OY2JhQHfI0 4ZlNiTAXy86uB2Dv4hZMTsPvtLYA/y867SpzwyfY3sEOceJgnbb2mH4k0NkDjEl060Bqf9xLF ic6csU4q2OHdzW8BqbaxlWPvTMMVGUrZQLD/CF6OzHseIepj/Et4eYpqDpibxdva5sAMDtJiK m5Jojd338GqEzJXvdlae72lq6EQxYIuw3LWY4gLcw1j+31DCHaot1z+Op5qQTJP7XDuf6Bi93 ZCMCTd3foG7XgFExQZ8egWAN6+jn/mem6bCaMEDnNGo1m0eZCX43oUWy+eOUyNImFz0Iw7Tmn 6SS0kzF29nqGAZeBa2x0lJc13nXBckMXEFN6fgmF0kXvgciGYohabKF9X9kd45q96oig+KtC0 24MwXgw36+jXwOfmZMt4faLal+lhbFJIrucIeQD5WiSCk4hwUMrxSdtTcpVGRbccWeXZ9x/o+ 1cBsqHCejUUI2rOotZPHdn7HwJ8WIGOt6zWjNZ7fSjfN+tBBJYt55Cas35TLZCIu1bBLQPmL Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136883 Archived-At: Felix Dietrich writes: Hi Felix, >>>> Anyway, when `tramp-archive-autoload-file-name-handler' is present aft= er >>>> tramp-archive-enabled has become nil, it is used and called but doesn't >>>> handle the request (i.e. returns nil). AFAIU, that was what I have be= en >>>> seeing. >>> >>> Could the tramp error handler provide a more helpful error message > > Oh, I meant =E2=80=9Ctramp file handler=E2=80=9D here instead of =E2=80= =9Ctramp error handler=E2=80=9D =E2=80=93 > although I had made wrong assumptions; therefore, this is irrelevant. tramp-archive-autoload-file-name-handler is a function with a very short life time. It is supposed to be called only once, and it shall disappear afterwards. So I don't believe it is worth to be extended too much with error handling. >> Since this bug is fixed now, I don't believe it is worthful to invest >> more code there. > > I am *not* convinced that the reason for this bug has been correctly > identified. First of all, many thanks you've analyzed this in deep detail! Not so many people do this with Tramp. > At a quick glance, this commit changed the implementation of > =E2=80=98tramp-archive-autload-file-name-handler=E2=80=99 and might be mi= ssing an > else-form. This causes the autoload handler to return nil when > =E2=80=98tramp-archive-enabled=E2=80=99 is nil, and, at a slightly longer= glance, for > some file name handlers this is wrong and an error. The attached patch > changes =E2=80=98tramp-archive-autoload-file-name-handler=E2=80=99 to alw= ays call > =E2=80=98tramp-autoload-file-name-handler=E2=80=99, setting =E2=80=98tram= p-archive-autoload=E2=80=99 > appropriately. Yes, this works, thanks. > This may cause a regression, though, of bug #48476 [3] > (=E2=80=9CEmacs hangs with 100% cpu if started within a current directory= that > has a name ending with ".tar"=E2=80=9D). I have not tested that or spent= time > on understanding that bug. Maybe you still remember enough details of > the bug to judge this. I've shortly tested the recipe given in that bug, and everything seems to be OK with your patch. I will apply your patch in your name to the emacs-28 branch, after I have merged it with other pending Tramp patches. Likely tomorrow. Perhaps you could provide a ChangeLog-style commit message? > Now, why is it a problem to add > =E2=80=98tramp-archive-autoload-file-name-handler=E2=80=99 to =E2=80=98fi= le-name-handler-alist=E2=80=99 > if =E2=80=98tramp-archive-file-name-handler=E2=80=99 is already there? W= hy does the > following snipped still fail even though > =E2=80=98tramp-archive-file-name-handler=E2=80=99 comes first in the hand= ler alist? With my previous patch, this shouldn't happen anymore. Both tramp-archive-autoload-file-name-handler and tramp-archive-file-name-handler shouldn't coexist in file-name-handler-alist. Do you still see this after your patch has been applied? Best regards, Michael.