unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Robert Pluim <rpluim@gmail.com>
Cc: 988581-forwarded@bugs.debian.org,
	Thomas Lundqvist <tlundqvist@acm.org>,
	988581@bugs.debian.org, Lars Ingebrigtsen <larsi@gnus.org>,
	48476@debbugs.gnu.org, Rob Browning <rlb@defaultvalue.org>
Subject: bug#48476: Bug#988581: emacs-gtk: Emacs hangs with 100% cpu if started within a current directory that has a name ending with ".tar"
Date: Wed, 19 May 2021 16:22:10 +0200	[thread overview]
Message-ID: <87sg2iajn1.fsf@gmx.de> (raw)
In-Reply-To: <87wnrx9wl6.fsf@gmx.de> (Michael Albinus's message of "Mon, 17 May 2021 18:03:17 +0200")

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

Michael Albinus <michael.albinus@gmx.de> writes:

Hi,

>> Michael, this is emacs signalling an error for a recursive load,
>> apparently forever.
>
> Ahh, thanks. This gives me some ideas for check.

The appended patch should fix it. It is towards the emacs-27
branch. Although there won't be a Tramp 27.3 in the future, Debian (and
other distributions) might patch its distributed Emacs 27.2.

>> Robert

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1321 bytes --]

diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index e690687413..a8a1851abb 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -343,8 +343,12 @@ tramp-archive-file-name-handler
 	      (tramp-archive-run-real-handler operation args)))))))

 ;;;###autoload
-(defalias
-  'tramp-archive-autoload-file-name-handler #'tramp-autoload-file-name-handler)
+(progn (defun tramp-archive-autoload-file-name-handler (operation &rest args)
+  "Load Tramp archive file name handler, and perform OPERATION."
+  (if tramp-archive-enabled
+      (let ((tramp-archive-autoload t))
+        tramp-archive-autoload ; Silence byte compiler.
+        (apply #'tramp-autoload-file-name-handler operation args)))))

 ;;;###autoload
 (progn (defun tramp-register-archive-file-name-handler ()
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 570294e8b9..a81dbaaf69 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2444,6 +2444,8 @@ tramp-completion-file-name-handler
   (tramp-unload-file-name-handlers)
   (if tramp-mode
       (let ((default-directory temporary-file-directory))
+        (if (bound-and-true-p tramp-archive-autoload)
+	    (load "tramp-archive" 'noerror 'nomessage))
 	(load "tramp" 'noerror 'nomessage)))
   (apply operation args)))


  parent reply	other threads:[~2021-05-19 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <162115594747.5027.12325478473634405780.reportbug@ant64>
2021-05-16 22:49 ` bug#48476: Bug#988581: emacs-gtk: Emacs hangs with 100% cpu if started within a current directory that has a name ending with ".tar" Rob Browning
2021-05-17 14:42   ` Lars Ingebrigtsen
2021-05-17 15:24     ` Robert Pluim
2021-05-17 16:03       ` Michael Albinus
     [not found]       ` <87wnrx9wl6.fsf@gmx.de>
2021-05-19 14:22         ` Michael Albinus [this message]
2021-05-20  7:44           ` Robert Pluim
2021-05-20  9:24             ` Michael Albinus
2021-05-20 12:53               ` Robert Pluim
2021-05-20 13:05                 ` Michael Albinus
2021-05-20 13:33                   ` Robert Pluim
2021-05-23 11:42                   ` Michael Albinus
2021-05-25  8:11                     ` Robert Pluim
2021-05-25 11:04                       ` Michael Albinus
2021-05-17 15:51     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sg2iajn1.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=48476@debbugs.gnu.org \
    --cc=988581-forwarded@bugs.debian.org \
    --cc=988581@bugs.debian.org \
    --cc=larsi@gnus.org \
    --cc=rlb@defaultvalue.org \
    --cc=rpluim@gmail.com \
    --cc=tlundqvist@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).