From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Bretfeld Subject: Feature request: Maintaining multiple init files with one org file Date: Sat, 28 Jul 2018 11:25:37 +0200 Message-ID: <87va8ziuem.fsf@ntnu.no> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjLTs-0004mW-9C for emacs-orgmode@gnu.org; Sat, 28 Jul 2018 05:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjLTp-0007O1-3U for emacs-orgmode@gnu.org; Sat, 28 Jul 2018 05:25:44 -0400 Received: from mailgw02.it.ntnu.no ([129.241.56.175]:45866) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fjLTo-0007Hi-QV for emacs-orgmode@gnu.org; Sat, 28 Jul 2018 05:25:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mailgw02.it.ntnu.no (Postfix) with ESMTP id 009558019F2 for ; Sat, 28 Jul 2018 11:25:38 +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 Vxrlwv_YYDDJ for ; Sat, 28 Jul 2018 11:25:37 +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 B1CCA80173A for ; Sat, 28 Jul 2018 11:25:37 +0200 (CEST) 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 I don't know how you guys maintain init files for different hosts. I have one org-file with the header: #+PROPERTY: header-args :tangle ~/.emacs The file is synced to all my machines and produces the local init files on each. Most configurations are shared, but some are host-specific (e.g. font size). Sadly export filtering does not work with the tangle function. It would be nice to be able to do something like: ,---- | * Default Frame | ** Office Computer :OFFICE: | #+begin_src emacs-lisp | (setq default-frame-alist '( | (font . "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-26-*-*-*-m-0-iso10646-1") | (width . 102) | (height . 41)) | #+end_src | | ** Computer at home :HOME: | #+begin_src emacs-lisp | (setq default-frame-alist '( | (font . "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1") | (width . 150) | (height . 50)) | #+end_src | | ** Laptop :LAPTOP: | #+begin_src emacs-lisp | (setq default-frame-alist '( | (font . "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") | (width . 80) | (height . 30)) | #+end_src `---- It should be clear what this is about. On the office computer you would prepare the file headers to exclude the tags HOME and LAPTOP from being tangled and, after saving/tangling the file, you would have a nice init file suiting this computer. At home the same by excluding the other tags etc. This would save a lot of work and you would have a tidy way to maintain all your init files without (if (string-equal (system-name) clauses. If the noexport tag worked, it would also save a lot of time and mess when debugging your init file in case of an error. I don't actually understand why the developers decided not to implement export filtering in the tangling operations. I know about the COMMENT keyword, but the above example should make clear that this solution is far from handy. Maybe there is another way that escaped me so far? All best, Sven