emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: David Maus <dmaus@ictsoc.de>
Cc: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [BUG] #+begin_src wo. language blocks XHTML export
Date: Mon, 05 Jul 2010 00:10:28 +0200	[thread overview]
Message-ID: <87iq4uzynf.fsf@gmx.de> (raw)
In-Reply-To: <87mxu7nxoy.wl%dmaus@ictsoc.de> (David Maus's message of "Sun, 04 Jul 2010 16:11:57 +0200")

David Maus <dmaus@ictsoc.de> writes:
> Sebastian Rose wrote:
>>[1  <text/plain (7bit)>]
>
>>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: 

  "...This is done with the ‘src’ block, where you also need 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'. 



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 info ...) (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 headers)))
  (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 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

  reply	other threads:[~2010-07-04 22:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 23:02 [BUG] #+begin_src wo. language blocks XHTML export Sebastian Rose
2010-07-04 14:11 ` David Maus
2010-07-04 22:10   ` Sebastian Rose [this message]
2010-07-05 14:56     ` David Maus
2010-07-08 19:09     ` Eric Schulte
2010-07-08 19:37       ` Thomas S. Dye
2010-07-10  4:32         ` Eric Schulte
2010-07-12  8:13           ` David Maus
2010-07-12  9:11             ` Carsten Dominik
2010-07-12 17:44               ` Eric Schulte
2010-07-12 18:12                 ` Carsten Dominik
2010-07-12 19:33                   ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iq4uzynf.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).