all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Alan Lue <alan.lue@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Tangling to Multiple Files
Date: Sun, 28 Oct 2012 11:03:32 -1000	[thread overview]
Message-ID: <m1390ygvh7.fsf@tsdye.com> (raw)
In-Reply-To: <87txtebbjt.fsf@rye.gateway.2wire.net> (Alan Lue's message of "Sun, 28 Oct 2012 13:12:54 -0700")

Aloha Alan,

This can be achieved with noweb references.

Something like this:

#+name: user-host-a
#+HEADERS: :tangle user-host-a.el :noweb tangle
#+BEGIN_SRC emacs-lisp
<<initial-frame>>
#+END_SRC

#+name: user-host-b
#+HEADERS: :tangle user-host-b.el :noweb tangle
#+BEGIN_SRC emacs-lisp
<<initial-frame>>
#+END_SRC

#+name: initial-frame
#+BEGIN_SRC emacs-lisp
  (setq initial-frame-alist '((width . 80) (height . 38)))
#+END_SRC

hth,
Tom

Alan Lue <alan.lue@gmail.com> 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.
>
>
>

-- 
Thomas S. Dye
http://www.tsdye.com

  reply	other threads:[~2012-10-28 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 20:12 Tangling to Multiple Files Alan Lue
2012-10-28 21:03 ` Thomas S. Dye [this message]
2012-10-28 21:12 ` Eric Schulte
2012-10-28 21:38   ` Alan Lue

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

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

  git send-email \
    --in-reply-to=m1390ygvh7.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=alan.lue@gmail.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.