* Is it possible to do literate programming without org-babel?
@ 2010-12-03 13:09 I.S.
2010-12-03 14:25 ` Eric S Fraga
0 siblings, 1 reply; 5+ messages in thread
From: I.S. @ 2010-12-03 13:09 UTC (permalink / raw)
To: emacs-orgmode
Dear Experts,
I think org-babel is great and use it when I can. But on larger projects
where some people are not emacs users, it may not be feasible for the
master file to be an org-mode file.
Do you have any suggestions on using literate programming techniques
when the source code must be in a .py file?
One thing I have tried is switching to org-mode when I want to write
comments, create links, etc. and do that in org-mode and then switch
back to python mode. This actually works reasonably well but it's
annoying to switch modess.
Any better ideas?
--
Thanks,
-I.S.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is it possible to do literate programming without org-babel?
2010-12-03 13:09 Is it possible to do literate programming without org-babel? I.S.
@ 2010-12-03 14:25 ` Eric S Fraga
2010-12-03 14:33 ` Eric Schulte
2010-12-03 14:42 ` Pierre de Buyl
0 siblings, 2 replies; 5+ messages in thread
From: Eric S Fraga @ 2010-12-03 14:25 UTC (permalink / raw)
To: I.S.; +Cc: emacs-orgmode
"I.S." <inquisitive.scientist@gmail.com> writes:
> Dear Experts,
>
> I think org-babel is great and use it when I can. But on larger
> projects where some people are not emacs users, it may not be feasible
> for the master file to be an org-mode file.
>
> Do you have any suggestions on using literate programming techniques
> when the source code must be in a .py file?
>
> One thing I have tried is switching to org-mode when I want to write
> comments, create links, etc. and do that in org-mode and then switch
> back to python mode. This actually works reasonably well but it's
> annoying to switch modess.
>
> Any better ideas?
This probably is not going to help you but I have the same problem.
What I do, *when* the project is one in which I am the main lead, is to
keep using org mode, without switching modes, but when I need to share
something with my collaborator, I *tangle* all the code and send him
both the code and the org document. This means that he can run the
code. However, the code has no comments in it...
Of course, incorporating any changes my collaborator makes back into the
org document is annoying but manageable.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.169.g0d0e)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is it possible to do literate programming without org-babel?
2010-12-03 14:25 ` Eric S Fraga
@ 2010-12-03 14:33 ` Eric Schulte
2010-12-03 15:18 ` Eric S Fraga
2010-12-03 14:42 ` Pierre de Buyl
1 sibling, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2010-12-03 14:33 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode, I.S.
If your collaborators don't mind the existence of some Org-mode specific
comments in the .py file, you can tangle with comments on and then use
the `org-babel-detangle' function to bring changes in the source file
back into your Org-mode buffer. In this way it should be possible for
you to collaborate without leaving Org-mode.
Best -- Eric
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> "I.S." <inquisitive.scientist@gmail.com> writes:
>
>> Dear Experts,
>>
>> I think org-babel is great and use it when I can. But on larger
>> projects where some people are not emacs users, it may not be feasible
>> for the master file to be an org-mode file.
>>
>> Do you have any suggestions on using literate programming techniques
>> when the source code must be in a .py file?
>>
>> One thing I have tried is switching to org-mode when I want to write
>> comments, create links, etc. and do that in org-mode and then switch
>> back to python mode. This actually works reasonably well but it's
>> annoying to switch modess.
>>
>> Any better ideas?
>
> This probably is not going to help you but I have the same problem.
>
> What I do, *when* the project is one in which I am the main lead, is to
> keep using org mode, without switching modes, but when I need to share
> something with my collaborator, I *tangle* all the code and send him
> both the code and the org document. This means that he can run the
> code. However, the code has no comments in it...
>
> Of course, incorporating any changes my collaborator makes back into the
> org document is annoying but manageable.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is it possible to do literate programming without org-babel?
2010-12-03 14:25 ` Eric S Fraga
2010-12-03 14:33 ` Eric Schulte
@ 2010-12-03 14:42 ` Pierre de Buyl
1 sibling, 0 replies; 5+ messages in thread
From: Pierre de Buyl @ 2010-12-03 14:42 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode, I.S.
Hello,
I have taken a reverse approach, even with no collaboration.
I write the source code in pure $LANGUAGE (fortran 90 for now) and
add comments in org-mode syntax with a special header:
in prog.f90
!!subroutine compute
! This subroutine performs a task
subroutine compute(myarg)
integer, intent(in) :: myarg
write(*,*) myarg
end subroutine compute
get translated by a script to
** subroutine compute
This subroutine performs a task
#begin_src f90
subroutine compute(myarg)
integer, intent(in) :: myarg
write(*,*) myarg
end subroutine compute
#end_src
which can be exported with the language font locking of emacs in html
via orgmode. It gives me a typeset documentation from my source code
directly.
I think that a feature similar to C-' in org-mode would be wonderful:
I could edit my "pure" f90 program and edit my comment blocks in org-
mode.
Regards,
Pierre
Le 3 déc. 10 à 09:25, Eric S Fraga a écrit :
> "I.S." <inquisitive.scientist@gmail.com> writes:
>
>> Dear Experts,
>>
>> I think org-babel is great and use it when I can. But on larger
>> projects where some people are not emacs users, it may not be
>> feasible
>> for the master file to be an org-mode file.
>>
>> Do you have any suggestions on using literate programming techniques
>> when the source code must be in a .py file?
>>
>> One thing I have tried is switching to org-mode when I want to write
>> comments, create links, etc. and do that in org-mode and then switch
>> back to python mode. This actually works reasonably well but it's
>> annoying to switch modess.
>>
>> Any better ideas?
>
> This probably is not going to help you but I have the same problem.
>
> What I do, *when* the project is one in which I am the main lead,
> is to
> keep using org mode, without switching modes, but when I need to share
> something with my collaborator, I *tangle* all the code and send him
> both the code and the org document. This means that he can run the
> code. However, the code has no comments in it...
>
> Of course, incorporating any changes my collaborator makes back
> into the
> org document is annoying but manageable.
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
> : using Org-mode version 7.3 (release_7.3.169.g0d0e)
>
> _______________________________________________
> 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] 5+ messages in thread
* Re: Is it possible to do literate programming without org-babel?
2010-12-03 14:33 ` Eric Schulte
@ 2010-12-03 15:18 ` Eric S Fraga
0 siblings, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2010-12-03 15:18 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode, I.S.
"Eric Schulte" <schulte.eric@gmail.com> writes:
> If your collaborators don't mind the existence of some Org-mode specific
> comments in the .py file, you can tangle with comments on and then use
> the `org-babel-detangle' function to bring changes in the source file
> back into your Org-mode buffer. In this way it should be possible for
> you to collaborate without leaving Org-mode.
Ah, very true; I'd forgotten about detangle... I'll give it a shot
tonight when I get back to this particular project!
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.169.g0d0e)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-03 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 13:09 Is it possible to do literate programming without org-babel? I.S.
2010-12-03 14:25 ` Eric S Fraga
2010-12-03 14:33 ` Eric Schulte
2010-12-03 15:18 ` Eric S Fraga
2010-12-03 14:42 ` Pierre de Buyl
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).