* org babel: %% [removed source block]
@ 2018-11-29 11:38 Uwe Brauer
2018-11-29 13:03 ` Eric S Fraga
2018-11-29 16:32 ` Berry, Charles
0 siblings, 2 replies; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 11:38 UTC (permalink / raw)
To: emacs-orgmode
Hi
I have the following org file
#+BEGIN_SRC matlab :tangle test.m :padline no :results none
function [ll x]=mitest(A0,x0)
% initialization
format long
epsi=1.e-3;
nit=0;
nmaxit=200;
Delta=10;
A=A0;
while Delta>epsi & nit<nmaxit
nit=nit+1; % counter
#+END_SRC
The basic idea is.
That we do.
We also will
#+BEGIN_SRC matlab :tangle test.m :padline no
y=A*x0;
end
#+END_SRC
Now org-babel-tangle works nicely, but when I try to export the org file
to latex via org-export-dispatch
I obtain a latex file in which the source code is removed.
What do I miss??
I am asked in the export process whether I want to evaluate the code,
which I don't since it is a simple function not a code to be evaluated.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
@ 2018-11-29 13:03 ` Eric S Fraga
2018-11-29 13:19 ` Uwe Brauer
2018-11-29 16:32 ` Berry, Charles
1 sibling, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2018-11-29 13:03 UTC (permalink / raw)
To: emacs-orgmode
On Thursday, 29 Nov 2018 at 12:38, Uwe Brauer wrote:
> Now org-babel-tangle works nicely, but when I try to export the org
> file to latex via org-export-dispatch
I think the default is
:exports results
so you what you want is either
:exports both
or
:exports code
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 13:03 ` Eric S Fraga
@ 2018-11-29 13:19 ` Uwe Brauer
2018-11-29 13:46 ` John Kitchin
0 siblings, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 13:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
> On Thursday, 29 Nov 2018 at 12:38, Uwe Brauer wrote:
>> Now org-babel-tangle works nicely, but when I try to export the org
>> file to latex via org-export-dispatch
> I think the default is
> :exports results
> so you what you want is either
> :exports both
> or
> :exports code
Thanks, but I tried
#+begin_src matlab :tangle test.m :export code :wrap latex :padline no
function [ll x]=mitest(A0,x0)
% initialization
format long
epsi=1.e-3;
nit=0;
nmaxit=200;
Delta=10;
A=A0;
while Delta>epsi & nit<nmaxit
nit=nit+1; % counter
#+end_src
The basic idea is.
That we do.
We also will
#+begin_src matlab :tangle test.m :export both :wrap latex :padline no
y=A*x0;
end
#+end_src
And I obtain always:
\begin{document}
%% [removed source block]
The basic idea is.
That we do.
We also will
%% [removed source block]
\end{document}
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 13:19 ` Uwe Brauer
@ 2018-11-29 13:46 ` John Kitchin
2018-11-29 15:16 ` Uwe Brauer
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: John Kitchin @ 2018-11-29 13:46 UTC (permalink / raw)
To: org-mode-email
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
Maybe you need :exports and not :export.
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Thu, Nov 29, 2018 at 8:20 AM Uwe Brauer <oub@mat.ucm.es> wrote:
> >>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
>
> > On Thursday, 29 Nov 2018 at 12:38, Uwe Brauer wrote:
> >> Now org-babel-tangle works nicely, but when I try to export the org
> >> file to latex via org-export-dispatch
>
> > I think the default is
> > :exports results
> > so you what you want is either
> > :exports both
> > or
> > :exports code
>
> Thanks, but I tried
> #+begin_src matlab :tangle test.m :export code :wrap latex :padline no
> function [ll x]=mitest(A0,x0)
> % initialization
> format long
> epsi=1.e-3;
> nit=0;
> nmaxit=200;
> Delta=10;
> A=A0;
> while Delta>epsi & nit<nmaxit
> nit=nit+1; % counter
> #+end_src
>
> The basic idea is.
> That we do.
> We also will
>
> #+begin_src matlab :tangle test.m :export both :wrap latex :padline no
> y=A*x0;
> end
> #+end_src
>
>
> And I obtain always:
> \begin{document}
>
> %% [removed source block]
> The basic idea is.
> That we do.
> We also will
>
> %% [removed source block]
> \end{document}
>
[-- Attachment #2: Type: text/html, Size: 2185 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 13:46 ` John Kitchin
@ 2018-11-29 15:16 ` Uwe Brauer
2018-11-29 15:18 ` Uwe Brauer
2018-11-29 15:24 ` Uwe Brauer
2 siblings, 0 replies; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 15:16 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
>>> "John" == John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Maybe you need :exports and not :export.
> John
I tried
#+begin_src matlab :tangle test.m :exports code :padline no
function [ll x]=mitest(A0,x0)
% initialization
format long
epsi=1.e-3;
nit=0;
nmaxit=200;
Delta=10;
A=A0;
while Delta>epsi & nit<nmaxit
nit=nit+1; % counter
#+end_src
The basic idea is.
That we do.
We also will
#+begin_src matlab :tangle test.m :exports code :padline no
y=A*x0;
end
#+end_src
And obtain
\begin{document}
%% [removed source block]
The basic idea is.
That we do.
We also will
%% [removed source block]
\end{document}
Anybody has a working example?
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 13:46 ` John Kitchin
2018-11-29 15:16 ` Uwe Brauer
@ 2018-11-29 15:18 ` Uwe Brauer
2018-11-29 15:24 ` Uwe Brauer
2 siblings, 0 replies; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 15:18 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
>>> "John" == John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Maybe you need :exports and not :export.
> John
I also see
Code block produced no output.
org-babel-exp process matlab at position 250...
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 13:46 ` John Kitchin
2018-11-29 15:16 ` Uwe Brauer
2018-11-29 15:18 ` Uwe Brauer
@ 2018-11-29 15:24 ` Uwe Brauer
2 siblings, 0 replies; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 15:24 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
>>> "John" == John Kitchin <jkitchin@andrew.cmu.edu> writes:
> Maybe you need :exports and not :export.
> John
I tried also lisp
#+begin_src elisp :tangle test.el :exports code :padline no
(require 'ob-ipython)
(setq org-confirm-babel-evaluate t) ;don't prompt me to confirm everytime I want to evaluate a block
;;; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
#+end_src
The basic idea is.
That we do.
We also will
#+begin_src elisp :tangle test.el :exports code :padline no
(defun org-babel-execute:matlab-org (body params)
"Execute a block of matlab code with Babel."
(org-babel-execute:octave body params 'matlab))
#+end_src
But no, when exporting to latex the source code is removed.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
2018-11-29 13:03 ` Eric S Fraga
@ 2018-11-29 16:32 ` Berry, Charles
2018-11-29 16:57 ` Uwe Brauer
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
1 sibling, 2 replies; 12+ messages in thread
From: Berry, Charles @ 2018-11-29 16:32 UTC (permalink / raw)
To: Uwe Brauer; +Cc: org-mode-email
I cannot reproduce your export issue with org 9.1.14.
You need to provide more details.
Perhaps you have a header-arg set that you have not told us about?
What does C-c C-v C-i report when point is in each of your source blocks? I get
Lang: matlab
Properties:
:header-args nil
:header-args:matlab nil
Header Arguments:
:cache no
:exports code
:hlines no
:noweb no
:padline no
:results none
:session none
:tangle test.m
for the first.
HTH,
Chuck
> On Nov 29, 2018, at 3:38 AM, Uwe Brauer <oub@mat.ucm.es> wrote:
>
>
> Hi
>
> I have the following org file
> #+BEGIN_SRC matlab :tangle test.m :padline no :results none
> function [ll x]=mitest(A0,x0)
> % initialization
> format long
> epsi=1.e-3;
> nit=0;
> nmaxit=200;
> Delta=10;
> A=A0;
> while Delta>epsi & nit<nmaxit
> nit=nit+1; % counter
> #+END_SRC
>
> The basic idea is.
> That we do.
> We also will
>
> #+BEGIN_SRC matlab :tangle test.m :padline no
> y=A*x0;
> end
> #+END_SRC
>
> Now org-babel-tangle works nicely, but when I try to export the org file
> to latex via org-export-dispatch
>
> I obtain a latex file in which the source code is removed.
>
> What do I miss??
>
>
> I am asked in the export process whether I want to evaluate the code,
> which I don't since it is a simple function not a code to be evaluated.
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 16:32 ` Berry, Charles
@ 2018-11-29 16:57 ` Uwe Brauer
2018-11-29 17:25 ` John Kitchin
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
1 sibling, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 16:57 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
> I cannot reproduce your export issue with org 9.1.14.
> You need to provide more details.
Ok, I searched already my custom settings.
> Perhaps you have a header-arg set that you have not told us about?
> What does C-c C-v C-i report when point is in each of your source blocks? I get
> Lang: matlab
> Properties:
> :header-args nil
> :header-args:matlab nil
> Header Arguments:
> :cache no
> :exports code
> :hlines no
> :noweb no
> :padline no
> :results none
> :session none
> :tangle test.m
Her is my output
The only difference I can find is the results/replace entry.
Not sure what to do.
Lang: matlab
Properties:
:header-args nil
:header-args:matlab nil
Header Arguments:
:cache no
:exports code
:hlines no
:noweb no
:padline no
:results replace
:session none
:tangle test.m
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 16:57 ` Uwe Brauer
@ 2018-11-29 17:25 ` John Kitchin
0 siblings, 0 replies; 12+ messages in thread
From: John Kitchin @ 2018-11-29 17:25 UTC (permalink / raw)
To: org-mode-email
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
Have you tried this with an emacs -q? Your examples work as expected in
emacs -q for me.
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Thu, Nov 29, 2018 at 11:58 AM Uwe Brauer <oub@mat.ucm.es> wrote:
> >>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
>
> > I cannot reproduce your export issue with org 9.1.14.
> > You need to provide more details.
>
> Ok, I searched already my custom settings.
> > Perhaps you have a header-arg set that you have not told us about?
>
> > What does C-c C-v C-i report when point is in each of your source
> blocks? I get
>
> > Lang: matlab
> > Properties:
> > :header-args nil
> > :header-args:matlab nil
> > Header Arguments:
> > :cache no
> > :exports code
> > :hlines no
> > :noweb no
> > :padline no
> > :results none
> > :session none
> > :tangle test.m
>
>
> Her is my output
>
> The only difference I can find is the results/replace entry.
>
> Not sure what to do.
>
>
> Lang: matlab
> Properties:
> :header-args nil
> :header-args:matlab nil
> Header Arguments:
> :cache no
> :exports code
> :hlines no
> :noweb no
> :padline no
> :results replace
> :session none
> :tangle test.m
>
[-- Attachment #2: Type: text/html, Size: 2606 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [SOLVED] (was: org babel: %% [removed source block])
2018-11-29 16:32 ` Berry, Charles
2018-11-29 16:57 ` Uwe Brauer
@ 2018-11-29 17:27 ` Uwe Brauer
2018-11-29 22:20 ` [SOLVED] Nick Dokos
1 sibling, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2018-11-29 17:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
> I cannot reproduce your export issue with org 9.1.14.
> You need to provide more details.
Sorry for the noise. I just realised that a very very long time ago I
installed a function remove-src-blk-export, which, uhh, removes source
blocks.
I removed that function and everything works as expected.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [SOLVED]
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
@ 2018-11-29 22:20 ` Nick Dokos
0 siblings, 0 replies; 12+ messages in thread
From: Nick Dokos @ 2018-11-29 22:20 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
>
> > I cannot reproduce your export issue with org 9.1.14.
> > You need to provide more details.
>
> Sorry for the noise. I just realised that a very very long time ago I
> installed a function remove-src-blk-export, which, uhh, removes source
> blocks.
>
> I removed that function and everything works as expected.
I was going to ask who produced that unfamiliar-looking "%% [removed
source block]" :-) Glad you figured it out.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-11-29 22:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
2018-11-29 13:03 ` Eric S Fraga
2018-11-29 13:19 ` Uwe Brauer
2018-11-29 13:46 ` John Kitchin
2018-11-29 15:16 ` Uwe Brauer
2018-11-29 15:18 ` Uwe Brauer
2018-11-29 15:24 ` Uwe Brauer
2018-11-29 16:32 ` Berry, Charles
2018-11-29 16:57 ` Uwe Brauer
2018-11-29 17:25 ` John Kitchin
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
2018-11-29 22:20 ` [SOLVED] Nick Dokos
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.