From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: compiling guix is too slow? Date: Wed, 05 Jul 2017 10:35:38 +0300 Message-ID: <87inj7e3p1.fsf@gmail.com> References: <8760ffg1nv.fsf@163.com> <87lgobh0z0.fsf@gmail.com> <87a84mr2v1.fsf@gmail.com> <87d19gmxbq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeqc-0007ZS-DX for guix-devel@gnu.org; Wed, 05 Jul 2017 03:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSeqZ-00087u-59 for guix-devel@gnu.org; Wed, 05 Jul 2017 03:35:42 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:34122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSeqY-00087X-TP for guix-devel@gnu.org; Wed, 05 Jul 2017 03:35:39 -0400 Received: by mail-lf0-x230.google.com with SMTP id t72so19568681lff.1 for ; Wed, 05 Jul 2017 00:35:38 -0700 (PDT) In-Reply-To: <87d19gmxbq.fsf@gmail.com> (Alex Vong's message of "Tue, 04 Jul 2017 16:16:09 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Vong Cc: guix-guix-devel Alex Vong (2017-07-04 16:16 +0800) wrote: [...] > Is there an intermediate approch? Is is possible for Emacs to signal a > warning when the required features are not found, but still continue > loading the rest of the config? If you wish to have a message in *Messages* buffer, you can do it like this: (unless (require 'foo nil t) (message "Error during loading 'foo'!!!")) or like this: (with-demoted-errors "%S" (require 'foo)) If you want to have a warning in a pop-up buffer, then: (unless (require 'foo nil t) (display-warning 'oops "Error during loading 'foo'!!!")) [...] > Thanks for the suggestion! It turns out setting NIX_STATE_DIR to > "/usr/local/var/guix/" and making "~/.config/guix/latest" pointing to > "~/scm/guix/" completely resolves the problem. So now only a oneliner is > required: > > (require 'guix-autoloads '() t) Actually, why do you need this line at all? Such autoloads should be loaded automatically. Do you also require autoloads of other emacs packages? Do you use Emacs from Guix or from your operating system (not GuixSD)? > Do you think it is a bug that Emacs-Guix does not set > `guix-state-directory' correctly? I'm not sure what you mean. It sets this variable to "/var/guix" by default (or to NIX_STATE_DIR if you use it). If you use Guix with a non-standard state directory, how can Emacs-Guix define it? BTW, don't you have problems using "/usr/local/var" as the state directory? If you use guix from a git checkout, I think it is a standard practice to configure it with "--localstatedir=/var". It is even mentioned in the manual a couple of times: (info "(guix) Building from Git") (info "(guix) Requirements") -- Alex