emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error args-out-of-range when using org-babel-tangle with org7.7
@ 2011-10-12 17:54 Jonathan Arkell
  2011-10-12 19:54 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Arkell @ 2011-10-12 17:54 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hi Everyone

I am having some problems with using org-babel-tangle. Each time I try to
use it, I get the error '(args-out-of-range "" -1 0)'.  I've simplified
the source code chunk I want to tangle to this:

#+src_name stack-el
#+begin_src emacs-lisp :tangle stack.el
;;; stack.el -- custom elisp for the stack development
#+end_src


I am on org-mode 7.7, on Mac OS 10.6.8, Emacs for Mac Os (23.2.1)

I am sure I am doing something totally wrong and/or silly.  Can someone
help me out?

Thanks!


Here is a full backtrace:

Debugger entered--Lisp error: (args-out-of-range "" -1 0)
  org-babel-parse-src-block-match()
  org-babel-get-src-block-info(light)
  (let* ((start-line ...) (file ...) (info ...) (src-lang ...)) (unless
(string= ... "no") (unless ... ...)))
  (let ((full-block ...) (beg-block ...) (end-block ...) (lang ...)
(beg-lang ...) (end-lang ...) (switches ...) (beg-switches ...)
(end-switches ...) (header-args ...) (beg-header-args ...)
(end-header-args ...) (body ...) (beg-body ...) (end-body ...)) ((lambda
... ...) (replace-regexp-in-string "[   ]" "-" ...)) (let* (... ... ...
...) (unless ... ...)) (goto-char end-block))
  (while (re-search-forward org-babel-src-block-regexp nil t) (goto-char
(match-beginning 0)) (let (... ... ... ... ... ... ... ... ... ... ... ...
... ... ...) (... ...) (let* ... ...) (goto-char end-block)))
  (save-window-excursion (when file (find-file file)) (setq to-be-removed
(current-buffer)) (goto-char (point-min)) (while (re-search-forward
org-babel-src-block-regexp nil t) (goto-char ...) (let ... ... ... ...)))
  (let* ((file ...) (visited-p ...) (point ...) to-be-removed)
(save-window-excursion (when file ...) (setq to-be-removed ...) (goto-char
...) (while ... ... ...)) (unless visited-p (kill-buffer to-be-removed))
(goto-char point))
  (org-babel-map-src-blocks (buffer-file-name) ((lambda ... ...)
(replace-regexp-in-string "[    ]" "-" ...)) (let* (... ... ... ...) (unless
... ...)))
  (let ((block-counter 1) (current-heading "") blocks)
(org-babel-map-src-blocks (buffer-file-name) (... ...) (let* ... ...))
(setq blocks (mapcar ... blocks)) blocks)
  org-babel-tangle-collect-blocks(nil)
  (mapc (lambda (by-lang) (let* ... ...)) (org-babel-tangle-collect-blocks
lang))
  (let ((block-counter 0) (org-babel-default-header-args ...)
path-collector) (mapc (lambda ... ...) (org-babel-tangle-collect-blocks
lang)) (message "tangled %d code block%s from %s" block-counter (if ... ""
"s") (file-name-nondirectory ...)) (when org-babel-post-tangle-hook (mapc
... path-collector)) path-collector)
  (save-excursion (let (... ... path-collector) (mapc ... ...) (message
"tangled %d code block%s from %s" block-counter ... ...) (when
org-babel-post-tangle-hook ...) path-collector))
  (save-restriction (when only-this-block (unless ... ...) (unless
target-file ...) (narrow-to-region ... ...)) (save-excursion (let ... ...
... ... path-collector)))
  org-babel-tangle(nil)
  call-interactively(org-babel-tangle nil nil)





The information contained in this message is confidential. It is intended to be read only by the individual or entity named above or their designee. If the reader of this message is not the intended recipient, you are hereby notified that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message.

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

* Re: Error args-out-of-range when using org-babel-tangle with org7.7
  2011-10-12 17:54 Error args-out-of-range when using org-babel-tangle with org7.7 Jonathan Arkell
@ 2011-10-12 19:54 ` Thomas S. Dye
  2011-10-13 17:36   ` Jonathan Arkell
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2011-10-12 19:54 UTC (permalink / raw)
  To: Jonathan Arkell; +Cc: emacs-orgmode@gnu.org

Hi Jonathan,

Does it help if you change "#+src_name" to "#+source:"?

Tom

Jonathan Arkell <jonathana@criticalmass.com> writes:

