emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: Maintaining multiple init files with one org file
@ 2018-07-28  9:25 Sven Bretfeld
  2018-07-28 13:53 ` Amin Bandali
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sven Bretfeld @ 2018-07-28  9:25 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-30 19:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-07-30  7:07     ` Eric S Fraga
2018-07-30 12:15       ` Sven Bretfeld
2018-07-30 19:25 ` Diego Zamboni

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).