From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Bretfeld Subject: Re: Feature request: Maintaining multiple init files with one org file Date: Sun, 29 Jul 2018 12:42:27 +0200 Message-ID: <87effmjpbg.fsf@ntnu.no> References: <87va8ziuem.fsf@ntnu.no> <87in4yucra.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjj9o-0005gZ-IR for emacs-orgmode@gnu.org; Sun, 29 Jul 2018 06:42:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjj9l-0006SE-G1 for emacs-orgmode@gnu.org; Sun, 29 Jul 2018 06:42:36 -0400 Received: from mailgw02.it.ntnu.no ([2001:700:300:3::175]:46744) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fjj9l-0006Qq-6x for emacs-orgmode@gnu.org; Sun, 29 Jul 2018 06:42:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mailgw02.it.ntnu.no (Postfix) with ESMTP id 42529801B85 for ; Sun, 29 Jul 2018 12:42:28 +0200 (CEST) Received: from mailgw02.it.ntnu.no ([127.0.0.1]) by localhost (mailgw02.it.ntnu.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cU4WkVZ6L1a for ; Sun, 29 Jul 2018 12:42:28 +0200 (CEST) Received: from kamaloka (239.228.16.62.customer.cdi.no [62.16.228.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: svenbre) by mailgw02.it.ntnu.no (Postfix) with ESMTPSA id 0254A8007D4 for ; Sun, 29 Jul 2018 12:42:27 +0200 (CEST) In-reply-to: <87in4yucra.fsf@gmail.com> 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: Org-mode Hi Thanks for the answer. Tim Cross writes: > As your emacs init file is really just a lisp program, it is relatively > easy to implement multiple environment support within the file itself, > which is what I do. At the start of my init file, I just have some elisp > which sets variables representing the platform (linux or mac), the > hostname (I have both a linux and mac box at home and work) and the > profile (home/work). Then it is just if/cond/when conditionals where > needed. I use org to store the file mainly for documentation purposes > and will have the same file on all platforms. The advantage is that it > is the same file on all platforms, the disadvantage is that it is larger > and probably more complex than it would be if you tangled different > files per system. This is pretty much how I do it at the moment. Complexity is indeed the problem here. I have Emacs also running on an Android tablet under Termux. This one needs quite a lot of adjustments to the init file. Already the paths to the org files and to some non-elpa/melpa packages are different. Other packages are not available on Termux (e.g. aspell) or not meaningful at all (X-related stuff, mu4e etc.). Having the same init file here as on the other computers, would easily end up in a mess of IFs and WHENs (and probably slow down the start process on Android). At the moment I have a separate .emacs for the tablet and have to remember changing this file, for ex. whenever I include a new file in the org-agenda-files list. This could be much more tidy with an org approach. > For me this is just 6 of one and half a dozen of the other. YMMV. I do > find there are some things best set/managed via Emacs' custom facility, > so the most useful bit in my init file is the bit which loads different > custom files based on the platform. I don't bother keeping the custom > files in git, so they stay local to each system. I find using custom to > manage face and font settings particularly convenient over managing them > by hand in my init file. I'm trying to use customize as little as possible, since AFAIK there is no way to let customize use an org file instead of a "real" init file. Sven