> Hi Everyone
>
> I am having some problems with using org-babel-tangle. Each time I try to
> use it, I get the error '(args-out-of-range "" -1 0)'.  I've simplified
> the source code chunk I want to tangle to this:
>
> #+src_name stack-el
> #+begin_src emacs-lisp :tangle stack.el
> ;;; stack.el -- custom elisp for the stack development
> #+end_src
>
>
> I am on org-mode 7.7, on Mac OS 10.6.8, Emacs for Mac Os (23.2.1)
>
> I am sure I am doing something totally wrong and/or silly.  Can someone
> help me out?
>
> Thanks!
>
>
> Here is a full backtrace:
>
> Debugger entered--Lisp error: (args-out-of-range "" -1 0)
>   org-babel-parse-src-block-match()
>   org-babel-get-src-block-info(light)
>   (let* ((start-line ...) (file ...) (info ...) (src-lang ...)) (unless
> (string= ... "no") (unless ... ...)))
>   (let ((full-block ...) (beg-block ...) (end-block ...) (lang ...)
> (beg-lang ...) (end-lang ...) (switches ...) (beg-switches ...)
> (end-switches ...) (header-args ...) (beg-header-args ...)
> (end-header-args ...) (body ...) (beg-body ...) (end-body ...)) ((lambda
> ... ...) (replace-regexp-in-string "[   ]" "-" ...)) (let* (... ... ...
> ...) (unless ... ...)) (goto-char end-block))
>   (while (re-search-forward org-babel-src-block-regexp nil t) (goto-char
> (match-beginning 0)) (let (... ... ... ... ... ... ... ... ... ... ... ...
> ... ... ...) (... ...) (let* ... ...) (goto-char end-block)))
>   (save-window-excursion (when file (find-file file)) (setq to-be-removed
> (current-buffer)) (goto-char (point-min)) (while (re-search-forward
> org-babel-src-block-regexp nil t) (goto-char ...) (let ... ... ... ...)))
>   (let* ((file ...) (visited-p ...) (point ...) to-be-removed)
> (save-window-excursion (when file ...) (setq to-be-removed ...) (goto-char
> ...) (while ... ... ...)) (unless visited-p (kill-buffer to-be-removed))
> (goto-char point))
>   (org-babel-map-src-blocks (buffer-file-name) ((lambda ... ...)
> (replace-regexp-in-string "[    ]" "-" ...)) (let* (... ... ... ...) (unless
> ... ...)))
>   (let ((block-counter 1) (current-heading "") blocks)
> (org-babel-map-src-blocks (buffer-file-name) (... ...) (let* ... ...))
> (setq blocks (mapcar ... blocks)) blocks)
>   org-babel-tangle-collect-blocks(nil)
>   (mapc (lambda (by-lang) (let* ... ...)) (org-babel-tangle-collect-blocks
> lang))
>   (let ((block-counter 0) (org-babel-default-header-args ...)
> path-collector) (mapc (lambda ... ...) (org-babel-tangle-collect-blocks
> lang)) (message "tangled %d code block%s from %s" block-counter (if ... ""
> "s") (file-name-nondirectory ...)) (when org-babel-post-tangle-hook (mapc
> ... path-collector)) path-collector)
>   (save-excursion (let (... ... path-collector) (mapc ... ...) (message
> "tangled %d code block%s from %s" block-counter ... ...) (when
> org-babel-post-tangle-hook ...) path-collector))
>   (save-restriction (when only-this-block (unless ... ...) (unless
> target-file ...) (narrow-to-region ... ...)) (save-excursion (let ... ...
> ... ... path-collector)))
>   org-babel-tangle(nil)
>   call-interactively(org-babel-tangle nil nil)
>
>
>
>
>
> The information contained in this message is confidential. It is intended to be read only by the individual or entity named above or their designee. If the reader of this message is not the intended recipient, you are hereby notified that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message.
>
>

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Error args-out-of-range when using org-babel-tangle with org7.7
  2011-10-12 19:54 ` Thomas S. Dye
@ 2011-10-13 17:36   ` Jonathan Arkell
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Arkell @ 2011-10-13 17:36 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode@gnu.org

Thanks, that was part of the problem.

The other part was a chunk of stub code:

#source: el-stack-keys
#+begin_src emacs-lisp
#+end_src



Replacing it with:
#source: el-stack-keys
#+begin_src emacs-lisp

#+end_src


Seems to work.

__________________________________


Jonathan Arkell
Tech Lead
Inspired By Drum & Bass, Scheme, Kawaii

p. 403.206.4377
402 -- 11th Ave SE
Calgary, AB, Canada T2G 0Y4

jonathana@criticalmass.com
criticalmass.com









On 12/10/11 1:54 PM, "Thomas S. Dye" <tsd@tsdye.com> wrote:

