emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sven Bretfeld <sven.bretfeld@ntnu.no>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Feature request: Maintaining multiple init files with one org file
Date: Sun, 29 Jul 2018 12:42:27 +0200	[thread overview]
Message-ID: <87effmjpbg.fsf@ntnu.no> (raw)
In-Reply-To: <87in4yucra.fsf@gmail.com>

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

  reply	other threads:[~2018-07-29 10:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  9:25 Feature request: Maintaining multiple init files with one org file Sven Bretfeld
2018-07-28 13:53 ` Amin Bandali
2018-07-29 10:49   ` Sven Bretfeld
2018-07-29  0:06 ` Tim Cross
2018-07-29 10:42   ` Sven Bretfeld [this message]
2018-07-30  7:07     ` Eric S Fraga
2018-07-30 12:15       ` Sven Bretfeld
2018-07-30 19:25 ` Diego Zamboni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87effmjpbg.fsf@ntnu.no \
    --to=sven.bretfeld@ntnu.no \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).