emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Code vanishes on export
@ 2011-08-24 10:13 Vikas Rawal
  2011-08-24 10:23 ` Sebastien Vauban
  2011-08-24 13:58 ` Eric Schulte
  0 siblings, 2 replies; 9+ messages in thread
From: Vikas Rawal @ 2011-08-24 10:13 UTC (permalink / raw)
  To: emacs-orgmode

I have been having some strange behaviour with my orgmode files
containing R code. When I export the file (to html), the code vanishes
and is replaced by value that is calculated by the code. I obviously
do not want the code to be removed from my org file.

I did not have this problem earlier and it seems to have appeared
after a recent upgrade.

Could someone please help trace the problem.

Vikas

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

* Re: Code vanishes on export
  2011-08-24 10:13 Code vanishes on export Vikas Rawal
@ 2011-08-24 10:23 ` Sebastien Vauban
  2011-08-24 13:58 ` Eric Schulte
  1 sibling, 0 replies; 9+ messages in thread
From: Sebastien Vauban @ 2011-08-24 10:23 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Vikas,

Vikas Rawal wrote:
> I have been having some strange behaviour with my orgmode files
> containing R code. When I export the file (to html), the code vanishes
> and is replaced by value that is calculated by the code. I obviously
> do not want the code to be removed from my org file.
>
> I did not have this problem earlier and it seems to have appeared
> after a recent upgrade.
>
> Could someone please help trace the problem.

Could you demonstrate the problem in an ECM (example, complete... but
minimal)?

Then, (I hope that) it would not be too difficult for us to help you.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Code vanishes on export
  2011-08-24 10:13 Code vanishes on export Vikas Rawal
  2011-08-24 10:23 ` Sebastien Vauban
@ 2011-08-24 13:58 ` Eric Schulte
  2011-08-24 14:45   ` suvayu ali
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2011-08-24 13:58 UTC (permalink / raw)
  To: emacs-orgmode

Vikas Rawal <vikaslists@agrarianresearch.org> writes:

> I have been having some strange behaviour with my orgmode files
> containing R code. When I export the file (to html), the code vanishes
> and is replaced by value that is calculated by the code. I obviously
> do not want the code to be removed from my org file.
>
> I did not have this problem earlier and it seems to have appeared
> after a recent upgrade.
>
> Could someone please help trace the problem.
>

There are ways of controlling whether code or results or both or neither
are included in code export.  Please see the following sections of the
manual.

http://orgmode.org/manual/Working-With-Source-Code.html
http://orgmode.org/manual/Header-arguments.html
http://orgmode.org/manual/exports.html

If those don't solve your problem then please (as suggested elsewhere in
this thread) do share a complete minimal example.

Thanks -- Eric

>
> Vikas
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: Code vanishes on export
  2011-08-24 13:58 ` Eric Schulte
@ 2011-08-24 14:45   ` suvayu ali
  2011-08-24 17:36     ` cberry
  2011-08-24 23:37     ` Vikas Rawal
  0 siblings, 2 replies; 9+ messages in thread
From: suvayu ali @ 2011-08-24 14:45 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

On Wed, Aug 24, 2011 at 3:58 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
> Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>
>> I obviously do not want the code to be removed from my org file.
>>
>
> There are ways of controlling whether code or results or both or neither
> are included in code export.
>

As far as I understand from Vikas' last remark, his org file is getting
changed.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Code vanishes on export
  2011-08-24 14:45   ` suvayu ali
@ 2011-08-24 17:36     ` cberry
  2011-08-24 19:45       ` Eric Schulte
  2011-08-24 23:37     ` Vikas Rawal
  1 sibling, 1 reply; 9+ messages in thread
From: cberry @ 2011-08-24 17:36 UTC (permalink / raw)
  To: emacs-orgmode

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Eric,
>
> On Wed, Aug 24, 2011 at 3:58 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
>> Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>>
>>> I obviously do not want the code to be removed from my org file.
>>>
>>
>> There are ways of controlling whether code or results or both or neither
>> are included in code export.
>>
>
> As far as I understand from Vikas' last remark, his org file is getting
> changed.

FWIW, I experienced this myself. "#+begin_src R" blocks vanished from
the *.org file during export (but I was saved by version control!).

I think this behavior showed up after 7.7, but I cannot reproduce it now
(I did a git pull at release_7.7.170.gcaaad.dirty and have since modified
the *.org file on which it happened).

IIRC, it did not happen for exports when :export never was set for the
buffer and not circumvented by  '#+begin_src R :eval t'. 

Maybe this has (coincidentally) been corrected by the recent update of
ob-exp.el, ob.el, and org-exp-blocks.el?
 
Chuck


-- 
Charles C. Berry     

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

* Re: Code vanishes on export
  2011-08-24 17:36     ` cberry
