emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] Tangling a LaTeX code block creates a .latex file
@ 2014-01-29 20:19 Sebastien Vauban
  2014-01-30  0:20 ` Bastien
  2014-01-30 10:40 ` Julian Gehring
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastien Vauban @ 2014-01-29 20:19 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

This one is quite new: tangling a code block in `latex' language now
produces a file with a `.latex' extension, instead of the common `.tex'
extension.

Example:

--8<---------------cut here---------------start------------->8---
* Letter composition

#+begin_src latex :noweb yes :tangle yes
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

% ...
#+end_src
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

PS- Org-mode version 8.2.5e (release_8.2.5e-111-g72ad52)

-- 
Sebastien Vauban

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

* Re: [bug] Tangling a LaTeX code block creates a .latex file
  2014-01-29 20:19 [bug] Tangling a LaTeX code block creates a .latex file Sebastien Vauban
@ 2014-01-30  0:20 ` Bastien
  2014-01-30 10:05   ` Sebastien Vauban
  2014-01-30 10:40 ` Julian Gehring
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2014-01-30  0:20 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hi Sébastien,

"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:

> This one is quite new: tangling a code block in `latex' language now
> produces a file with a `.latex' extension, instead of the common `.tex'
> extension.

AFAIU you need to (require 'ob-latex) first.

Could you say since when you get this error, since obviously it worked
before and you didn't change your setup wrt this?

Thanks,

-- 
 Bastien

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

* Re: [bug] Tangling a LaTeX code block creates a .latex file
  2014-01-30  0:20 ` Bastien
@ 2014-01-30 10:05   ` Sebastien Vauban
  2014-01-30 10:40     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2014-01-30 10:05 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> "Sebastien Vauban" writes:
>
>> This one is quite new: tangling a code block in `latex' language now
>> produces a file with a `.latex' extension, instead of the common
>> `.tex' extension.
>
> AFAIU you need to (require 'ob-latex) first.

I never did that explicitly.

But, doing it does effectively solve the problem at hand.

> Could you say since when you get this error, since obviously it worked
> before

The last time I tangled such an Org file containing `latex' code blocks
and generating (at that time) a `file.tex' was on 2014-01-13.

> and you didn't change your setup wrt this?

So did I think. Though, I had to edit `org-babel-load-languages' to
support Org installations with the latest Git version and Org
installations with the latest ELPA version:

--8<---------------cut here---------------start------------->8---
    (if (locate-library "ob-shell")     ; ob-sh renamed on Dec 13th, 2013
        (org-babel-do-load-languages
         'org-babel-load-languages
         '((R          . t)
           (awk        . t)
           (ditaa      . t)
           (dot        . t)
           (emacs-lisp . t)
           ;; (latex   . t)
           (ledger     . t)
           (org        . t)
           (shell      . t)
           (sql        . t)))
      (org-babel-do-load-languages
       'org-babel-load-languages
       '((R          . t)
         (awk        . t)
         (ditaa      . t)
         (dot        . t)
         (emacs-lisp . t)
         ;; (latex   . t)
         (ledger     . t)
         (org        . t)
         (sh         . t)
         (sql        . t))))
--8<---------------cut here---------------end--------------->8---

... and I did comment `latex', thinking that, in such cases, I should
certainly use #+begin/end_latex blocks instead.

In the file I tangled, this wasn't the case.

So, yes, I did change something, which lead to some peculiar
observation.

Thanks for putting me right on track!

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] Tangling a LaTeX code block creates a .latex file
  2014-01-29 20:19 [bug] Tangling a LaTeX code block creates a .latex file Sebastien Vauban
  2014-01-30  0:20 ` Bastien
@ 2014-01-30 10:40 ` Julian Gehring
  2014-01-30 10:43   ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: Julian Gehring @ 2014-01-30 10:40 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bastien

Hi,

This seems to be more general, since it also occurs for e.g. python 
source blocks.  Tangling a python source code block with the argument 
=:tangle yes= produces a '.python' instead of a '.py' file (at least 
with 8.2.5c).

Best wishes
Julian


On 01/29/2014 09:19 PM, Sebastien Vauban wrote:
> Hello,
>
> This one is quite new: tangling a code block in `latex' language now
> produces a file with a `.latex' extension, instead of the common `.tex'
> extension.
>
> Example:
>
> --8<---------------cut here---------------start------------->8---
> * Letter composition
>
> #+begin_src latex :noweb yes :tangle yes
> \documentclass{article}
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
>
> % ...
> #+end_src
> --8<---------------cut here---------------end--------------->8---
>
> Best regards,
>    Seb
>
> PS- Org-mode version 8.2.5e (release_8.2.5e-111-g72ad52)
>

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

* Re: [bug] Tangling a LaTeX code block creates a .latex file
  2014-01-30 10:05   ` Sebastien Vauban
@ 2014-01-30 10:40     ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2014-01-30 10:40 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:

>          ;; (latex   . t)

Yes, you need to uncomment this for the LaTeX source blocks to know
what extension to use.

-- 
 Bastien

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

* Re: [bug] Tangling a LaTeX code block creates a .latex file
  2014-01-30 10:40 ` Julian Gehring
@ 2014-01-30 10:43   ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2014-01-30 10:43 UTC (permalink / raw)
  To: Julian Gehring; +Cc: emacs-orgmode

Julian Gehring <julian.gehring@gmail.com> writes:

> This seems to be more general, since it also occurs for e.g. python
> source blocks.  Tangling a python source code block with the argument
> =:tangle yes= produces a '.python' instead of a '.py' file (at least
> with 8.2.5c).

You need something like this:

(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)))

I didn't check if this was documented carefully.
If it is not, please send a bug report.

Thanks!

-- 
 Bastien

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

end of thread, other threads:[~2014-01-30 10:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29 20:19 [bug] Tangling a LaTeX code block creates a .latex file Sebastien Vauban
2014-01-30  0:20 ` Bastien
2014-01-30 10:05   ` Sebastien Vauban
2014-01-30 10:40     ` Bastien
2014-01-30 10:40 ` Julian Gehring
2014-01-30 10:43   ` Bastien

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