emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel] detangle
@ 2010-10-29  8:15 Eric Schulte
  2010-10-29 14:32 ` Eric S Fraga
  2010-10-31 16:56 ` David Maus
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Schulte @ 2010-10-29  8:15 UTC (permalink / raw)
  To: Org Mode

Hi,

I've just added functions for detangling code from pure source code
files back into code blocks in the org-mode files from whence they were
tangled.  This is done by the new `org-babel-detangle' function.
Additionally the new `org-babel-tangle-jump-to-org' function can be used
to navigate from a pure source code file back to the related code block
in the original Org-mode file.

Both of these new functions require that the code block was tangled with
comments which can be accomplished by setting the :comments header to
"yes".

This should be useful for collaborating with anyone who would rather
edit source-code files directly rather than keeping the canonical
versions of all source-code in Org-mode files.  You'll just have to
convince your collaborators to leave the link comments in the source
code file.

Best -- Eric

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

* Re: [Babel] detangle
  2010-10-29  8:15 [Babel] detangle Eric Schulte
@ 2010-10-29 14:32 ` Eric S Fraga
  2010-10-29 15:01   ` Eric Schulte
  2010-10-31 16:56 ` David Maus
  1 sibling, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2010-10-29 14:32 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Hi,
>
> I've just added functions for detangling code from pure source code
> files back into code blocks in the org-mode files from whence they were
> tangled.

Wow.  It just gets better all the time!! :-)

> This is done by the new `org-babel-detangle' function.
> Additionally the new `org-babel-tangle-jump-to-org' function can be used
> to navigate from a pure source code file back to the related code block
> in the original Org-mode file.
>
> Both of these new functions require that the code block was tangled with
> comments which can be accomplished by setting the :comments header to
> "yes".

I've tried the first couple of steps: added the comments header and
tangled my code, ledger in this case.  I've had a looked at the tangled
code and I get lines such as this one inserted:

: ; [[id:8fe917c4-257f-45f7-839b-68b5772e5443][%sourcename]]

Obviously, =%sourcename= should have been replaced by something in the
tangling operation as, subsequently, the jump command doesn't work.  I
assume that the detangling won't work either.

Is there something I (or you?) should add to =ob-ledger.el= perhaps?

I've not tried any other codes as I don't /tangle/ often.

Thanks,
eric

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

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

* Re: [Babel] detangle
  2010-10-29 14:32 ` Eric S Fraga
@ 2010-10-29 15:01   ` Eric Schulte
  2010-10-29 15:36     ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-10-29 15:01 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Org Mode

Hi Eric,

The bug you mentioned should have been fixed by yesterday's commit

,----[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
| commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
| Author: Eric Schulte <schulte.eric@gmail.com>
| Date:   Fri Oct 29 01:37:28 2010 -0600
| 
|     fixed typos in tangle comment link format strings
|     
|     * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
|       (org-babel-tangle-comment-format-end): fix typo
`----

is it possible you haven't "make clean && make"'d your repo since the
last push?

Best -- Eric

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> "Eric Schulte" <schulte.eric@gmail.com> writes:
>
>> Hi,
>>
>> I've just added functions for detangling code from pure source code
>> files back into code blocks in the org-mode files from whence they were
>> tangled.
>
> Wow.  It just gets better all the time!! :-)
>
>> This is done by the new `org-babel-detangle' function.
>> Additionally the new `org-babel-tangle-jump-to-org' function can be used
>> to navigate from a pure source code file back to the related code block
>> in the original Org-mode file.
>>
>> Both of these new functions require that the code block was tangled with
>> comments which can be accomplished by setting the :comments header to
>> "yes".
>
> I've tried the first couple of steps: added the comments header and
> tangled my code, ledger in this case.  I've had a looked at the tangled
> code and I get lines such as this one inserted:
>
> : ; [[id:8fe917c4-257f-45f7-839b-68b5772e5443][%sourcename]]
>
> Obviously, =%sourcename= should have been replaced by something in the
> tangling operation as, subsequently, the jump command doesn't work.  I
> assume that the detangling won't work either.
>
> Is there something I (or you?) should add to =ob-ledger.el= perhaps?
>
> I've not tried any other codes as I don't /tangle/ often.
>
> Thanks,
> eric

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

* Re: [Babel] detangle
  2010-10-29 15:01   ` Eric Schulte
@ 2010-10-29 15:36     ` Eric S Fraga
  2010-11-04 13:53       ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2010-10-29 15:36 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Hi Eric,
