emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [babel] Painless integration of source blocks with languag


From: Eric S Fraga
Subject: Re: [Orgmode] [babel] Painless integration of source blocks with language
Date: Thu, 13 Jan 2011 09:11:22 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

"Eric Schulte" <address@hidden> writes:

> Eric S Fraga <address@hidden> writes:

[...]

>> management issue: I find it difficult (a) to remember what all my source
>> code snippets are called and (b) to navigate to any given snippet.  I
>> would love to see a babel table of contents popup (a la the table of
>> contents popup with reftex implements for latex files).  Is something
>> like this already available?  If not, how difficult would it be to
>> implement (I'm happy to try given a pointer in the right
>> direction(s)...).
>>
>
> There was some talk of merging imenu with Babel which would provide the
> functionality you describe, I don't believe this ever resulting in
> working code however.  There are a couple of options...
>
> If you know the name of the code block you want to find you can use
> `org-babel-goto-named-src-block' (bound to C-c C-v g) to jump to a named
> code block (∃ a similar function for finding named results).  This
> function provides completion on the block names, the function
> `org-babel-src-block-names' returns a list of all named blocks in the
> current buffer, so it could be used to built up such a table.  In fact
> the following code block will insert a table of such names in the
> current buffer.  Note: you will need to pull the latest as I had to fix
> a small bug in `org-babel-src-block-names'.
>
> #+begin_src emacs-lisp :results list
>   (mapcar #'list (reverse (org-babel-src-block-names)))
> #+end_src

This is brilliant.  Thanks.  Having the table of contents, together with
being able to jump to any block, is half the battle won!  Using it already.

eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.4 (release_7.4.166.gf7a7)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]