emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* babel stopping export after updating to org 8.3
@ 2015-09-15  4:25 Aviv
  2015-09-15  4:35 ` Robert Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Aviv @ 2015-09-15  4:25 UTC (permalink / raw)
  To: emacs-orgmode

Hi! 

I just upgraded to org 8.3 and am stuck with an export issue.

When I try to export a file with just "#+begin_src" and " "#+end_src" as the 
only lines, I get the error 
"user-error: No language for src block: (unnamed)". 

It seems like it is calling org-babel-exp-process-buffer -- but there is no 
reason that I can tell that is being called.  (org-export-babel-evaluate is 
definitely nil, thought other testing seems to indicate that shouldn't even 
matter)

I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
still have the issue with an empty init.el! 

Any idea what could be wrong?  Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: babel stopping export after updating to org 8.3
  2015-09-15  4:25 babel stopping export after updating to org 8.3 Aviv
@ 2015-09-15  4:35 ` Robert Klein
  2015-09-15  7:55   ` Aviv
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Klein @ 2015-09-15  4:35 UTC (permalink / raw)
  To: Aviv, emacs-orgmode

Hi

Aviv wrote:

> Hi! 
> 
> I just upgraded to org 8.3 and am stuck with an export issue.
> 
> When I try to export a file with just "#+begin_src" and " "#+end_src" as the 
> only lines, I get the error 
> "user-error: No language for src block: (unnamed)". 
> 
> It seems like it is calling org-babel-exp-process-buffer -- but there is no 
> reason that I can tell that is being called.  (org-export-babel-evaluate is 
> definitely nil, thought other testing seems to indicate that shouldn't even 
> matter)
> 
> I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
> still have the issue with an empty init.el! 
> 
> Any idea what could be wrong?  Thanks!
> 
> 

You need to specify a language, e.g.

#+begin_src foo
#+end_src

You can use any string for language.  However, if you export to latex
you want to either

a) use a language the LaTeX `listings' package knows about or

b) map your language string to a language existing in the `listings'
package.


I like to put configuration files in src blocks as language `conf', so I
added the following to my .emacs file:

(add-to-list 'org-latex-listings-langs
               '(conf " "))

That is, I set the `listings' packages language to a blank (empty string
doesn't work) and only generic settings (i.e. no specific language
settings) are used when I tex the file.

HTH

Best regards
Robert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: babel stopping export after updating to org 8.3
  2015-09-15  4:35 ` Robert Klein
@ 2015-09-15  7:55   ` Aviv
  2015-09-15  9:21     ` Robert Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Aviv @ 2015-09-15  7:55 UTC (permalink / raw)
  To: emacs-orgmode

Robert Klein <roklein <at> roklein.de> writes:

> 
> Hi
> 
> Aviv wrote:
> 
> > Hi! 
> > 
> > I just upgraded to org 8.3 and am stuck with an export issue.
> > 
> > When I try to export a file with just "#+begin_src" and " "#+end_src" as the 
> > only lines, I get the error 
> > "user-error: No language for src block: (unnamed)". 
> > 
> > It seems like it is calling org-babel-exp-process-buffer -- but there is no 
> > reason that I can tell that is being called.  (org-export-babel-evaluate is 
> > definitely nil, thought other testing seems to indicate that shouldn't even 
> > matter)
> > 
> > I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
> > still have the issue with an empty init.el! 
> > 
> > Any idea what could be wrong?  Thanks!
> > 
> > 
> 
> You need to specify a language, e.g.
> 
> #+begin_src foo
> #+end_src
> 
> You can use any string for language.  However, if you export to latex
> you want to either
> 

Sorry, I should have clarified. I know that the error is a result of not 
specifying a language. But it wasn't necessary to specify one before, and it 
seems like it's better for it not to actually be required now either, unless 
I'm missing something -- should I also specify "pseudocode"? 

Also, if that was correct behavior, it should be described as a breaking 
change from 8.2 to 8.3, and it's not at http://orgmode.org/Changes.html .

--

So, I just checked the manual and it seems like "#+begin_src" does (now?) 
require a language block, but given that up until now this sort of export did 
not cause errors, it seems odd to require that all the sudden and break all 
exports that depend on it without alerting users. 

That said, I figured out the distinction between "emacs -q" and just using an
empty init.el file. It turns out that "-q" actually loads org version 8.2.10!
(while an empty init.el load 8.3.1) Though I'm not sure why that is either...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: babel stopping export after updating to org 8.3
  2015-09-15  7:55   ` Aviv
@ 2015-09-15  9:21     ` Robert Klein
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Klein @ 2015-09-15  9:21 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Aviv wrote:
> Robert Klein <roklein <at> roklein.de> writes:
> 
>>
>> Hi
>>
>> Aviv wrote:
>>
>>> Hi! 
>>>
>>> I just upgraded to org 8.3 and am stuck with an export issue.
>>>
>>> When I try to export a file with just "#+begin_src" and " "#+end_src" as the 
>>> only lines, I get the error 
>>> "user-error: No language for src block: (unnamed)". 
>>>
>>> It seems like it is calling org-babel-exp-process-buffer -- but there is no 
>>> reason that I can tell that is being called.  (org-export-babel-evaluate is 
>>> definitely nil, thought other testing seems to indicate that shouldn't even 
>>> matter)
>>>
>>> I've tried this in a clean "emacs -q" emacs and there is no issue -- but I 
>>> still have the issue with an empty init.el! 
>>>
>>> Any idea what could be wrong?  Thanks!
>>>
>>>
>>
>> You need to specify a language, e.g.
>>
>> #+begin_src foo
>> #+end_src
>>
>> You can use any string for language.  However, if you export to latex
>> you want to either
>>
> 
> Sorry, I should have clarified. I know that the error is a result of not 
> specifying a language. But it wasn't necessary to specify one before, and it 
> seems like it's better for it not to actually be required now either, unless 
> I'm missing something -- should I also specify "pseudocode"? 
> 
> Also, if that was correct behavior, it should be described as a breaking 
> change from 8.2 to 8.3, and it's not at http://orgmode.org/Changes.html .

For me org version 7.9.3f (came with emacs 24.3) a source block without
language also fails with °Source block missing language specification"
as soon as the source block isn't empty -- on 8.3.1 it also fails on
empty source blocks, too.

Afaik only begin_example and end_example don't need a language
specification.

Note: I get fooled by the language specification regularly; either I
forget to specify the language on the begin_src line (where I think it
is Ok to get an error -- I might want to have syntax highlighting or
even get the code executed)  or I put the language on the end_src line,
too, which imho should be ignored by the exporter :)



> 
> --
> 
> So, I just checked the manual and it seems like "#+begin_src" does (now?) 
> require a language block, but given that up until now this sort of export did 
> not cause errors, it seems odd to require that all the sudden and break all 
> exports that depend on it without alerting users. 
> 
> That said, I figured out the distinction between "emacs -q" and just using an
> empty init.el file. It turns out that "-q" actually loads org version 8.2.10!
> (while an empty init.el load 8.3.1) Though I'm not sure why that is either...

Do you have a ~/.emacs or ~/_emacs.el file?  See
http://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init
and
http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
for the details of emacs initialization.

Best regards
Robert

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-15  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15  4:25 babel stopping export after updating to org 8.3 Aviv
2015-09-15  4:35 ` Robert Klein
2015-09-15  7:55   ` Aviv
2015-09-15  9:21     ` Robert Klein

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).