Hi Grant,

I think it is expected. The code looks like this:
>
> (when (setq new-body (org-babel-tangle-jump-to-org))
>       (org-babel-update-block-body new-body))
>

Yeah not sure I fully understand that code. Basically it does this for each
code block that needs to be detangled right? I am just not sure why the
focus doesn't return back to the source at the end of the process.


> The first time I detangled I was surprised, too.
>
> But then it hit me: if you are detangling then you probably might want to
> 1. See the updated code
> 2. Commit the updated code
>

Yes, I agree with you. However on a team that work on a LP project,
different people have different preferences and workflows. Personally I
only code in the Org-file, and toggle a code block to its major mode if I
need something provided by the major mode (coding in Clojure). However,
some people prefer see the full namespace (one namespace per Org file)
directly in Cider (the major mode) and detangle from there (this is why I
got interested in detangling).

In their case, having the buffer switching back to the Org file is a bit
irritating, particularly since there is no (yet) any function that let you
switch to the tangle source file of a code block.

If this is really the behavior, then I think that a new option should be
added to it such that we can choose one behavior or the other. If a
function that jump from a code block to its tangled source is created, then
we could use it with that option in `org-babel-detangle` to switch back to
the source if it is the wish of the user.

Thoughts?


Thanks,

Fred

Reply via email to