From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [BUG] #+begin_src wo. language blocks XHTML export Date: Mon, 05 Jul 2010 00:10:28 +0200 Message-ID: <87iq4uzynf.fsf@gmx.de> References: <87fx0abtr1.fsf@gmx.de> <87mxu7nxoy.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=53677 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVXOM-0008WN-RG for emacs-orgmode@gnu.org; Sun, 04 Jul 2010 18:10:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVXOK-0006VD-Ht for emacs-orgmode@gnu.org; Sun, 04 Jul 2010 18:10:26 -0400 Received: from mail.gmx.net ([213.165.64.20]:54654) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OVXOK-0006V3-4Q for emacs-orgmode@gnu.org; Sun, 04 Jul 2010 18:10:24 -0400 In-Reply-To: <87mxu7nxoy.wl%dmaus@ictsoc.de> (David Maus's message of "Sun, 04 Jul 2010 16:11:57 +0200") 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: David Maus Cc: Emacs-orgmode mailing list David Maus writes: > Sebastian Rose wrote: >>[1 ] > >>I'm reworking worg/org-contrib/org-protocol.org and could export the >>results to XHTML. > > >>The reason was line 523. > >>Line 523 was: > >> #+begin_src > >>without a language added! >>Line 530 was > >> #+end_src > > >>Changing `_src' to `_example' in both lines makes it possible to export >>to XHTML again. > > I suppose a source block without languag should be considered an > error, shouldn't it? Maybe Org should fail more gracefully when it > encounters such a block during export? The current behaviour is new. The file I tried to export worked for quite a while locally and on orgmode.org. The fallback was to behave like `#+begin_example', I believe. It can be considered an error, since the docs say:=20 "...This is done with the =E2=80=98src=E2=80=99 block, where you also nee= d to specify the name of the major mode that should be used to fontify the example..." But think of batch export. But I'd like to see some kind of error message, or better be asked for the language (i.e. a major-mode). The mode could be inserted after the `#+begin_src'.=20 Insteat, I get this backtrace: Debugger entered--Lisp error: (wrong-type-argument consp nil) setcar(nil nil) (setf (nth 1 info) (if (and ... ...) (org-babel-expand-noweb-references i= nfo ...) (nth 1 info))) (let* ((info ...) (params ...)) (setf (nth 1 info) (if ... ... ...)) (org= -babel-exp-do-export info (quote block))) (save-excursion (goto-char (match-beginning 0)) (let* (... ...) (setf ...= ...) (org-babel-exp-do-export info ...))) org-babel-exp-src-blocks(#("(let ((a \"b\")\n c d)\n (message \"a: = %S\" a))" 0 14 (fontified t font-lock-fontified t) 14 26 (fontified t font-= lock-fontified t) 26 47 (fontified t font-lock-fontified t))) apply(org-babel-exp-src-blocks #("(let ((a \"b\")\n c d)\n (message= \"a: %S\" a))" 0 14 (fontified t font-lock-fontified t) 14 26 (fontified t= font-lock-fontified t) 26 47 (fontified t font-lock-fontified t)) nil) (if (memq type org-export-blocks-witheld) "" (apply func body headers)) (progn (if (memq type org-export-blocks-witheld) "" (apply func body head= ers))) (unwind-protect (progn (if ... "" ...)) (set-match-data save-match-data-i= nternal (quote evaporate))) (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-ma= tch-data save-match-data-internal ...))) (save-match-data (if (memq type org-export-blocks-witheld) "" (apply func= body headers))) (let ((replacement ...)) (when replacement (replace-match replacement t t= ) (unless preserve-indent ...))) (progn (let (...) (when replacement ... ...))) etc.pp. 49 more lines... Not genuin useful. Best wishes Sebastian