From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Arkell Subject: Error args-out-of-range when using org-babel-tangle with org7.7 Date: Wed, 12 Oct 2011 11:54:30 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE3LQ-0000yx-0e for emacs-orgmode@gnu.org; Wed, 12 Oct 2011 14:15:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RE3LO-0001lN-Ul for emacs-orgmode@gnu.org; Wed, 12 Oct 2011 14:15:55 -0400 Received: from backfin.cmass.criticalmass.com ([216.18.38.241]:6084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE3LO-0001f0-NO for emacs-orgmode@gnu.org; Wed, 12 Oct 2011 14:15:54 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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=3D ... "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* (... ... ... ...) (unles= s ... ...))) (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 t= o be read only by the individual or entity named above or their designee. I= f 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 pr= ohibited. If you have received this message in error, please immediately no= tify the sender and delete or destroy any copy of this message.