* imenu support for babel blocks
@ 2010-07-17 20:57 David O'Toole
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
2010-07-20 22:30 ` imenu support for babel blocks Eric Schulte
0 siblings, 2 replies; 6+ messages in thread
From: David O'Toole @ 2010-07-17 20:57 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 459 bytes --]
I tried the following to get an Imenu composed of babel blocks, so that you
could browse/jump to blocks. But it doesn't seem to work, I'm guessing that
something about how org-mode builds the imenu-generic-expression overwrites
my entry. Is there a hook (or could there be a hook added) that allows me to
imenu-ify more constructs?
(push (list "Source code chunks"
"^#\\+\\(source:\\|srcname:\\|function:\\) \\(.*\\)$" 2)
imenu-generic-expression)
[-- Attachment #1.2: Type: text/html, Size: 550 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] 6+ messages in thread
* [PATCH] Quote path argument in ob-ditaa
2010-07-17 20:57 imenu support for babel blocks David O'Toole
@ 2010-07-18 4:01 ` Gregory J. Grubbs
2010-07-18 5:43 ` Patchwork: Patch 150 Accepted Carsten Dominik
2010-07-18 5:51 ` [PATCH] Quote path argument in ob-ditaa Carsten Dominik
2010-07-20 22:30 ` imenu support for babel blocks Eric Schulte
1 sibling, 2 replies; 6+ messages in thread
From: Gregory J. Grubbs @ 2010-07-18 4:01 UTC (permalink / raw)
To: emacs-orgmode
Patch fixes ob-ditaa for paths that contain spaces and other
shell-interpreted characters.
diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
index 1f56d12..cc06246 100644
--- a/lisp/ob-ditaa.el
+++ b/lisp/ob-ditaa.el
@@ -59,7 +59,7 @@ called by `org-babel-execute-src-block'."
(error "Could not find ditaa.jar at %s" org-ditaa-jar-path))
(with-temp-file in-file (insert body))
(message (concat "java -jar " org-ditaa-jar-path " " cmdline " " in-file " " out-file))
- (shell-command (concat "java -jar " org-ditaa-jar-path " " cmdline " " in-file " " out-file))
+ (shell-command (concat "java -jar " (shell-quote-argument org-ditaa-jar-path) " " cmdline " " in-file " " out-file))
out-file))
(defun org-babel-prep-session:ditaa (session params)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Patchwork: Patch 150 Accepted
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
@ 2010-07-18 5:43 ` Carsten Dominik
2010-07-18 5:51 ` [PATCH] Quote path argument in ob-ditaa Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-18 5:43 UTC (permalink / raw)
To: emacs-orgmode
Patch 150 (http://patchwork.newartisans.com/patch/150/) is now Accepted.
This relates to the following submission:
http://mid.gmane.org/%3C878w59a163.fsf%40dynapse.com%3E
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Quote path argument in ob-ditaa
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
2010-07-18 5:43 ` Patchwork: Patch 150 Accepted Carsten Dominik
@ 2010-07-18 5:51 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-18 5:51 UTC (permalink / raw)
To: Gregory J. Grubbs; +Cc: emacs-orgmode
Applied, thanks
- Carsten
On Jul 18, 2010, at 6:01 AM, Gregory J. Grubbs wrote:
> Patch fixes ob-ditaa for paths that contain spaces and other
> shell-interpreted characters.
>
>
> diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
> index 1f56d12..cc06246 100644
> --- a/lisp/ob-ditaa.el
> +++ b/lisp/ob-ditaa.el
> @@ -59,7 +59,7 @@ called by `org-babel-execute-src-block'."
> (error "Could not find ditaa.jar at %s" org-ditaa-jar-path))
> (with-temp-file in-file (insert body))
> (message (concat "java -jar " org-ditaa-jar-path " " cmdline " "
> in-file " " out-file))
> - (shell-command (concat "java -jar " org-ditaa-jar-path " "
> cmdline " " in-file " " out-file))
> + (shell-command (concat "java -jar " (shell-quote-argument org-
> ditaa-jar-path) " " cmdline " " in-file " " out-file))
> out-file))
>
> (defun org-babel-prep-session:ditaa (session params)
>
>
> _______________________________________________
> 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] 6+ messages in thread
* Re: imenu support for babel blocks
2010-07-17 20:57 imenu support for babel blocks David O'Toole
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
@ 2010-07-20 22:30 ` Eric Schulte
2010-12-01 16:17 ` Sébastien Vauban
1 sibling, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2010-07-20 22:30 UTC (permalink / raw)
To: David O'Toole; +Cc: emacs-orgmode Mailinglist
Hi David,
I've never used imenu myself, but that sounds useful. I'd recommend
using the following rather than building your own regexp
--8<---------------cut here---------------start------------->8---
(push (list "Source code chunks"
org-babel-src-name-w-name-regexp 2)
imenu-generic-expression)
--8<---------------cut here---------------end--------------->8---
You're right that the Org-mode imenu setup looks fairly complex, and is
probably overwriting your simple expression above. Unfortunately I
don't know much about imenu and I'm now sure how a code block menu fits
into the existing Org-mode imenu support.
Best -- Eric
"David O'Toole" <dto1138@gmail.com> writes:
> I tried the following to get an Imenu composed of babel blocks, so that you
> could browse/jump to blocks. But it doesn't seem to work, I'm guessing that
> something about how org-mode builds the imenu-generic-expression overwrites
> my entry. Is there a hook (or could there be a hook added) that allows me to
> imenu-ify more constructs?
>
> (push (list "Source code chunks"
> "^#\\+\\(source:\\|srcname:\\|function:\\) \\(.*\\)$" 2)
> imenu-generic-expression)
> _______________________________________________
> 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] 6+ messages in thread
* Re: imenu support for babel blocks
2010-07-20 22:30 ` imenu support for babel blocks Eric Schulte
@ 2010-12-01 16:17 ` Sébastien Vauban
0 siblings, 0 replies; 6+ messages in thread
From: Sébastien Vauban @ 2010-12-01 16:17 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric and David,
"Eric Schulte" wrote:
> Hi David,
>
> I've never used imenu myself, but that sounds useful. I'd recommend using
> the following rather than building your own regexp
>
> (push (list "Source code chunks"
> org-babel-src-name-w-name-regexp 2)
> imenu-generic-expression)
>
> You're right that the Org-mode imenu setup looks fairly complex, and is
> probably overwriting your simple expression above. Unfortunately I don't
> know much about imenu and I'm now sure how a code block menu fits into the
> existing Org-mode imenu support.
I've written the following in my .emacs file:
#+begin_src emacs-lisp
;; extension of Imenu
(when (and
;; `org-babel' has been loaded
(fboundp 'org-babel-execute-src-block)
;; `imenu' has been loaded
(fboundp 'try-to-add-imenu))
(setq org-src-blocks-imenu-generic-expression
`(("Snippets" ,org-babel-src-name-w-name-regexp 2)))
(add-hook 'org-mode-hook
(lambda ()
(setq imenu-generic-expression
org-src-blocks-imenu-generic-expression))))
#+end_src
... but I never see any name of code chunk in the "IMenu" menu.
I only see the headings of my current Org file.
Any idea what I'm doing wrong?
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-01 16:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-17 20:57 imenu support for babel blocks David O'Toole
2010-07-18 4:01 ` [PATCH] Quote path argument in ob-ditaa Gregory J. Grubbs
2010-07-18 5:43 ` Patchwork: Patch 150 Accepted Carsten Dominik
2010-07-18 5:51 ` [PATCH] Quote path argument in ob-ditaa Carsten Dominik
2010-07-20 22:30 ` imenu support for babel blocks Eric Schulte
2010-12-01 16:17 ` Sébastien Vauban
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).