From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Possible bug: Emacs hangs on (require 'org) Date: Tue, 22 Nov 2016 19:30:21 -0800 Message-ID: <877f7ux48i.fsf@ericabrahamsen.net> References: <87oa16x6lw.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9OGa-0006NX-Oh for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 22:30:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9OGW-0003rj-JC for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 22:30:36 -0500 Received: from [195.159.176.226] (port=36102 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9OGV-0003qG-U8 for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 22:30:32 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1c9OGP-0002Mj-RM for emacs-orgmode@gnu.org; Wed, 23 Nov 2016 04:30:25 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Luke writes: > On 23/11/16 10:39, Eric Abrahamsen wrote: >> Luke writes: [...] >>> I tried creating a minimal-org.el file with the following contents: >>> >>> ;; activate debugging >>> (setq debug-on-error t >>> debug-on-signal nil >>> debug-on-quit nil) >>> >>> ;; add latest org-mode to load path >>> (add-to-list 'load-path (expand-file-name "~/elisp/org-mode/lisp")) >>> (add-to-list 'load-path (expand-file-name >>> "~/elisp/org-mode/contrib/lisp" t)) >>> >>> And then running: >>> >>> $ emacs -Q -l minimal-org.el >>> >>> ...but I still get the same result (Emacs hangs when I run `M-x >>> (require 'org)`). >>> >>> Can anyone help tell me what's wrong, or suggest how I try and track >>> down the problem? >> >> You're setting debug-on-quit to nil, but it's likely that setting it to >> t is exactly what you need. Toggle it to t, eval (require 'org), then >> while it's hung hit C-g. You should get a backtrace showing you what >> Emacs was actually doing when you quit. >> >> Eric >> >> >> > > Thanks to Eric for the debugging tip. Below is the backtrace that was > produced. It looks like tramp is trying to make some connection to the > host-name "host.does.not.exist" (which will obviously fail). > > This makes sense, because when I disable networking then Emacs starts > immediately and doesn't hang. I'm not sure how to fix this though. I don't have a copy of Emacs 24 handy (and I recommend you upgrade to 25), but as a band-aid you should be able to kill the check by setting the `tramp-use-ssh-controlmaster-options' option to nil. That ought to prevent tramp from testing the connection at all (at least, I think it will). In 25 it looks like "host.does.not.exist" has been replaced with a bogus IP address, meaning that you won't time out on a DNS lookup, which is likely what's hanging for you. As for the real root of the problem -- why loading org results in tramp doing this check -- I unfortunately can't tell you! The real "fix", I think, would be upgrading to Emacs 25. Eric