From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Left Right Newsgroups: gmane.lisp.guile.devel Subject: [guile-emacs] Circular require problem Date: Sat, 20 Sep 2014 23:12:46 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1411243984 17365 80.91.229.3 (20 Sep 2014 20:13:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2014 20:13:04 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Sep 20 22:12:58 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVR1c-0005Eo-HD for guile-devel@m.gmane.org; Sat, 20 Sep 2014 22:12:56 +0200 Original-Received: from localhost ([::1]:35887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVR1b-0007AY-SU for guile-devel@m.gmane.org; Sat, 20 Sep 2014 16:12:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVR1Z-0007AS-98 for guile-devel@gnu.org; Sat, 20 Sep 2014 16:12:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVR1Y-00012I-Dd for guile-devel@gnu.org; Sat, 20 Sep 2014 16:12:53 -0400 Original-Received: from mail-qa0-x233.google.com ([2607:f8b0:400d:c00::233]:48915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVR1Y-00011p-9h for guile-devel@gnu.org; Sat, 20 Sep 2014 16:12:52 -0400 Original-Received: by mail-qa0-f51.google.com with SMTP id j7so997660qaq.38 for ; Sat, 20 Sep 2014 13:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=z9l5akkVz1UHRamR4UDFIV+gd2pAzUDGTY2TzySy+aY=; b=LftWh6m8Jwsu0P0XiNCsHPuHwPEizC6LLFugIiJEWKr8D1zH5FymrG4+rSegVjcDkN 6PR/YjwksbrhMUozAHwnsAwpNaPRC7YdhLa+V5v+FpzrMVTq3jruZjnawWSX7OopFiXa S4k8H/QWchJBA5uu2vptuBbmTQ+8C6Q6evWHjvXS4byr1pYP0LdJo4lytxVXKOiNmWzg FKm7vriAUMYRmziUQiDQKUEQM0Bpw2wsGVioG3k1DAc8qSLbrlc1aMYUC29azEkXwQtn 8QdGuKHnLCfzK2a4ycj2bWu2RT3mVKMpkjVNDiK/H5DotI5O9EsRwioKSO5+7hEw+2nz UTqg== X-Received: by 10.229.229.135 with SMTP id ji7mr18941261qcb.15.1411243966836; Sat, 20 Sep 2014 13:12:46 -0700 (PDT) Original-Received: by 10.140.27.204 with HTTP; Sat, 20 Sep 2014 13:12:46 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::233 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17505 Archived-At: Hello, I've asked at #guile IRC channel and was told this is the right place to report these. So, I've built Guile-2.2 and Guile-Emacs. Vanilla Emacs didn't start at first due to: (provide 'calendar) (require 'cal-menu) lines in cal-menu.el. This is because calendar requires cal-menu and cal-menu requires calendar. It seems like the strategy in these situation with Emacs Lisp is to put a "fake" provide statement in the beginning of the file which provides the library, knowing that there's the second "real" provide statement in the end of the file. I've witnessed this same problem with couple more libraries, ERC being one of them. The first thing I tried was: (unless (featurep 'cal-menu) (require 'cal-menu)) Which, in some cases magically solved the problem, but not in other cases. But I don't think it is useful to mimic Emacs behavior wrt circular require. I think it would be better to make circular require possible by remembering what libraries had already been required. ---- I have more problems to report. I've tried loading some popular Emacs packages, such as Org, SLIME, ESS and CEDET, and few others, but none of that worked. Only relatively large library that loaded was Pymacs, but it affected the rest of the code somehow so that nothing else would compile any more. There was another problem with eval-buffer, where (add-to-list 'load-path ...) with the following (require ...) sexp wouldn't work, but if evaluated sexp after sexp they magically worked. I have saved backtrace and crash messages, and I could probably produce more / more specific error messages if I knew better how to debug. The regular backtrace buffer doesn't seem to be particularly useful (too much technical info, which is difficult to trace back to the source of the problem). Best, Oleg