emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org heading properties in code block?
@ 2014-01-21 19:08 Christopher Kotfila
  2014-01-23 17:04 ` Rick Frankel
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Kotfila @ 2014-01-21 19:08 UTC (permalink / raw)
  To: emacs-orgmode

Is it possible to include org heading properties directly in codeblocks 
on tangle?

Something to the effect of:

** Some Subheading
:PROPERTIES:
:FOO: "bar"
:END:

#+BEGIN_SRC emacs-lisp :tangle /path/to/.dir-locals.el :noweb yes
((python-mode . ((some-var . <<FOO>>))))

#+END_SRC


Thanks!
/Chris

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

* Re: Org heading properties in code block?
  2014-01-21 19:08 Org heading properties in code block? Christopher Kotfila
@ 2014-01-23 17:04 ` Rick Frankel
  0 siblings, 0 replies; 2+ messages in thread
From: Rick Frankel @ 2014-01-23 17:04 UTC (permalink / raw)
  To: Christopher Kotfila; +Cc: emacs-orgmode

On 2014-01-21 14:08, Christopher Kotfila wrote:
> Is it possible to include org heading properties directly in
> codeblocks on tangle?

> ** Some Subheading
> :PROPERTIES:
> :FOO: "bar"
> :END:
> 
> #+BEGIN_SRC emacs-lisp :tangle /path/to/.dir-locals.el :noweb yes
> ((python-mode . ((some-var . <<FOO>>))))
> 
> #+END_SRC


how about:

* As a variable
:PROPERTIES:
:header-args: :var foo="bar"
:END:

#+BEGIN_SRC emacs-lisp
foo
#+END_SRC
* As a noweb source block

#+name: foo
#+BEGIN_SRC emacs-lisp :exports none :eval never
"bar"
#+END_SRC

#+BEGIN_SRC emacs-lisp :noweb yes
(foo . <<foo>>)
#+END_SRC

rick

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

end of thread, other threads:[~2014-01-23 17:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 19:08 Org heading properties in code block? Christopher Kotfila
2014-01-23 17:04 ` Rick Frankel

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