>
> The bug you mentioned should have been fixed by yesterday's commit
>
> ,----[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
> | commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
> | Author: Eric Schulte <schulte.eric@gmail.com>
> | Date:   Fri Oct 29 01:37:28 2010 -0600
> |
> |     fixed typos in tangle comment link format strings
> |
> |     * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
> |       (org-babel-tangle-comment-format-end): fix typo
> `----
>
> is it possible you haven't "make clean && make"'d your repo since the
> last push?

done all that and org-reload several times today but I had not
re-started emacs; oops!

I just did so and everything seems to be working much better.  The jump
to org doesn't actually make the buffer appear but it does move me to
the right place in the org buffer.  I haven't tried de-tangling yet.

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

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

* Re: [Babel] detangle
  2010-10-29  8:15 [Babel] detangle Eric Schulte
  2010-10-29 14:32 ` Eric S Fraga
@ 2010-10-31 16:56 ` David Maus
  1 sibling, 0 replies; 7+ messages in thread
From: David Maus @ 2010-10-31 16:56 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 669 bytes --]

At Fri, 29 Oct 2010 02:15:08 -0600,
Eric Schulte wrote:
>
> Hi,
>
> I've just added functions for detangling code from pure source code
> files back into code blocks in the org-mode files from whence they were
> tangled.  This is done by the new `org-babel-detangle' function.
> Additionally the new `org-babel-tangle-jump-to-org' function can be used
> to navigate from a pure source code file back to the related code block
> in the original Org-mode file.

Awesome.  This week I sat in front of my computer at work and really
wished for such a functionality.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [Babel] detangle
  2010-10-29 15:36     ` Eric S Fraga
@ 2010-11-04 13:53       ` Eric Schulte
  2010-11-04 16:01         ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-11-04 13:53 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Org Mode

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> "Eric Schulte" <schulte.eric@gmail.com> writes:
>
>> Hi Eric,
>>
>> The bug you mentioned should have been fixed by yesterday's commit
>>
>> ,----[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
>> | commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
>> | Author: Eric Schulte <schulte.eric@gmail.com>
>> | Date:   Fri Oct 29 01:37:28 2010 -0600
>> |
>> |     fixed typos in tangle comment link format strings
>> |
>> |     * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
>> |       (org-babel-tangle-comment-format-end): fix typo
>> `----
>>
>> is it possible you haven't "make clean && make"'d your repo since the
>> last push?
>
> done all that and org-reload several times today but I had not
> re-started emacs; oops!
>
> I just did so and everything seems to be working much better.  The jump
> to org doesn't actually make the buffer appear but it does move me to
> the right place in the org buffer.

Hmm, I can't re-create that problem.  When I call ob-tangle-jump-to-org
from a tangled source code file the parent Org-mode file is opened and
receives focus.

Best -- Eric

> I haven't tried de-tangling yet.

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

* Re: [Babel] detangle
  2010-11-04 13:53       ` Eric Schulte
@ 2010-11-04 16:01         ` Eric S Fraga
  0 siblings, 0 replies; 7+ messages in thread
From: Eric S Fraga @ 2010-11-04 16:01 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>
>> "Eric Schulte" <schulte.eric@gmail.com> writes:
>>
>>> Hi Eric,
>>>
>>> The bug you mentioned should have been fixed by yesterday's commit
>>>
>>> ,----[c6565eaa43d398f6771edd59c2bfe7ca54e4a93e]
>>> | commit c6565eaa43d398f6771edd59c2bfe7ca54e4a93e
>>> | Author: Eric Schulte <schulte.eric@gmail.com>
>>> | Date:   Fri Oct 29 01:37:28 2010 -0600
>>> |
>>> |     fixed typos in tangle comment link format strings
>>> |
>>> |     * lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
>>> |       (org-babel-tangle-comment-format-end): fix typo
>>> `----
>>>
>>> is it possible you haven't "make clean && make"'d your repo since the
>>> last push?
>>
>> done all that and org-reload several times today but I had not
>> re-started emacs; oops!
>>
>> I just did so and everything seems to be working much better.  The jump
>> to org doesn't actually make the buffer appear but it does move me to
>> the right place in the org buffer.
>
> Hmm, I can't re-create that problem.  When I call ob-tangle-jump-to-org
> from a tangled source code file the parent Org-mode file is opened and
> receives focus.
>
> Best -- Eric

I wouldn't worry about this too much.  It's probably some combination of
the window manager I might have been using at the time (usually
ratpoison but sometimes fluxbox), I often have quite a
few emacs frames open simultaneously and the file was already being
visited in some frame or another!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

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

end of thread, other threads:[~2010-11-04 16:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-29  8:15 [Babel] detangle Eric Schulte
2010-10-29 14:32 ` Eric S Fraga
2010-10-29 15:01   ` Eric Schulte
2010-10-29 15:36     ` Eric S Fraga
2010-11-04 13:53       ` Eric Schulte
2010-11-04 16:01         ` Eric S Fraga
2010-10-31 16:56 ` David Maus

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