Re: [O] Exporting org-mode source

2014-05-08 Thread Sebastien Vauban
Vikas Rawal wrote:
 On 04-May-2014, at 11:46 am, Han Fan visaya...@gmail.com wrote:
 Fletcher Charest fletcher.char...@gmail.com writes:
 
 Sorry if I misunderstood... If you create an Org source block like
 this with nothing inside:
 
 #+begin_src org
 
 #+end_src
 
 ...then, with your cursor inside, enter it with C-c ', write your
 org tree, and validate with C-c ' again, then export... Does it do
 what you want?
 
 This is what works for me

 #+begin_src org :exports code

 #+end_src

 It does not work without :exports code”

I don't understand that, as :exports code is the default for Org code
blocks, as shown by:

  ╭
  │ org-babel-default-header-args:org is a variable defined in `ob-org.el'.
  │ Its value is ((:results . raw silent) (:exports . code))
  │
  │ Documentation:
  │ Default arguments for evaluating a org source block.
  ╰

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Exporting org-mode source

2014-05-08 Thread Sebastien Vauban
Vikas Rawal wrote:
 It does not work without :exports code”
 
 I don't understand that, as :exports code is the default for Org code
 blocks, as shown by:
 
  ╭
  │ org-babel-default-header-args:org is a variable defined in `ob-org.el'.
  │ Its value is ((:results . raw silent) (:exports . code))
  │
  │ Documentation:
  │ Default arguments for evaluating a org source block.
  ╰

 Indeed, my bad.

 I had #+property: exports results” in the file header, something that I have
 been routinely copying from one file to another, since usually do not want to
 export code.

 Sorry.

Indeed, that explains a lot of the misunderstandings!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Exporting org-mode source

2014-05-04 Thread Vikas Rawal
 
 Vikas Rawal vikaslists at agrarianresearch.org writes:
 
 
 I think I could not express my objective clearly.I want the org code block 
 to be exported literally. 
 
 
 Indent lines that begin with *, is this what you want?

I am not exactly sure what you are suggesting. The block below does not work 
for me. It is not exported literally.


 #+BEGIN_SRC org
 ** What are the major disputes in the literature
 *** adulterated text
 Instrument cultivated alteration any favourable expression law far
 nor. Both new like tore but year. An from mean on with when sing pain.
 Oh to as principles devonshire companions unsatiable an delightful.
 The ourselves suffering the sincerity. Inhabit her manners adapted age
 certain. Debating offended at branched striking be subjects.
 #+END_SRC
 
 

Vikas


Re: [O] Exporting org-mode source

2014-05-04 Thread Han Fan
Vikas Rawal vikaslists at agrarianresearch.org writes:

 
  
  Vikas Rawal vikaslists at agrarianresearch.org writes:
  
  
  I think I could not express my objective clearly.I want the org code 
block 
  to be exported literally. 
  
  
  Indent lines that begin with *, is this what you want?
 
 I am not exactly sure what you are suggesting. The block below does not 
work for me. It is not exported literally.
 
  #+BEGIN_SRC org
  ** What are the major disputes in the literature
  *** adulterated text
  Instrument cultivated alteration any favourable expression law far
  nor. Both new like tore but year. An from mean on with when sing pain.
  Oh to as principles devonshire companions unsatiable an delightful.
  The ourselves suffering the sincerity. Inhabit her manners adapted age
  certain. Debating offended at branched striking be subjects.
  #+END_SRC
  
  
 
 Vikas
 
 
There is a white space before *, but I didn't see that in your quote, is
that because of your newsgroup reader client?
See the link below:
http://article.gmane.org/gmane.emacs.orgmode/85805
Lines start with * is exported to headings only when there is no white
space before *.

Sorry for my broken English.







Re: [O] Exporting org-mode source

2014-05-04 Thread Fletcher Charest
Hi,

Sorry if I misunderstood... If you create an Org source block like this
with nothing inside:

#+begin_src org

#+end_src

