[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling to Multiple Files

From: Alan Lue
Subject: Re: [O] Tangling to Multiple Files
Date: Sun, 28 Oct 2012 14:38:39 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Thanks Eric, I didn't know that you could pass lisp code as header
arguments. It looks like it'll be best to conditionally tangle.

 :tangle (if (string-match "myhost" system-name) "yes" "no")

Eric Schulte <address@hidden> writes:

> Alan Lue <address@hidden> writes:
>> Hi, how does one tangle a single code block to multiple files?
>> I thought the following might work, but unfortunately it does not.
>> Set the frame size.
>> #+HEADERS: :tangle user-host-a.el user-host-b.el
>> #+BEGIN_SRC emacs-lisp
>>   (setq initial-frame-alist '((width . 80) (height . 38)))
>> #+END_SRC
>> To provide some background, I'm using =org-babel-load-file= in my
>> init.el file to load up my Emacs configuration from an Org fileā€”call it
>> "user.org." I'd like to use just one user.org file across multiple
>> computers, however, meaning I'd like user.org to tangle into
>> user-host-a.el and user-host-b.el, for instance.
>> The configurations are only slightly different, so I'd like to be able
>> to selectively indicate to Org-mode which code blocks to tangle
>> into.
> You could try something like the following to tangle out to a different
> file on each machine.
>   :tangle (format "%s.el" system-name)
> or
>   :tangle (format "%s.el" user-login-name)
> Hope this helps,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]