Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ I used the following org-mode document: #+PROPERTY: header-args:R :tangle yes :comments org * Test Text for testing. #+BEGIN_SRC R message(1) #+END_SRC #+BEGIN_SRC R message(2) #+END_SRC When I `org-babel-tangle', this fails after the first code block is written. Stacktrace below. Tested with current development versions of Emacs and org-mode. Debugger entered--Lisp error: (error "Nothing to comment") signal(error ("Nothing to comment")) error("Nothing to comment") comment-region-default(1 3 nil) comment-region(1 3) #[(text) "\205&\303\230?\205& G\304V\205&\n\203 c\207\305` c\210`\"\210\306\210\307c\207" [comments text org-babel-tangle-uncomment-comments "no" 0 comment-region nil "\n"] 3](#("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t))) org-babel-spec-to-string((12 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(2)" #("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t)))) #[(spec) "\306\211\307!\310!\211G\311V\205\n)\312! \313\230\203%\314\315 !\2027 \316\230\203/\317\2027 G\311V\2057 \211\205P,\203O \313\230\203O \320,Q\202P \211-\205\321!\322-!.\211/\203w.\203w/\316\230\204w\323.\324\"\210*\325-!\203\217-\326\327*\"\235\204\217\330-!\210\331\332!0r0q\210\333\216\3341!\203\247\317\335\336\217\210 \203\277-2\235\204\277 \337Pc\210-2B2\3403!\210\341 4\331\332!5r5q\210\342\216\325-!\203\340\343-!\210db\210\344\345\34638\"A\316\230\204\371`eU\204\371\337c\2104c\210\347\317\211-#\210. \203\f\204\3506T6\351\352-\fB\317\353$.\207" [get-spec tangle sheb she-bang tangle-mode base-name #[(name) "\302\303 8\"A\207" [name spec assoc 4] 4] :tangle :shebang 0 :tangle-mode "yes" file-name-sans-extension buffer-file-name "no" nil "." :mkdirp file-name-directory make-directory parents file-exists-p mapcar car delete-file generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) fboundp (funcall lang-f) ((error)) "\n" org-babel-spec-to-string buffer-string ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) insert-file-contents assoc :padline 4 write-region 493 add-to-list path-collector #[(a b) "@ @\232\207" [a b] 2] ext file-name fnd m temp-buffer lang-f ...] 6]((12 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(2)" #("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t)))) mapc(#[(spec) "\306\211\307!\310!\211G\311V\205\n)\312! \313\230\203%\314\315 !\2027 \316\230\203/\317\2027 G\311V\2057 \211\205P,\203O \313\230\203O \320,Q\202P \211-\205\321!\322-!.\211/\203w.\203w/\316\230\204w\323.\324\"\210*\325-!\203\217-\326\327*\"\235\204\217\330-!\210\331\332!0r0q\210\333\216\3341!\203\247\317\335\336\217\210 \203\277-2\235\204\277 \337Pc\210-2B2\3403!\210\341 4\331\332!5r5q\210\342\216\325-!\203\340\343-!\210db\210\344\345\34638\"A\316\230\204\371`eU\204\371\337c\2104c\210\347\317\211-#\210. \203\f\204\3506T6\351\352-\fB\317\353$.\207" [get-spec tangle sheb she-bang tangle-mode base-name #[(name) "\302\303 8\"A\207" [name spec assoc 4] 4] :tangle :shebang 0 :tangle-mode "yes" file-name-sans-extension buffer-file-name "no" nil "." :mkdirp file-name-directory make-directory parents file-exists-p mapcar car delete-file generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) fboundp (funcall lang-f) ((error)) "\n" org-babel-spec-to-string buffer-string ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) insert-file-contents assoc :padline 4 write-region 493 add-to-list path-collector #[(a b) "@ @\232\207" [a b] 2] ext file-name fnd m temp-buffer lang-f ...] 6] ((8 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(1)" #("Test\n\nText for testing.\n\n" 0 4 (fontified t face org-level-1) 4 5 (fontified t) 5 6 (fontified t) 6 24 (fontified t) 24 25 (fontified t))) (12 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(2)" #("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t))))) #[(by-lang) "@A\306 \"A\206 \307\306 \"A\203#\310\306 \"A!\206$ \311P! \312\313\314\n\"-\207" [by-lang lang specs org-babel-tangle-lang-exts ext org-src-lang-modes assoc intern symbol-name "-mode" nil mapc #[(spec) "\306\211\307!\310!\211G\311V\205\n)\312! \313\230\203%\314\315 !\2027 \316\230\203/\317\2027 G\311V\2057 \211\205P,\203O \313\230\203O \320,Q\202P \211-\205\321!\322-!.\211/\203w.\203w/\316\230\204w\323.\324\"\210*\325-!\203\217-\326\327*\"\235\204\217\330-!\210\331\332!0r0q\210\333\216\3341!\203\247\317\335\336\217\210 \203\277-2\235\204\277 \337Pc\210-2B2\3403!\210\341 4\331\332!5r5q\210\342\216\325-!\203\340\343-!\210db\210\344\345\34638\"A\316\230\204\371`eU\204\371\337c\2104c\210\347\317\211-#\210. \203\f\204\3506T6\351\352-\fB\317\353$.\207" [get-spec tangle sheb she-bang tangle-mode base-name #[(name) "\302\303 8\"A\207" [name spec assoc 4] 4] :tangle :shebang 0 :tangle-mode "yes" file-name-sans-extension buffer-file-name "no" nil "." :mkdirp file-name-directory make-directory parents file-exists-p mapcar car delete-file generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) fboundp (funcall lang-f) ((error)) "\n" org-babel-spec-to-string buffer-string ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) insert-file-contents assoc :padline 4 write-region 493 add-to-list path-collector #[(a b) "@ @\232\207" [a b] 2] ext file-name fnd m temp-buffer lang-f ...] 6] lang-f she-banged] 5](("R" (8 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(1)" #("Test\n\nText for testing.\n\n" 0 4 (fontified t face org-level-1) 4 5 (fontified t) 5 6 (fontified t) 6 24 (fontified t) 24 25 (fontified t))) (12 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(2)" #("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t))))) mapc(#[(by-lang) "@A\306 \"A\206 \307\306 \"A\203#\310\306 \"A!\206$ \311P! \312\313\314\n\"-\207" [by-lang lang specs org-babel-tangle-lang-exts ext org-src-lang-modes assoc intern symbol-name "-mode" nil mapc #[(spec) "\306\211\307!\310!\211G\311V\205\n)\312! \313\230\203%\314\315 !\2027 \316\230\203/\317\2027 G\311V\2057 \211\205P,\203O \313\230\203O \320,Q\202P \211-\205\321!\322-!.\211/\203w.\203w/\316\230\204w\323.\324\"\210*\325-!\203\217-\326\327*\"\235\204\217\330-!\210\331\332!0r0q\210\333\216\3341!\203\247\317\335\336\217\210 \203\277-2\235\204\277 \337Pc\210-2B2\3403!\210\341 4\331\332!5r5q\210\342\216\325-!\203\340\343-!\210db\210\344\345\34638\"A\316\230\204\371`eU\204\371\337c\2104c\210\347\317\211-#\210. \203\f\204\3506T6\351\352-\fB\317\353$.\207" [get-spec tangle sheb she-bang tangle-mode base-name #[(name) "\302\303 8\"A\207" [name spec assoc 4] 4] :tangle :shebang 0 :tangle-mode "yes" file-name-sans-extension buffer-file-name "no" nil "." :mkdirp file-name-directory make-directory parents file-exists-p mapcar car delete-file generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) fboundp (funcall lang-f) ((error)) "\n" org-babel-spec-to-string buffer-string ((byte-code "\301!\203\n\302!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) insert-file-contents assoc :padline 4 write-region 493 add-to-list path-collector #[(a b) "@ @\232\207" [a b] 2] ext file-name fnd m temp-buffer lang-f ...] 6] lang-f she-banged] 5] (("R" (8 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(1)" #("Test\n\nText for testing.\n\n" 0 4 (fontified t face org-level-1) 4 5 (fontified t) 5 6 (fontified t) 6 24 (fontified t) 24 25 (fontified t))) (12 "/tmp/test2.org" "file:/tmp/test2.org::*Test" Test:1 ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "org") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "yes") (:exports . "code") (:results . "replace") (:hlines . "no") (:session . "none")) "message(2)" #("\n\n" 0 1 (font-lock-fontified t fontified t face org-block-end-line) 1 2 (font-lock-fontified t fontified t)))))) org-babel-tangle(nil) funcall-interactively(org-babel-tangle nil) call-interactively(org-babel-tangle record nil) command-execute(org-babel-tangle record) helm-M-x(nil "org-babel-tangle") funcall-interactively(helm-M-x nil "org-babel-tangle") call-interactively(helm-M-x nil nil) command-execute(helm-M-x) Emacs : GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.13) of 2016-01-18 Package: Org-mode version 8.3beta (release_8.3beta-1286-g20795f @ /home/malsburg/usr/share/emacs/site-lisp/org/) current state: ============== (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-latex-classes '(("g-brief" "\\documentclass[12pt]{g-brief}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("beamerposter" "\\documentclass[final,hyperref={pdfpagelabels=false}]{beamer}\n \\usepackage{times}\n \\usepackage{amsmath,amsthm, amssymb, latexsym}\n \\boldmath\n \\renewcommand\\maketitle{}\n \\usepackage[english]{babel}\n \\usepackage[utf8]{inputenc}\n \\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}\n [NO-DEFAULT-PACKAGES]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("letter" "\\documentclass[12pt]{letter}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-contacts-files '("/home/malsburg/Essentials/documents/contacts.org") org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-reverse-note-order t org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function '(lambda (name contents) contents) org-log-done t org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-pdf-process '("pdflatex -interaction nonstopmode -output-directory %o %f" "biber `basename %f .tex`" "pdflatex -interaction nonstopmode -output-directory %o %f" "pdflatex -interaction nonstopmode -output-directory %o %f") org-latex-format-headline-function 'org-latex-format-headline-default-function org-default-notes-file "/home/malsburg/Essentials/documents/all.org" org-todo-keyword-faces '(("WAIT" . "orange")) org-capture-templates '(("b" "BibTeX article" plain (file "/home/malsburg/Documents/Uni/Bibliographie/bibliography.bib") "@article{%^{BibTeX key},\n author = {%^{author}},\n title = {%^{title}},\n journal = {%^{journal}},\n volume = {%^{volume}},\n number = {%^{number}},\n pages = {%^{pages}},\n year = {%^{year}},\n doi = {%^{doi}},\n keywords = {%^{keywords}},\n abstract = {}\n}" :prepend nil) ("c" "Org-contact" entry (file tmalsburg-contacts-file :prepend nil) "* %?\n :PROPERTIES:\n :N: SURNAME;GIVEN;MIDDLE;PREFIX;SUFFIX\n :PHOTO: URI\n :BDAY:\n :ADDRESS: (WORK, pref)\n :PHONE: (CELL, VOICE)\n :PHONE: (WORK, FAX)\n :EMAIL: (INTERNET, WORK, pref)\n :TITLE:\n :ROLE:\n :ORG: DEPT;INST;* \n :URL: \n :NOTE:\n :REV: %t\n :END:\n" :prepend nil) ("i" "Idiom" entry (file "/home/malsburg/Documents/Sprachen/English/idioms.org" :prepend nil) "* %?\n %i") ("j" "Journal" entry (file+olp tmalsburg-agenda-file "Journal") "* %? %T\n %i" :prepend t) ("n" "Notes" entry (file+olp tmalsburg-agenda-file "Notes") "* %? %t\n %i" :prepend t) ("p" "Password" entry (file+olp tmalsburg-secrets-file "Webseiten and Email accounts") "* %?") ("t" "To do" entry (file+olp tmalsburg-agenda-file "Agenda" "TODO") "* TODO %?\n %i" :prepend t) ("m" "May do" entry (file+olp tmalsburg-agenda-file "Agenda" "MAYDO") "* MAYDO %?\n %i" :prepend t) ("r" "To read" entry (file+olp tmalsburg-agenda-file "Agenda" "READ") "* READ %?\n %i" :prepend t) ("d" "Done" entry (file+olp tmalsburg-agenda-file "Agenda" "DONE") "* DONE %?\n CLOSED: %U\n %i" :prepend t) ) org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function '(lambda (name contents) contents) org-capture-mode-hook '(evil-insert-state) org-from-is-user-regexp "\\" org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function '(lambda (name contents width) contents) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-archive-mark-done t org-ditaa-eps-jar-path "/home/malsburg/usr/share/emacs/site-lisp/contrib/scripts/DitaaEps.jar" org-todo-keywords '((sequence "TODO" "READ" "MAYDO" "WAIT" "|" "DONE" "NODO" "DELEGATED")) org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el")) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-ditaa-jar-path "/home/malsburg/usr/src/org-mode/contrib/scripts/ditaa.jar" org-html-format-headline-function 'org-html-format-headline-default-function org-babel-load-languages '((python . t) (emacs-lisp . t) (ditaa . t) (R . t)) org-src-preserve-indentation t org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-agenda-files '("/home/malsburg/Essentials/documents/all.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-confirm-babel-evaluate nil )