...then, with your cursor inside, enter it with C-c ', write your org tree,
and validate with C-c ' again, then export... Does it do what you want?

FC



On Sun, May 4, 2014 at 10:04 AM, Vikas Rawal 
vikasli...@agrarianresearch.org wrote:

 
  Vikas Rawal vikaslists at agrarianresearch.org writes:
 
 
  I think I could not express my objective clearly.I want the org code
 block
  to be exported literally.
 
 
  Indent lines that begin with *, is this what you want?

 I am not exactly sure what you are suggesting. The block below does not
 work for me. It is not exported literally.


  #+BEGIN_SRC org
  ** What are the major disputes in the literature
  *** adulterated text
  Instrument cultivated alteration any favourable expression law far
  nor. Both new like tore but year. An from mean on with when sing pain.
  Oh to as principles devonshire companions unsatiable an delightful.
  The ourselves suffering the sincerity. Inhabit her manners adapted age
  certain. Debating offended at branched striking be subjects.
  #+END_SRC
 
 

 Vikas



Re: [O] Exporting org-mode source

2014-05-04 Thread Han Fan
Fletcher Charest fletcher.char...@gmail.com writes:

 Hi,

 Sorry if I misunderstood... If you create an Org source block like this with 
 nothing inside:

 #+begin_src org

 #+end_src

 ...then, with your cursor inside, enter it with C-c ', write your org tree, 
 and validate with C-c ' again, then export... Does it do
 what you want?

 FC

 On Sun, May 4, 2014 at 10:04 AM, Vikas Rawal 
 vikasli...@agrarianresearch.org wrote:

 
  Vikas Rawal vikaslists at agrarianresearch.org writes:
 
 
  I think I could not express my objective clearly.I want the org code 
 block
  to be exported literally.
 
 
  Indent lines that begin with *, is this what you want?

 I am not exactly sure what you are suggesting. The block below does not 
 work for me. It is not exported literally.

  #+BEGIN_SRC org
  ** What are the major disputes in the literature
  *** adulterated text
  Instrument cultivated alteration any favourable expression law far
  nor. Both new like tore but year. An from mean on with when sing pain.
  Oh to as principles devonshire companions unsatiable an delightful.
  The ourselves suffering the sincerity. Inhabit her manners adapted age
  certain. Debating offended at branched striking be subjects.
  #+END_SRC
 
 

 Vikas

Perfect solution.




Re: [O] Exporting org-mode source

2014-05-04 Thread Vikas Rawal

On 04-May-2014, at 11:46 am, Han Fan visaya...@gmail.com wrote:

 Fletcher Charest fletcher.char...@gmail.com writes:
 
 Hi,
 
 Sorry if I misunderstood... If you create an Org source block like this with 
 nothing inside:
 
 #+begin_src org
 
 #+end_src
 
 ...then, with your cursor inside, enter it with C-c ', write your org tree, 
 and validate with C-c ' again, then export... Does it do
 what you want?
 
 FC
 
This is what works for me

#+begin_src org :exports code

#+end_src

It does not work without :exports code”

I found the solution here: 
http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01117.html

Vikas






Re: [O] Exporting org-mode source

2014-05-03 Thread Sebastien Vauban
Vikas Rawal wrote:
 I want to export a block of org-mode source code in a tutorial I am
 writing.

 I have tried variations of the following. But nothing seems to give me
 org-mode code in the exported pdf.

 #+BEGIN_SRC org :results code replace
 org-mode code here
 #+END_SRC

 What is the right way to do it?

The following Org code block...

#+begin_src org
,#+begin_src LANGUAGE HEADER-ARGS
BODY
,#+end_src
#+end_src

... works for me (that is, is fontified correctly in the HTML export).

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Exporting org-mode source

2014-05-02 Thread Vikas Rawal
I want to export a block of org-mode source code in a tutorial I am writing. 

I have tried variations of the following. But nothing seems to give me org-mode 
code in the exported pdf.

#+BEGIN_SRC org :results code replace

org-mode code here

#+END_SRC

What is the right way to do it? 

Vikas