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.bugs Subject: bug#56628: 28.1; dired + tramp/archive gives ibuffer fits Date: Sat, 23 Jul 2022 18:28:45 +0200 Message-ID: <87ilnniyiq.fsf@gmx.de> References: <87pmhw1c60.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37782"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56628@debbugs.gnu.org, Peter Mao To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 23 18:29:10 2022 Return-path: Envelope-to: geb-bug-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 1oFI06-0009f1-MU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jul 2022 18:29:10 +0200 Original-Received: from localhost ([::1]:41970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFI05-0003gN-Ge for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jul 2022 12:29:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFHzz-0003fb-1F for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 12:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFHzy-00047K-Nq for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 12:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFHzy-0001Ij-Hn for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 12:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jul 2022 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56628 X-GNU-PR-Package: emacs Original-Received: via spool by 56628-submit@debbugs.gnu.org id=B56628.16585937374981 (code B ref 56628); Sat, 23 Jul 2022 16:29:02 +0000 Original-Received: (at 56628) by debbugs.gnu.org; 23 Jul 2022 16:28:57 +0000 Original-Received: from localhost ([127.0.0.1]:46147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFHzt-0001IC-4t for submit@debbugs.gnu.org; Sat, 23 Jul 2022 12:28:57 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:49207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFHzr-0001Hw-0U for 56628@debbugs.gnu.org; Sat, 23 Jul 2022 12:28:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658593728; bh=1tSKR3DfylunVbLUkSC1YHsh8PH9rCO65NWKv1mNuj0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=cw5SEWKNN0iGgDF9bCdBqitE2zf8QR14OZRk3/2PwsVekYvsS/yjn4/11B/2w6IIz FmtfDQLjPmYD97c87VUpqqzdz6/T9bz+6nQ1Qs8/VTnRtOCJLB0FRAvp4oFL/8y7WN B//m/I26JrwzFkkrARAMpFskWpM3uFU4mgz3xgNU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.112.242]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N4hvR-1nXC4N0GZj-011hZp; Sat, 23 Jul 2022 18:28:48 +0200 In-Reply-To: <87pmhw1c60.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 23 Jul 2022 10:11:19 +0200") X-Provags-ID: V03:K1:enmYNHuhzWvch7K2cG/Shau3ULkSANBrh4DAewYKak2rWXQ+jUM QfPSO2offOpBLd12q2TT1fgl8oLmXn+3GBgJ3HMnt+icOYmw7ubZXgWmw0vn472JST7rBkN u4k6XNJ2qX03asjWn/7lZSLO7rG0E67IMpvBYj8xMyh3fls7OS5OKmUh7EK1zwdrfZkVP50 E09plPJnxayRa+zTu5kIQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:hZadLn03C28=:ABy8d+5+Ips6u2AJ6gFIKp dNm8If8lpzibHGSNjDctiOBj4UQxSmapTGkZEpSRQ6Siufctrow2AZKQ8wNQV8w74OHyBSrCi Vg7rsxftpXr7o+Mnzh+tW6po03r5xSrI8avKE+kTYgCi8Oq/EykIh/7fDZ8AO4WXibMwD9dnJ iuTzEQxmB3AkNgLsXrN/EkJqQKF2B7qKHAr3A4nWu2mCiDAleOMWRXxKC+/1iy7sg5RD8bRjU rv/h5QF4Qp1ekMFZcarlMXI7TRvR7Yrrgpl41Y720Jevb+4CH+j+gmwR84LjpmbffyLOkHyT6 BAyqEpCaWIbOkNMlSseIgxvEk/FewBpkYSnMpXL2q3VySdFz4BApjCTUnVi1+auwN0yH5fCVW WdYkIP9MZamFHGftw8KL7jNOlG5+LSywYEsuVqC0tEt0gSKoopZHFnqKXtUQWf0SgQiopMEWt VqoN+ENCBgPirykcLxA+KcBQxSOukEwlA3r9OE+wDBbff3nF7iC565PlIzHZAUYIhhP1oHYCk DZdtnfVd/2xOc60ZxJUjWY1PWhEZ4zDZZzk3JiYDl0KtzmYXGChBo+eIllclwlWWMSaJkRVbR n6jaUFw45Sg6GsKnZjzzwKQ0kN/QVgrBa3up1NEPXG81Ori65oEHyePny+y0sjlwUMDOF8y1L 1YToB0WIF0ifJKeWSCJzxFE+SNXz2KaWrNetwFnHMBvXStuTubIe5mvBMS/ihJ+73mmL/Xf5u ZSvzSHseYPTulRoA4SZ100WadlPTtkR5/SvFhYi0+qqb0zdPja6pib6joDFi1bQBn870pOF2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237769 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: Hi, > Peter Mao writes: > >> Ibuffer throws an error when an archive file (I've tried zip and tar.gz) >> is inserted into a Dired buffer (with `dired-maybe-insert-subdir'). >> Recipe for bug and relevant *Messages* below. >> >> Actions starting from `emacs -Q`: >> 1. open directory in Dired with an archive file (C-x d) >> 2. insert zip contents into Dired buffer with 'i' >> 3. open Ibuffer (M-x ibuffer) > > This leads to the following error: > > Debugger entered--Lisp error: (user-error "Method =E2=80=98archive=E2=80= =99 is not known.") > signal(user-error ("Method =E2=80=98archive=E2=80=99 is not known.")) > tramp-error((tramp-file-name "archive" nil nil "file%3A%2F%2F%2Fhome%2F= larsi%2FDownloads%2F4672362..." nil "" nil) user-error "Method `%s' is not = known." "archive") > apply(tramp-error (tramp-file-name "archive" nil nil "file%3A%2F%2F%2Fh= ome%2Flarsi%2FDownloads%2F4672362..." nil "" nil) user-error "Method `%s' i= s not known." "archive") > tramp-user-error((tramp-file-name "archive" nil nil "file%3A%2F%2F%2Fho= me%2Flarsi%2FDownloads%2F4672362..." nil "" nil) "Method `%s' is not known.= " "archive") > tramp-dissect-file-name("/archive:file%3A%2F%2F%2Fhome%2Flarsi%2FDownlo= ads%...") > tramp-file-name-handler(expand-file-name "" "/archive:file%3A%2F%2F%2Fh= ome%2Flarsi%2FDownloads%...") > file-name-case-insensitive-p("") > abbreviate-file-name("") > ibuffer--abbreviate-file-name("") > > The problem seems to stem from tramp throwing an error when calling > `abbreviate-file-name' in the *tramp/archive...* buffer. Perhaps > Michael knows why; added to the CCs. The default directory of the *tramp/archive...* buffer cannot be accessed outside the Tramp machinery. The fix is simple, patch appended. Would it be OK to push this to the emacs-28 branch? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 4b649edaab..33348ca21e 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -339,6 +339,13 @@ tramp-archive-file-name-handler (tramp-archive-run-real-handler #'file-directory-p (list archive))) (tramp-archive-run-real-handler operation args) + ;; The default directory of the Tramp connection buffer + ;; cannot be accessed. (Bug#56628) + ;; FIXME: It is superfluous to set it every single loop. + ;; But there is no place to set it when creating the buffer. + (with-current-buffer + (tramp-get-buffer (tramp-archive-dissect-file-name filename)) + (setq default-directory (file-name-as-directory archive))) ;; Now run the handler. (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) (tramp-gvfs-methods tramp-archive-all-gvfs-methods) --=-=-=--