From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] error running source code? [6.34trans (release_6.34c.6.gcae0.dirty)] Date: Tue, 26 Jan 2010 00:07:45 -0700 Message-ID: <87my01tkce.fsf@gmail.com> References: <4B56DC58.2070102@ifi.uio.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZfWu-00048h-Fw for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 02:08:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZfWi-00047P-51 for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 02:07:56 -0500 Received: from [199.232.76.173] (port=49595 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZfWh-00047M-TT for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 02:07:51 -0500 Received: from mail-pz0-f181.google.com ([209.85.222.181]:56894) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZfWh-0000qN-1B for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 02:07:51 -0500 Received: by pzk11 with SMTP id 11so1319871pzk.14 for ; Mon, 25 Jan 2010 23:07:50 -0800 (PST) In-Reply-To: <4B56DC58.2070102@ifi.uio.no> ("Martin G. =?utf-8?Q?Skj=C3=A6?= =?utf-8?Q?veland=22's?= message of "Wed, 20 Jan 2010 11:35:04 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?Martin_G=2E_Skj=C3=A6veland?= Cc: emacs-orgmode@gnu.org Hi Martin, Thanks for reporting this bug. I just pushed up a fix. Best -- Eric "Martin G. Skj=C3=A6veland" writes: > Hi, > > I pulled a fresh copy of org-mode this morning and got an error I did > not have before the pull. > > When I export the following to pdf > > --------------------------------------------------begin > * test > > #+begin_src java -n :exports none :tangle test.java > private void abcdefghi throws IOException > #+end_src > > #+begin_src sh :results output :exports results > javac -cp "lib/jena/lib/*:lib/pellet/lib/*" test.java > #+end_src > --------------------------------------------------end > > the error > > Invalid search bound (wrong side of point) > > occurs. The backtrace is attached. Note that I do not get the error > when reducing the string "abcdefghi" to "abcdefgh". > > If I export the document without loading babel, I get no errors. > > Let me know if I should do some git bisecting. > > Thanks! > Martin > > ------------ > > Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) > of 2009-09-27 on palmer, modified by Debian > Package: Org-mode version 6.34trans (release_6.34c.6.gcae0.dirty) > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) > org-metaup-hook '(org-babel-load-in-session-maybe) > org-after-todo-state-change-hook '(org-clock-out-if-current) > org-babel-interpreters '("tex" "n3" "xml" "java" "python" "dot" "sh" > "emacs-lisp") > org-export-latex-format-toc-function 'org-export-latex-format-toc-default > org-export-preprocess-hook '((lambda nil > (org-set-local > (quote org-complex-heading-regexp) > "^\\(\\*+\\)[ > ]+\\(?:\\(TODO\\|DONE\\)\\>\\)?\\(?:[ ]*\\(\\[#.\\]\\)\\)?[ > ]*\\(.*?\\)\\(?:[ ]+\\(:[[:alnum:]_@:]+:\\)\\)?[ ]*$") > ) > org-export-blocks-preprocess) > org-tab-first-hook '(org-babel-hide-result-toggle-maybe > org-hide-block-toggle-maybe) > org-src-mode-hook '(org-src-mode-configure-edit-buffer) > org-confirm-shell-link-function 'yes-or-no-p > org-export-first-hook '(org-beamer-initialize-open-trackers) > org-agenda-before-write-hook '(org-agenda-add-entry-text) > org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers > org-cycle-show-empty-lines > org-optimize-window-after-visibility-change) > org-export-preprocess-before-normalizing-links-hook > (org-remove-file-link-modifiers) > org-export-latex-hyperref-format "\\myhref{%s}{%s}" > org-use-speed-commands t > org-mode-hook '((lambda nil > (org-add-hook (quote change-major-mode-hook) > (quote org-show-block-all) (quote append) (quote local)) > ) > (lambda nil > (org-add-hook (quote change-major-mode-hook) > (quote org-babel-show-result-all) (quote append) > (quote local)) > ) > org-babel-result-hide-spec org-babel-hide-all-hashes > #[nil "\300\301\302\303\304$\207" > [org-add-hook change-major-mode-hook org-show-block-all > append local] > 5] > ) > org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe > org-babel-hash-at-point > org-babel-execute-src-block-maybe) > org-confirm-elisp-link-function 'yes-or-no-p > org-export-interblocks '((lob org-babel-exp-lob-one-liners) > (src org-babel-exp-inline-src-blocks)) > org-occur-hook '(org-first-headline-recenter) > org-from-is-user-regexp "\\" > org-export-preprocess-before-selecting-backend-code-hook > (org-beamer-select-beamer-code) > org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc > org-beamer-auto-fragile-frames > org-beamer-place-default-actions-for-lists) > org-metadown-hook '(org-babel-pop-to-session-maybe) > org-export-blocks '((src org-babel-exp-src-blocks nil) > (comment org-export-blocks-format-comment t) > (ditaa org-export-blocks-format-ditaa nil) > (dot org-export-blocks-format-dot nil)) > ) > > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of= point)") > re-search-backward("^[ ]*#\\+begin_src[ ]+\\(tex\\|n3\\|xml\\|java\\|= python\\|dot\\|sh\\|emacs-lisp\\)[ ]*\\([^\":\n]*\"[^\"\n*]*\"[^\":\n]*\\|= [^\":\n]*\\)\\([^\n]*\\)\n\\([^]+?\\)#\\+end_src" 123 t) > (and (re-search-backward org-babel-src-block-regexp progress-marker t) = (setq progress-marker (match-end 0)) (org-babel-exp-do-export (org-babel-ge= t-src-block-info) (quote block))) > (or (and (re-search-backward org-babel-src-block-regexp progress-marker= t) (setq progress-marker ...) (org-babel-exp-do-export ... ...)) (save-exc= ursion (forward-line 0) (and ... ... ...)) (and (re-search-backward org-blo= ck-regexp progress-marker t) (setq progress-marker ...) (match-string 0)) (= error "Unmatched block [bug in `org-babel-exp-src-blocks'].")) > org-babel-exp-src-blocks(#("javac -cp \"lib/jena/lib/*:lib/pellet/lib/*= \" test.java" 0 53 (fontified nil font-lock-fontified t)) #("sh" 0 2 (font-= lock-fontified t fontified nil)) #(":results" 0 8 (font-lock-fontified t fo= ntified nil)) #("output" 0 6 (font-lock-fontified t fontified nil)) #(":exp= orts" 0 8 (font-lock-fontified t fontified nil)) #("results" 0 7 (font-lock= -fontified t fontified nil))) > apply(org-babel-exp-src-blocks #("javac -cp \"lib/jena/lib/*:lib/pellet= /lib/*\" test.java" 0 53 (fontified nil font-lock-fontified t)) (#("sh" 0 2= (font-lock-fontified t fontified nil)) #(":results" 0 8 (font-lock-fontifi= ed t fontified nil)) #("output" 0 6 (font-lock-fontified t fontified nil)) = #(":exports" 0 8 (font-lock-fontified t fontified nil)) #("results" 0 7 (fo= nt-lock-fontified t fontified nil)))) > (if (memq type org-export-blocks-witheld) "" (apply func body headers)) > (progn (if (memq type org-export-blocks-witheld) "" (apply func body he= aders))) > (unwind-protect (progn (if ... "" ...)) (set-match-data save-match-data= -internal (quote evaporate))) > (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-= match-data save-match-data-internal ...))) > (save-match-data (if (memq type org-export-blocks-witheld) "" (apply fu= nc body headers))) > (replace-match (save-match-data (if ... "" ...)) t t) > (progn (replace-match (save-match-data ...) t t) (unless preserve-inden= t (indent-code-rigidly ... ... indentation))) > (if (setq func (cadr ...)) (progn (replace-match ... t t) (unless prese= rve-indent ...))) > (while (re-search-forward "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\= \)?[\n]\\([^]*?\\)[\n][ ]*#\\+end_\\S-+.*" nil t) (setq indentation (lengt= h ...)) (setq type (intern ...)) (setq headers (save-match-data ...)) (setq= body (match-string 4)) (setq preserve-indent (or org-src-preserve-indentat= ion ...)) (unless preserve-indent (setq body ...)) (unless (memq type types= ) (setq types ...)) (save-match-data (interblock start ...)) (if (setq func= ...) (progn ... ...)) (setq start (match-end 0))) > (progn (fset (quote interblock) (function* ...)) (goto-char (point-min)= ) (setq start (point)) (while (re-search-forward "^\\([ ]*\\)#\\+begin_\\(= \\S-+\\)[ ]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ ]*#\\+end_\\S-+.*" nil t) (setq= indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq = preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-ma= tch-data ...) (if ... ...) (setq start ...)) (interblock start (point-max))) > (unwind-protect (progn (fset ... ...) (goto-char ...) (setq start ...) = (while ... ... ... ... ... ... ... ... ... ... ...) (interblock start ...))= (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...))) > (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect = (progn ... ... ... ... ...) (if --cl-letf-bound-- ... ...))) > (letf ((... ...)) (goto-char (point-min)) (setq start (point)) (while (= re-search-forward "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\\)?[\n]\\([^= ]*?\\)[\n][ ]*#\\+end_\\S-+.*" nil t) (setq indentation ...) (setq type ..= .) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless pr= eserve-indent ...) (unless ... ...) (save-match-data ...) (if ... ...) (set= q start ...)) (interblock start (point-max))) > (letf* ((... ...)) (goto-char (point-min)) (setq start (point)) (while = (re-search-forward "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\\)?[\n]\\([= ^]*?\\)[\n][ ]*#\\+end_\\S-+.*" nil t) (setq indentation ...) (setq type .= ..) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless p= reserve-indent ...) (unless ... ...) (save-match-data ...) (if ... ...) (se= tq start ...)) (interblock start (point-max))) > (flet ((interblock ... ...)) (goto-char (point-min)) (setq start (point= )) (while (re-search-forward "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\\= )?[\n]\\([^]*?\\)[\n][ ]*#\\+end_\\S-+.*" nil t) (setq indentation ...) (s= etq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...)= (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (if ..= . ...) (setq start ...)) (interblock start (point-max))) > (let ((case-fold-search t) (types ...) indentation type func start body= headers preserve-indent progress-marker) (flet (...) (goto-char ...) (setq= start ...) (while ... ... ... ... ... ... ... ... ... ... ...) (interblock= start ...))) > (save-window-excursion (let (... ... indentation type func start body h= eaders preserve-indent progress-marker) (flet ... ... ... ... ...))) > org-export-blocks-preprocess() > run-hooks(org-export-preprocess-hook) > (save-current-buffer (set-buffer (get-buffer-create " org-mode-tmp")) (= erase-buffer) (insert string) (setq case-fold-search t) (let (...) (remove-= text-properties ... ... ...)) (org-export-kill-licensed-text) (let (...) (o= rg-mode)) (setq case-fold-search t) (org-install-letbind) (run-hooks (quote= org-export-preprocess-hook)) (org-export-preprocess-apply-macros) (run-hoo= ks (quote org-export-preprocess-after-macros-hook)) (untabify (point-min) (= point-max)) (org-export-handle-include-files) (run-hooks (quote org-export-= preprocess-after-include-files-hook)) (org-export-remove-archived-trees arc= hived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-ha= ndle-export-tags (plist-get parameters :select-tags) (plist-get parameters = :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selectio= n-hook)) (org-export-replace-src-segments-and-examples backend) (org-export= -protect-colon-examples) (when (plist-get parameters :footnotes) (org-footn= ote-normalize nil t)) (setq target-alist (org-export-define-heading-targets= target-alist)) (org-export-remove-or-extract-drawers drawers (plist-get pa= rameters :drawers) backend) (when (plist-get parameters :skip-before-1st-he= ading) (goto-char ...) (when ... ... ... ...)) (when (plist-get parameters = :add-text) (goto-char ...) (insert ... "\n")) (org-export-remove-headline-m= etadata parameters) (setq target-alist (org-export-handle-invisible-targets= target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-ba= ckend-code-hook)) (org-export-select-backend-specific-text backend) (org-ex= port-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-p= rotect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quot= e org-export-preprocess-after-blockquote-hook)) (unless (plist-get paramete= rs :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-exp= ort-attach-captions-and-attributes backend target-alist)) (org-export-mark-= radio-links) (org-export-concatenate-multiline-links) (run-hooks (quote org= -export-preprocess-before-normalizing-links-hook)) (org-export-normalize-li= nks) (org-export-target-internal-links target-alist) (when (plist-get param= eters :emph-multiline) (org-export-concatenate-multiline-emphasis)) (when o= rg-export-table-remove-special-lines (org-export-remove-special-table-lines= )) (run-hooks (quote org-export-preprocess-before-backend-specifics-hook)) = (when latexp (require ... nil) (org-export-latex-preprocess parameters)) (w= hen asciip (org-export-ascii-preprocess parameters)) (when htmlp (org-expor= t-html-preprocess parameters)) (when docbookp (require ... nil) (org-export= -docbook-preprocess parameters)) ...) > (with-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer)= (insert string) (setq case-fold-search t) (let (...) (remove-text-properti= es ... ... ...)) (org-export-kill-licensed-text) (let (...) (org-mode)) (se= tq case-fold-search t) (org-install-letbind) (run-hooks (quote org-export-p= reprocess-hook)) (org-export-preprocess-apply-macros) (run-hooks (quote org= -export-preprocess-after-macros-hook)) (untabify (point-min) (point-max)) (= org-export-handle-include-files) (run-hooks (quote org-export-preprocess-af= ter-include-files-hook)) (org-export-remove-archived-trees archived-trees) = (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-t= ags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags= )) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org= -export-replace-src-segments-and-examples backend) (org-export-protect-colo= n-examples) (when (plist-get parameters :footnotes) (org-footnote-normalize= nil t)) (setq target-alist (org-export-define-heading-targets target-alist= )) (org-export-remove-or-extract-drawers drawers (plist-get parameters :dra= wers) backend) (when (plist-get parameters :skip-before-1st-heading) (goto-= char ...) (when ... ... ... ...)) (when (plist-get parameters :add-text) (g= oto-char ...) (insert ... "\n")) (org-export-remove-headline-metadata param= eters) (setq target-alist (org-export-handle-invisible-targets target-alist= )) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-ho= ok)) (org-export-select-backend-specific-text backend) (org-export-protect-= quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbat= im) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-= preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamp= s) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-ca= ptions-and-attributes backend target-alist)) (org-export-mark-radio-links) = (org-export-concatenate-multiline-links) (run-hooks (quote org-export-prepr= ocess-before-normalizing-links-hook)) (org-export-normalize-links) (org-exp= ort-target-internal-links target-alist) (when (plist-get parameters :emph-m= ultiline) (org-export-concatenate-multiline-emphasis)) (when org-export-tab= le-remove-special-lines (org-export-remove-special-table-lines)) (run-hooks= (quote org-export-preprocess-before-backend-specifics-hook)) (when latexp = (require ... nil) (org-export-latex-preprocess parameters)) (when asciip (o= rg-export-ascii-preprocess parameters)) (when htmlp (org-export-html-prepro= cess parameters)) (when docbookp (require ... nil) (org-export-docbook-prep= rocess parameters)) ...) > (let* ((htmlp ...) (asciip ...) (latexp ...) (docbookp ...) (backend ..= .) (archived-trees ...) (inhibit-read-only t) (drawers org-drawers) (outlin= e-regexp "\\*+ ") target-alist rtn) (setq org-export-target-aliases nil) (s= etq org-export-preferred-target-alist nil) (setq org-export-code-refs nil) = (with-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer) (in= sert string) (setq case-fold-search t) (let ... ...) (org-export-kill-licen= sed-text) (let ... ...) (setq case-fold-search t) (org-install-letbind) (ru= n-hooks ...) (org-export-preprocess-apply-macros) (run-hooks ...) (untabify= ... ...) (org-export-handle-include-files) (run-hooks ...) (org-export-rem= ove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-su= btrees) (org-export-handle-export-tags ... ...) (run-hooks ...) (org-export= -replace-src-segments-and-examples backend) (org-export-protect-colon-examp= les) (when ... ...) (setq target-alist ...) (org-export-remove-or-extract-d= rawers drawers ... backend) (when ... ... ...) (when ... ... ...) (org-expo= rt-remove-headline-metadata parameters) (setq target-alist ...) (run-hooks = ...) (org-export-select-backend-specific-text backend) (org-export-protect-= quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbat= im) (org-export-mark-blockquote-verse-center) (run-hooks ...) (unless ... .= ..) (setq target-alist ...) (org-export-mark-radio-links) (org-export-conca= tenate-multiline-links) (run-hooks ...) (org-export-normalize-links) (org-e= xport-target-internal-links target-alist) (when ... ...) (when org-export-t= able-remove-special-lines ...) (run-hooks ...) (when latexp ... ...) (when = asciip ...) (when htmlp ...) (when docbookp ... ...) ...) (kill-buffer " or= g-mode-tmp") rtn) > org-export-preprocess-string(#("* test\n\n#+begin_src java -n :exports = none :tangle test.java \nprivate void abcdefghi throws IOException= \n#+end_src\n\n#+begin_src sh :results output :exports results\njavac -cp = \"lib/jena/lib/*:lib/pellet/lib/*\" test.java\n#+end_src\n" 0 2 (fontified = nil) 2 6 (fontified nil) 6 8 (fontified nil) 8 69 (fontified nil font-lock-= fontified t) 69 70 (fontified nil font-lock-fontified t) 70 112 (fontified = nil font-lock-fontified t) 112 113 (fontified nil font-lock-fontified t) 11= 3 122 (fontified nil font-lock-fontified t) 122 124 (fontified nil) 124 171= (fontified nil font-lock-fontified t) 171 172 (fontified nil font-lock-fon= tified t) 172 225 (fontified nil font-lock-fontified t) 225 226 (fontified = nil font-lock-fontified t) 226 235 (fontified nil font-lock-fontified t) 23= 5 236 (fontified nil)) :emph-multiline t :for-LaTeX t :comments nil :tags n= ot-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywo= rds t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :e= xclude-tags ("noexport") :LaTeX-fragments nil) > org-export-as-latex(nil nil nil nil nil nil) > org-export-as-pdf(nil) > org-export-as-pdf-and-open(nil) > call-interactively(org-export-as-pdf-and-open nil nil) > > _______________________________________________ > 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