From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: emacs-30 f050b9c5033: Fix Tramp IPv6 handling in tests Date: Tue, 06 Aug 2024 08:11:33 +0530 Message-ID: References: <172163502862.25672.12565431460737995012@vcs2.savannah.gnu.org> <20240722075709.1C23CC41F06@vcs2.savannah.gnu.org> <87mslqoql8.fsf@gmx.de> <87cymmomol.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5598"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Cancel-Lock: sha1:kRX/e9xXw24OjtITdC1ofrmoyVw= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 06 13:00:21 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sbHvQ-0001D3-GJ for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Aug 2024 13:00:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbHv9-0008Eb-Cz; Tue, 06 Aug 2024 07:00:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbA98-0000No-TP for emacs-devel@gnu.org; Mon, 05 Aug 2024 22:41:58 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbA97-0000oH-6P for emacs-devel@gnu.org; Mon, 05 Aug 2024 22:41:58 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sbA93-000ACa-Re for emacs-devel@gnu.org; Tue, 06 Aug 2024 04:41:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 06 Aug 2024 06:59:51 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322430 Archived-At: * Michael Albinus <87cymmomol.fsf@gmx.de> : Wrote on Mon, 05 Aug 2024 20:21:30 +0200: > Michael Albinus writes: >>>> + :result ,(substring-no-properties >>>> + (file-remote-p "/sudo::/tmp/foo" 'user))) >>> >>> just a caveat that substring-no-properties can end up being called on >>> nil here. I agree it is unlikely, but I managed to trigger it with the >>> `swiper' package, where an unconditional (require 'tramp) in the midst >>> of code kept failing. >> >> In that case (file-remote-p returns nil) the whole block doesn't make >> sense. How did they manage to manipulate Tramp this way? Setting >> tramp-mode to nil? Manipulating file-name-handler-alist? It wasn't them, it was me, or I suspect it was some async (delayed loading/reloading) glitch but I'm not sure how it happened. AFAIK i was not using the hammer on file-name-handler-alist [1], all I did was set tramp-completion-file-name-handler-alist to nil. > I've added a sanity check. Pushed to the emacs-30 branch. Thanks [1] a decade ago I used to disable tramp with this hammer, but it too was ineffective when tramp got (somehow) reloaded so I abandoned it. I'm pretty sure I had not manipulated this explicitly to trigger this crash. ``` (setq file-name-handler-alist (loop for x in file-name-handler-alist for (pattern . symbol) = x for name = (symbol-name symbol) unless (string-match "tramp" name) collect x)) ```