From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [babel] Painless integration of source blocks with language
Date: Wed, 26 Jan 2011 11:43:24 +0100 [thread overview]
Message-ID: <80zkqoq71v.fsf@missioncriticalit.com> (raw)
In-Reply-To: m1bp365xda.fsf@gmail.com
Hi Dan,
Dan Davison wrote:
> Eric S Fraga <e.fraga-hclig2XLE9Zaa/9Udqfwiw@public.gmane.org> writes:
>> "Eric Schulte" <schulte.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>> Eric S Fraga <e.fraga-hclig2XLE9Zaa/9Udqfwiw@public.gmane.org> 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).
>
> Would anyone object if I change that function slightly so that it
> doesn't strip text properties, so that the search hits come up in the
> minibuffer with the in-context fontification?
Not sure either to understand what you mean...
>>> 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
>
> As a different approach, `occur' is good for doing this (results listed
> in a separate buffer with jump-back links). The function below can be
> extended in the obvious way.
>
> #+begin_src emacs-lisp
> (defun dan/find-in-buffer ()
> (interactive)
> (let ((targets
> `(("<named src blocks>" . ,org-babel-src-name-regexp)
> ("<src block results>" . ,org-babel-result-regexp))))
> (occur
> (cdr
> (assoc
> (ido-completing-read "Find: " (mapcar #'car targets))
> targets)))
> (other-window 1)))
> #+end_src
Thanks for sharing this.
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
prev parent reply other threads:[~2011-01-26 10:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-08 22:29 [babel] Painless integration of source blocks with language Seth Burleigh
2011-01-09 1:54 ` Eric Schulte
2011-01-09 9:40 ` Štěpán Němec
2011-01-09 17:59 ` Eric Schulte
2011-01-10 0:59 ` Seth Burleigh
2011-01-10 2:13 ` Eric Schulte
2011-01-10 3:49 ` Seth Burleigh
2011-01-10 4:01 ` Seth Burleigh
2011-01-11 17:00 ` Eric Schulte
2011-01-10 18:46 ` Eric S Fraga
2011-01-11 17:12 ` Eric Schulte
[not found] ` <AANLkTi=dNTn6HBeR4wV7039FDDyPGtmWbmL0biFwT-ta@mail.gmail.com>
2011-01-11 23:09 ` Seth Burleigh
2011-01-13 9:11 ` Eric S Fraga
2011-01-13 15:23 ` Seth Burleigh
2011-01-13 21:23 ` Eric Schulte
2011-01-13 23:44 ` Seth Burleigh
2011-01-16 15:31 ` Eric Schulte
2011-01-17 9:29 ` Sébastien Vauban
2011-01-17 16:18 ` Eric Schulte
2011-01-17 19:32 ` Sébastien Vauban
2011-01-17 22:15 ` Seth Burleigh
2011-01-17 22:44 ` Sébastien Vauban
2011-01-18 18:11 ` Seth Burleigh
2011-01-18 18:14 ` Seth Burleigh
2011-01-18 18:38 ` Seth Burleigh
2011-01-19 7:28 ` Eric Schulte
2011-01-24 14:49 ` Seth Burleigh
2011-01-18 19:53 ` Bastien
2011-01-24 11:56 ` Dan Davison
2011-01-24 18:56 ` Eric S Fraga
2011-01-26 10:43 ` Sébastien Vauban [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80zkqoq71v.fsf@missioncriticalit.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).