From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Emacs Modular Configuration: the preferable way. Date: Mon, 21 Jun 2021 04:56:04 +0200 Message-ID: <87pmwgdiyj.fsf@zoho.eu> References: Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:gj5AYYaxRtAdnjOVA7n4GnEy58w= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 21 04:57:08 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvA7Y-0004Cp-BN for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Jun 2021 04:57:08 +0200 Original-Received: from localhost ([::1]:47674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvA7W-0002zi-I0 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Jun 2021 22:57:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvA6h-0002zZ-UI for help-gnu-emacs@gnu.org; Sun, 20 Jun 2021 22:56:15 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:44512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvA6g-0001Cz-0I for help-gnu-emacs@gnu.org; Sun, 20 Jun 2021 22:56:15 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lvA6d-00037X-OD for help-gnu-emacs@gnu.org; Mon, 21 Jun 2021 04:56:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131128 Archived-At: Hongyi Zhao wrote: > I noticed the following instructions/tools for Emacs modular > configuration: > > https://www.emacswiki.org/emacs/DotEmacsModular > https://www.emacswiki.org/emacs/DotEmacsStructuring > https://github.com/emacs-jp/init-loader > > There are so many ways to do this. What's the > preferable way? My personal favorite is the method below, I don't know if that's mentioned on any of your links. Note that every file is mentioned explicitly, that means if you are to search for an error (say do the so-called binary search) you don't have to comment in and out code that might have comments, headers, footers, and so on, instead you just comment out one or more filenames, and when the bug or misfeature is localized, it is as easy to enable them again. (let*((emacs-dir "~/.emacs.d") (lisp-dir (format "%s/lisp" emacs-dir)) (init-dir (format "%s/emacs-init" emacs-dir)) (erc-dir (format "%s/erc" init-dir)) (gnus-dir (format "%s/gnus" init-dir)) (ide-dir (format "%s/ide" init-dir)) (w3m-dir (format "%s/w3m" init-dir)) (dirs (list lisp-dir init-dir erc-dir gnus-dir ide-dir w3m-dir ))) (dolist (d dirs) (push d load-path) ) (let ((emacs-init-files '( abc.el align-incal.el batch.el bibtex-incal.el bike.el bmi.el buc.el buffer-menu.el caps-back.el close.el console-keys.el count.el custom-vars.el day.el dired-incal.el ecat-incal.el echo-message.el edit.el elpa.el emacs-shell.el face.el file-write-to.el file.el fill-incal.el frame-size.el geh.el get-search-string.el help-incal.el info-incal.el isbn-verify.el issn-verify.el iterate-files.el jean.el keys.el kill-path.el kill.el latex.el lights.el linux-shell.el list-quoted-functions.el man-incal.el match-data-format.el math.el measure.el minor-modes.el misc.el mode-by-filename.el mode-line.el navigate-fs-keys.el negative-subtraction.el perm.el printer.el quit.el random.el re-make-list.el replace-list.el revert-buffer.el scale.el scroll.el search-regexp-in-files.el sequence-string.el shell-cli.el show-command.el signal.el sort-incal.el spell.el street.el string.el sudo-user-path.el super.el survivor.el switch-to-buffer-regexp.el switch-to-buffer.el tabs.el test-face.el test.el time-cmp.el time-incal.el time-insert.el todo-did.el tramp-incal.el variance.el vt.el window-incal.el wood.el wrap-search.el xsel.el yank.el ))) (dolist (f emacs-init-files) (load-file (format "%s/%s" init-dir f) ))) (let ((emacs-erc-init-files '( erc-connect.el erc-incal.el erc-iterate.el erc-kill.el erc-misc.el erc-spell.el ))) (dolist (f emacs-erc-init-files) (load-file (format "%s/%s" erc-dir f) ))) (let ((emacs-gnus-init-files '( article.el browse.el gnus-incal.el gnus-server.el group-summary.el group.el mail-to-many.el mail.el mailrc.el message-dynamic.el message-incal.el moggle.el summary.el ))) (dolist (f emacs-gnus-init-files) (load-file (format "%s/%s" gnus-dir f) ))) (let ((emacs-ide-init-files '( c-and-cpp.el compile-incal.el elisp.el find-command.el html.el ide.el lisp-incal.el ))) (dolist (f emacs-ide-init-files) (load-file (format "%s/%s" ide-dir f) ))) (let ((emacs-w3m-init-files '( bookmarks.el dl.el history.el w3m-incal.el w3m-keys.el w3m-sem.el w3m-tabs.el w3m-unisearch.el ))) (dolist (f emacs-w3m-init-files) (load-file (format "%s/%s" w3m-dir f) ))) ) https://dataswamp.org/~incal/conf/.emacs -- underground experts united https://dataswamp.org/~incal