@ 2011-08-24 19:45       ` Eric Schulte
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Schulte @ 2011-08-24 19:45 UTC (permalink / raw)
  To: cberry; +Cc: emacs-orgmode

Can you supply a minimal example file with instructions to reproduce
this behavior?

Thanks -- Eric

cberry@tajo.ucsd.edu writes:

> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
>> Hi Eric,
>>
>> On Wed, Aug 24, 2011 at 3:58 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
>>> Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>>>
>>>> I obviously do not want the code to be removed from my org file.
>>>>
>>>
>>> There are ways of controlling whether code or results or both or neither
>>> are included in code export.
>>>
>>
>> As far as I understand from Vikas' last remark, his org file is getting
>> changed.
>
> FWIW, I experienced this myself. "#+begin_src R" blocks vanished from
> the *.org file during export (but I was saved by version control!).
>
> I think this behavior showed up after 7.7, but I cannot reproduce it now
> (I did a git pull at release_7.7.170.gcaaad.dirty and have since modified
> the *.org file on which it happened).
>
> IIRC, it did not happen for exports when :export never was set for the
> buffer and not circumvented by  '#+begin_src R :eval t'. 
>
> Maybe this has (coincidentally) been corrected by the recent update of
> ob-exp.el, ob.el, and org-exp-blocks.el?
>  
> Chuck

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: Code vanishes on export
  2011-08-24 14:45   ` suvayu ali
  2011-08-24 17:36     ` cberry
@ 2011-08-24 23:37     ` Vikas Rawal
       [not found]       ` <87obzez7vy.fsf@tajo.ucsd.edu>
  2011-08-25  7:11       ` suvayu ali
  1 sibling, 2 replies; 9+ messages in thread
From: Vikas Rawal @ 2011-08-24 23:37 UTC (permalink / raw)
  To: emacs-orgmode

> 
> As far as I understand from Vikas' last remark, his org file is getting
> changed.

This is correct. I am glad at least one more person has reported
having faced the problem.

For the last few days, I have been manually copying my org file before
every export to save it. 

The problem is that the file I am talking about reads a mysql
database, and does a lot of processing using R. The file will simply
not work for anyone else because you will not have the database that
it needs.

And even on that file, it is not as if the code vanishes everytime I
export. It happens on some occassions, and at the moment, I am unable
to say what triggers it.

I am aware that I am being ridiculously vague. But please give me a
day to experiment and I will hopefully figure out at least what
exactly is happenning. In the meanwhile, I am sure it will help if
somebody else who may be facing the same problem can report with some
details.

Vikas

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

* Re: Code vanishes on export
       [not found]       ` <87obzez7vy.fsf@tajo.ucsd.edu>
@ 2011-08-25  0:08         ` Vikas Rawal
  0 siblings, 0 replies; 9+ messages in thread
From: Vikas Rawal @ 2011-08-25  0:08 UTC (permalink / raw)
  To: cberry; +Cc: emacs-orgmode

> 
> If you kave not updated your org *.el files lately, I suggest you do so
> before going any further. 

I just did a git pull....

Let me see if it solves the problem.

Vikas

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

* Re: Code vanishes on export
  2011-08-24 23:37     ` Vikas Rawal
       [not found]       ` <87obzez7vy.fsf@tajo.ucsd.edu>
@ 2011-08-25  7:11       ` suvayu ali
  1 sibling, 0 replies; 9+ messages in thread
From: suvayu ali @ 2011-08-25  7:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi Vikas,

On Thu, Aug 25, 2011 at 1:37 AM, Vikas Rawal
<vikaslists@agrarianresearch.org> wrote:
> For the last few days, I have been manually copying my org file before
> every export to save it.

Maybe an easier option would be make the buffer read-only before
export. `C-x C-q'

> The problem is that the file I am talking about reads a mysql
> database, and does a lot of processing using R. The file will simply
> not work for anyone else because you will not have the database that
> it needs.
>

Maybe for the ECM (Minimal Complete Example, in French) you could
substitute the reading from sql part by a table with dummy data which
is then processed by some small R block.

-- 
Suvayu

Open source is the future. It sets us free.

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

end of thread, other threads:[~2011-08-25  7:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 10:13 Code vanishes on export Vikas Rawal
2011-08-24 10:23 ` Sebastien Vauban
2011-08-24 13:58 ` Eric Schulte
2011-08-24 14:45   ` suvayu ali
2011-08-24 17:36     ` cberry
2011-08-24 19:45       ` Eric Schulte
2011-08-24 23:37     ` Vikas Rawal
     [not found]       ` <87obzez7vy.fsf@tajo.ucsd.edu>
2011-08-25  0:08         ` Vikas Rawal
2011-08-25  7:11       ` suvayu ali

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