From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Yiyi Hu" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#940: Is there a way to quit loading of ~/.emacs please? Date: Tue, 9 Sep 2008 14:50:15 +0800 Message-ID: Reply-To: Yiyi Hu , 940@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220967810 15029 80.91.229.12 (9 Sep 2008 13:43:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2008 13:43:30 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 15:44:26 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kd3Vv-0003Vq-0G for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2008 15:44:15 +0200 Original-Received: from localhost ([127.0.0.1]:55208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kd3Uu-0007oT-Ud for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2008 09:43:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcxK4-0007gq-6C for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 03:07:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcxK3-0007gC-Q7 for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 03:07:35 -0400 Original-Received: from [199.232.76.173] (port=33421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcxK3-0007fn-Cl for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 03:07:35 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:44048) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcxK2-0005It-PP for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 03:07:34 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcxK2-0006Cf-3l for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2008 03:07:34 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8977WUJ019516; Tue, 9 Sep 2008 00:07:33 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m89703ek015631; Tue, 9 Sep 2008 00:00:03 -0700 X-Loop: don@donarmstrong.com Resent-From: "Yiyi Hu" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 09 Sep 2008 07:00:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 940 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122094302813410 (code B ref -1); Tue, 09 Sep 2008 07:00:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 9 Sep 2008 06:50:28 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m896oOgp013308 for ; Mon, 8 Sep 2008 23:50:25 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:56391 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kcx1i-0006gV-6l for emacs-pretest-bug@gnu.org; Tue, 09 Sep 2008 02:48:38 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kcx3N-0003jQ-4s for emacs-pretest-bug@gnu.org; Tue, 09 Sep 2008 02:50:23 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:42339) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kcx3M-0003jE-Kk for emacs-pretest-bug@gnu.org; Tue, 09 Sep 2008 02:50:20 -0400 Original-Received: from mail-gx0-f12.google.com ([209.85.217.12]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kcx3K-0003NP-Hh for emacs-pretest-bug@gnu.org; Tue, 09 Sep 2008 02:50:18 -0400 Original-Received: by gxk5 with SMTP id 5so9428226gxk.18 for ; Mon, 08 Sep 2008 23:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=cNFjcHpV6CkpsPJhdrnfdXOS8+ELfEK7DM8y9c0sRac=; b=LsReYc2cbEE6O31d5NFv0EDE8ZZV4xSqH/7oGRwWZjnrsw++jOI6o6VbWBmMxC9aqH bkjQoirleAs+CD2NWxYRqbnsYkhOpaFsYC+LOqoOvssXSoQ7aA5gFq+L1lw5Drm1hxPf 6P4K3kJl/EisZA6tw2q8dT6Lkr2FIc6rJijFo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=VAMrdln79kL2tFIZAP98g9ozsMeQg3F0qAjd3vzp0fV2MY3ljkRUVRI+aGRV07Pru+ izjqGxuKZAbYu1dXdB1LTB37amMwkKJ+qINVMS5wNzpQhs3h3bBsIs85qKmyOMhKuG/n ULIK5ygNGi4T18HIGge4FXOclMBsCCztIdolQ= Original-Received: by 10.150.12.3 with SMTP id 3mr22892773ybl.14.1220943015854; Mon, 08 Sep 2008 23:50:15 -0700 (PDT) Original-Received: by 10.150.98.15 with HTTP; Mon, 8 Sep 2008 23:50:15 -0700 (PDT) Content-Disposition: inline X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Tue, 09 Sep 2008 03:07:35 -0400 X-Mailman-Approved-At: Tue, 09 Sep 2008 09:43:09 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20384 gmane.emacs.pretest.bugs:23023 Archived-At: Hi, all. For now, I got a problem on how to do this. Here is the sample ~/.emacs (defun byte-compile-file-if-newer (src) (let ((result (concat src ".elc"))) (when (file-newer-than-file-p src result) (byte-compile-file src) (load-file result)))) (byte-compile-file-if-newer "~/.emacs") (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(auto-compression-mode t) '(column-number-mode t) '(cperl-indent-level 4) '(delete-selection-mode t) '(display-battery-mode t) '(display-time-24hr-format t) '(display-time-day-and-date t) '(display-time-mode t) '(encoded-kbd-mode t) '(gnus-nntp-server "news.readfreenews.net") '(indent-tabs-mode nil) '(inferior-lisp-program "sbcl") '(inhibit-eol-conversion t) '(inhibit-startup-screen t) '(initial-scratch-message nil) '(menu-bar-mode nil) '(mouse-avoidance-mode (quote exile) nil (avoid))) Is there a way to quit the loading after we compile the ~/.emacs and load the ~/.emacs.elc file? Ok, please don't bother talking about It's worthy or not for compiling ~/.emacs, I am talking a feature which *should* be supported by elisp IMHO. Yes, we can have a big condition around the rest of the ~/.emacs, But that's not good practise. And If I do this, It will also confuse things in M-x customize-group. It's a bit like 'if' statements in emacs, 'if' is enough, but 'when' and 'cond' statements is still there for supporting programming more practically. Also, I've ever done considering split ~/.emacs. To me, It's not a good journey. There will be other problem when manage multiple start up file. I've tried add (return) to ~/.emacs, But there will be error as It's not in a defun. So, other possibility to quit the load of lib? Or enhance elisp by adding a new 'keyword' or 'statement' to do this kind of job. I also tried with (signal 'error nil) and (keyboard-quit), This worked when you invoke emacs without any args. But when there is no ~/.emacs.elc file, and you invoke emacs with args, The passing args won't be process by emacs. I am using the newest emacs-cvs BTW. Thanks.