>Hi Jonathan,
>
>Does it help if you change "#+src_name" to "#+source:"?
>
>Tom
>
>Jonathan Arkell <jonathana@criticalmass.com> writes:
>
>> Hi Everyone
>>
>> I am having some problems with using org-babel-tangle. Each time I try
>>to
>> use it, I get the error '(args-out-of-range "" -1 0)'.  I've simplified
>> the source code chunk I want to tangle to this:
>>
>> #+src_name stack-el
>> #+begin_src emacs-lisp :tangle stack.el
>> ;;; stack.el -- custom elisp for the stack development
>> #+end_src
>>
>>
>> I am on org-mode 7.7, on Mac OS 10.6.8, Emacs for Mac Os (23.2.1)
>>
>> I am sure I am doing something totally wrong and/or silly.  Can someone
>> help me out?
>>
>> Thanks!
>>
>>
>> Here is a full backtrace:
>>
>> Debugger entered--Lisp error: (args-out-of-range "" -1 0)
>>   org-babel-parse-src-block-match()
>>   org-babel-get-src-block-info(light)
>>   (let* ((start-line ...) (file ...) (info ...) (src-lang ...)) (unless
>> (string= ... "no") (unless ... ...)))
>>   (let ((full-block ...) (beg-block ...) (end-block ...) (lang ...)
>> (beg-lang ...) (end-lang ...) (switches ...) (beg-switches ...)
>> (end-switches ...) (header-args ...) (beg-header-args ...)
>> (end-header-args ...) (body ...) (beg-body ...) (end-body ...)) ((lambda
>> ... ...) (replace-regexp-in-string "[   ]" "-" ...)) (let* (... ... ...
>> ...) (unless ... ...)) (goto-char end-block))
>>   (while (re-search-forward org-babel-src-block-regexp nil t) (goto-char
>> (match-beginning 0)) (let (... ... ... ... ... ... ... ... ... ... ...
>>...
>> ... ... ...) (... ...) (let* ... ...) (goto-char end-block)))
>>   (save-window-excursion (when file (find-file file)) (setq
>>to-be-removed
>> (current-buffer)) (goto-char (point-min)) (while (re-search-forward
>> org-babel-src-block-regexp nil t) (goto-char ...) (let ... ... ...
>>...)))
>>   (let* ((file ...) (visited-p ...) (point ...) to-be-removed)
>> (save-window-excursion (when file ...) (setq to-be-removed ...)
>>(goto-char
>> ...) (while ... ... ...)) (unless visited-p (kill-buffer to-be-removed))
>> (goto-char point))
>>   (org-babel-map-src-blocks (buffer-file-name) ((lambda ... ...)
>> (replace-regexp-in-string "[    ]" "-" ...)) (let* (... ... ... ...)
>>(unless
>> ... ...)))
>>   (let ((block-counter 1) (current-heading "") blocks)
>> (org-babel-map-src-blocks (buffer-file-name) (... ...) (let* ... ...))
>> (setq blocks (mapcar ... blocks)) blocks)
>>   org-babel-tangle-collect-blocks(nil)
>>   (mapc (lambda (by-lang) (let* ... ...))
>>(org-babel-tangle-collect-blocks
>> lang))
>>   (let ((block-counter 0) (org-babel-default-header-args ...)
>> path-collector) (mapc (lambda ... ...) (org-babel-tangle-collect-blocks
>> lang)) (message "tangled %d code block%s from %s" block-counter (if ...
>>""
>> "s") (file-name-nondirectory ...)) (when org-babel-post-tangle-hook
>>(mapc
>> ... path-collector)) path-collector)
>>   (save-excursion (let (... ... path-collector) (mapc ... ...) (message
>> "tangled %d code block%s from %s" block-counter ... ...) (when
>> org-babel-post-tangle-hook ...) path-collector))
>>   (save-restriction (when only-this-block (unless ... ...) (unless
>> target-file ...) (narrow-to-region ... ...)) (save-excursion (let ...
>>...
>> ... ... path-collector)))
>>   org-babel-tangle(nil)
>>   call-interactively(org-babel-tangle nil nil)
>>
>>
>>
>>
>>
>> The information contained in this message is confidential. It is
>>intended to be read only by the individual or entity named above or
>>their designee. If the reader of this message is not the intended
>>recipient, you are hereby notified that any distribution of this
>>message, in any form, is strictly prohibited. If you have received this
>>message in error, please immediately notify the sender and delete or
>>destroy any copy of this message.
>>
>>
>
>--
>Thomas S. Dye
>http://www.tsdye.com


The information contained in this message is confidential. It is intended to be read only by the individual or entity named above or their designee. If the reader of this message is not the intended recipient, you are hereby notified that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message.

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

end of thread, other threads:[~2011-10-13 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-12 17:54 Error args-out-of-range when using org-babel-tangle with org7.7 Jonathan Arkell
2011-10-12 19:54 ` Thomas S. Dye
2011-10-13 17:36   ` Jonathan Arkell

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