You are correct, while the tangling works, the detangling still needs to
be updated to take into account the fact that there may now be nested
sections of tangled code -- which it doesn't currently. Hopefully this
wont be too large of a code change...
It probably wouldnt involve much code
Your cursor must be on a code line, not on a special comments line. I've
had
the same behavior once. Just move down your cursor one or two lines away...
Are you saying you have succesfully detangled noweb embedded code? If so,
ill have to take a look at the code to see where the bug is. It
Please try using a decent sender, or at least no HTML. I know this cannot
be
obvious, though, but look at the results:
Not to get off on a tanget, but im using gmail. Looks perfect in my gmail
account - i guess your email doesnt support html markup? I just reply to
all, and it
ok, so im not sure how you got it working, but heres the problem in
the code (i think).
We start with the tangled output
--
;; [[file:~/Desktop/test.org][/home/seth/Desktop/test\.org:2]]
(let ((x 1))
(message x=%s x)
;;
On Sun, Jan 16, 2011 at 9:31 AM, Eric Schulte schulte.e...@gmail.comwrote:
#+source: wrappable
#+begin_src emacs-lisp
(setq x (+ 4 x))
#+end_src
#+begin_src emacs-lisp :comments noweb :noweb yes :tangle yes
(let ((x 1))
(message x=%s x)
wrappable
(message x=%s x))
#+end_src
I would just like to throw in a quick idea.
The easiest way to support noweb tangling is to get org-babel-tangle to
create nested tags and change detangle to take these into account.
for example, i have the forex_user source block that is tangled.
;;
(defun org-babel-update-block-body (new-body)
Update the body of the current code block to NEW-BODY.
(if (not (org-babel-where-is-src-block-head))
(error not in source block)
(save-match-data
(replace-match (concat (org-babel-trim new-body) \n) nil t nil 5))
(indent-rigidly
thanks. also, when trying to detangle my code, i found another bug.
In the functions org-babel-tangle-jump-to--org and org-babel-detangle, it
uses org-bracket-link-analytic-regexp to search for the [[file:]] links.
However, it does not include the comment in the regex (;; in clojure), so
somehow
Ive attached the file it fails on. Notice that it fails below the constants
macro, but if you're above it, it will succeed since it wont find the [[name
val]]
general.clj
Description: Binary data
___
Emacs-orgmode mailing list
Please use `Reply All' to
As for how to trace back through noweb links, the best option seem to be
using the existing jump function to navigate from raw source to the
embedded block, keeping track of the point's offset form the beginning
of the block, then using `org-babel-expand-src-block' to expand the body
of the
woops, what i actually meant is that noweb doesnt work. I was thinking about
it, and it might be possible to
(a) automatically create overlays around begin_src blocks using
auto-overlays
(b) have a custom syntax parser that parses noweb syntax in those blocks.
Sort of like what is done for syntax
As an update, ive been working on something i call chunks.
Basically, they are blocks of code (i.e. emacs overlays) that are linked
together.
So far, i have each ns of my clojure code in one source block which is
then tangled to one file.
So, i would like to open the tangled file and then make
My bad. I believe i did look up the functions, but they didn't do what i
needed (or so i thought).
The code doesn't matter too much, let me explain the idea.
A file may contain many blocks of code. Lets look at a arbitrary block A. In
the end, block A will somehow become noweb embedded into a
and i misspoke also, the previous .org file wouldnt work since that uses
noweb. Heres a simple new example.
test.org
Description: Binary data
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
Preface: I hope attachments show up, i dont know if they are allowed
Im currently interested in using babel for a medium size clojure project. I
think the below propositions would greatly benefit babel in accomplishing
literate programming.
First part of the proposal to make this painless:
I would like blocks like begin_html/end_html to be fontified just like
begin_src blocks are.
I would also like to define my own source blocks for clojure (basically a
shorthand) and also have them highlighted. Heres what i have to turn on
fontifying and define a block.
(setq
Thanks, it does. Yep, i looked at the code, and everything was based on
begin_src - so i think i will keep it at that!
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
a :session test header argument the
interactive shell output the error you mentioned. This issue would have
to be resolved by the Python inferior process either python-mode or
python-shell.
Best -- Eric
Seth Burleigh wbu...@gmail.com writes:
#+begin_src python
def add(a,b):
return
#+begin_src python
def add(a,b):
return a+b
def sub(a,b):
return a-b
#+end_src
Fails to execute due to 'unexpected indentation' in general, this is a
problem for copy/pasting into any emacs python shell, it wont work.
___
Emacs-orgmode mailing
I have recently been trying out the src executing capabilities of orgmode. I
have been confused why a python session takes significantly longer to
execute than a non python session. For example
#+begin_src python
return 2+2
#+end_src
executes pretty quickly, but
#+begin_src python :session test
20 matches
Mail list logo