emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Literate programming
@ 2010-05-07 14:09 Ivanov Dmitry
  2010-05-07 21:02 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Ivanov Dmitry @ 2010-05-07 14:09 UTC (permalink / raw)
  To: emacs-orgmode

Hi.
I have been using a literate programming tool: leo editor.  Maybe someone used it. A programmer can create a tree with the description of the program with the minuteness he wants. In each node he has a chunk of code and comments, if needed.

Is anybody interested in creating an emacs mode, making it like leo?The tree buffer seems an ideal tool for this project. I promise to help with all my elisp skills.

I have posted this message at CEDET mailing list, so if you are interested, please check the thread:

http://comments.gmane.org/gmane.emacs.cedet/4423

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

* Re: Literate programming
  2010-05-07 14:09 Literate programming Ivanov Dmitry
@ 2010-05-07 21:02 ` Eric Schulte
  2010-05-11  5:55   ` Jan Böcker
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2010-05-07 21:02 UTC (permalink / raw)
  To: Ivanov Dmitry; +Cc: emacs-orgmode

Hi Ivanov,

Are you familiar with Org-babel?

http://orgmode.org/worg/org-contrib/babel/

It adds literate programming support to Org-mode.

Best -- Eric

Ivanov Dmitry <usr345@gmail.com> writes:

> Hi.
> I have been using a literate programming tool: leo editor.  Maybe someone used it. A programmer can create a tree with the description of the program with the minuteness he wants. In each node he has a chunk of code and comments, if needed.
>
> Is anybody interested in creating an emacs mode, making it like leo?The tree buffer seems an ideal tool for this project. I promise to help with all my elisp skills.
>
> I have posted this message at CEDET mailing list, so if you are interested, please check the thread:
>
> http://comments.gmane.org/gmane.emacs.cedet/4423
>
>
>
> _______________________________________________
> 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: Literate programming
  2010-05-07 21:02 ` Eric Schulte
@ 2010-05-11  5:55   ` Jan Böcker
  2010-05-11  7:09     ` Carsten Dominik
  2010-05-11  7:22     ` Re[2]: " Ivanov Dmitry
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Böcker @ 2010-05-11  5:55 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, Ivanov Dmitry

> Ivanov Dmitry <usr345@gmail.com> writes:
> 
>> The tree buffer seems an ideal tool for this project.

What is this "tree buffer" you speak of?
Are you telling me that I can already use Org to view the outline
Leo-style, with the outline structure (folded to the "content" startup
visibility) in one window and an indirect buffer narrowed to the body
text of the current headline in a second window?

That would be wonderful! (If not, I would definitely be interested in
creating such a feature, but I have no idea where to start.)

I had used Leo at the end of high school to make an overview of all the
topics I needed to know for the exams. This particular feature has been
an entry on my "ideas to implement if I ever have infinite time" list
for some time.

Regards,
	Jan

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

* Re: Literate programming
  2010-05-11  5:55   ` Jan Böcker
@ 2010-05-11  7:09     ` Carsten Dominik
  2010-05-11  7:22     ` Re[2]: " Ivanov Dmitry
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-05-11  7:09 UTC (permalink / raw)
  To: Jan Böcker; +Cc: emacs-orgmode, Ivanov Dmitry


On May 11, 2010, at 7:55 AM, Jan Böcker wrote:

>> Ivanov Dmitry <usr345@gmail.com> writes:
>>
>>> The tree buffer seems an ideal tool for this project.
>
> What is this "tree buffer" you speak of?
> Are you telling me that I can already use Org to view the outline
> Leo-style, with the outline structure (folded to the "content" startup
> visibility) in one window and an indirect buffer narrowed to the body
> text of the current headline in a second window?
>
> That would be wonderful! (If not, I would definitely be interested in
> creating such a feature, but I have no idea where to start.)

Maybe start with org-toc.el, in the contrib directory.

- Carsten

>
> I had used Leo at the end of high school to make an overview of all  
> the
> topics I needed to know for the exams. This particular feature has  
> been
> an entry on my "ideas to implement if I ever have infinite time" list
> for some time.
>
> Regards,
> 	Jan
>
> _______________________________________________
> 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

- Carsten

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

* Re[2]: Literate programming
  2010-05-11  5:55   ` Jan Böcker
  2010-05-11  7:09     ` Carsten Dominik
@ 2010-05-11  7:22     ` Ivanov Dmitry
  1 sibling, 0 replies; 5+ messages in thread
From: Ivanov Dmitry @ 2010-05-11  7:22 UTC (permalink / raw)
  To: Jan Böcker; +Cc: emacs-orgmode

> What is this "tree buffer" you speak of?

The tree buffer is a library from CEDET project, widely used in ECB. Look at this screenshot, and you'll see tree buffers at the top of the frame:

http://ecb.sourceforge.net/screenshots/12.png


> Are you telling me that I can already use Org to view the outline
> Leo-style, with the outline structure (folded to the "content" startup
> visibility) in one window and an indirect buffer narrowed to the body
> text of the current headline in a second window?

I did it with org-babel. Install it, using this manual:

http://orgmode.org/worg/org-contrib/babel/intro.php

then you can try treir sample, that I rewrote in Perl:

* Prefix

Here we have the code, that is output in the beginning of the file

#+srcname: hello-world-prefix
#+begin_src perl
print "/-----------------------------------------------------------\\\n";
#+end_src

* Postfix

This code will be used at the end of the file.

#+srcname: hello-world-postfix
#+begin_src perl
  print "\-----------------------------------------------------------/";
#+end_src

* File body

This is the main code of the file.

#+srcname: hello-world
#+begin_src perl :tangle hello.pl
  <<hello-world-prefix>>
  print "|                       hello world                         |\n";
  <<hello-world-postfix>>
#+end_src

---------end sample---------------------
You can edit the code in an indirect buffer, using C-c '. Tangle it with (org-babel-tangle).



> That would be wonderful! (If not, I would definitely be interested in
> creating such a feature, but I have no idea where to start.)

The first step will be understanding, how does the CEDET library tree-buffer.el work.

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

end of thread, other threads:[~2010-05-11  8:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 14:09 Literate programming Ivanov Dmitry
2010-05-07 21:02 ` Eric Schulte
2010-05-11  5:55   ` Jan Böcker
2010-05-11  7:09     ` Carsten Dominik
2010-05-11  7:22     ` Re[2]: " Ivanov Dmitry

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