Re: [O] Misc. questions

2016-10-05 Thread Peter Davis
On Tue, Oct 4, 2016, at 03:02 PM, Peter Davis wrote:
> 
> 3) Still trying to find a way to get to DocBook XML (4, it turns out). I
> know the export page says to output texi (see #2 above) and then convert
> with makeinfo, but I have my doubts.  Of course, once I get texi working
> I'll be able to see for myself what information, if any, is lost.
> 

I now have a working routine for this on Windows 10, though it's not
pretty:

 1. Edit file in emacs org-mode
 2. Export to TeXInfo (texi) format
 3. Open Ubuntu/Bash window:
a. cp ../../../mnt/c/Users/pdavis/org/filename.texi ./
b. makeinfo --docbook filename.texi
c. cp ./filename.xml ../../../mnt/c/Users/pdavis/org
 4. Open filename.xml in emacs and replace header with db-xml-hdr.xml
 5. Open edited filename.xml in ArborText

Tedious, but it works. I can probably find ways to automate some of it,
such as a bash shell script to copy the file, run makeinfo, substitute
the header, and copy it back.

Thanks,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Misc. questions

2016-10-05 Thread Peter Davis


On Tue, Oct 4, 2016, at 04:21 PM, Stig Brautaset wrote:
> Peter Davis  writes:
> > 2) How does the export menu get set? 
> 
> I noticed there's a variable to control it, but whether that's the whole
> story I don't know. Anyway, try:
> 
> : M-x customize-variable RET org-export-backends
> 
> I'm afraid I can't help with the remaining questions.

Ah! The help (C-h v org-export-backends) for this variable says it must
be set before org.el is loaded. Otherwise, it can be modified with
customize, or with some code which is shown in the help.

It appears to have had the initial value (ascii html icalendar latex),
and also has md on my currently running emacs.

Thanks!

-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Misc. questions

2016-10-05 Thread Colin Baxter

On Tue, Oct 04 2016, John Hendy wrote:

> On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis  wrote:
>> I apologize in advance for the flood of questions, but I'm using org in
>> new ways now for creating documentation, and running into a lot of
>> issues.
>>
>> 1) Is there a way to automatically say "yes" to all the "Evaluate code
>> block...?" questions when I export, so I don't have to keep typing "yes"
>> over and over again?
>
- Snip lots ---

I prefer to put nil evaluate as local variables at the very end of your org 
file:

# Local Variables:
# org-confirm-babel-evaluate: nil
# End:



Re: [O] Misc. questions

2016-10-04 Thread Thomas S. Dye
Aloha pd,

Peter Davis writes:

>> > 4) Is json a valid language for #+BEGIN_SRC? I don't see any syntax
>> > highlighting in HTML or LaTeX/PDF output, and I'm getting errors from
>> > LaTeX:
>> >
>> > ! Package Listings Error: language json undefined.
>> >
>> > Come to think of it, I think the org-mode doc lists both JavaScript (js)
>> > and JSON (json) as supported languages for code blocks, but the Listings
>> > LaTeX package doesn't list either of these.
>> >
>> 
>> Not sure where that was. I use this page as my reference and don't see
>> it (but do see js):
>> - http://orgmode.org/worg/org-contrib/babel/languages.html

See org-latex-custom-lang-environments, where you'll be able to map the
Org mode language name to one recognized by the listings (or minted)
LaTeX package.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Misc. questions

2016-10-04 Thread Peter Davis

On Tue, Oct 4, 2016, at 03:57 PM, John Hendy wrote:
> On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis  wrote:
> > I apologize in advance for the flood of questions, but I'm using org in
> > new ways now for creating documentation, and running into a lot of
> > issues.
> >
> > 1) Is there a way to automatically say "yes" to all the "Evaluate code
> > block...?" questions when I export, so I don't have to keep typing "yes"
> > over and over again?
> 
> I googled "stop orgmode babel having to confirm" and got these:
> -
> http://emacs.stackexchange.com/questions/23946/how-can-i-stop-the-confirmation-to-evaluate-source-code-when-exporting-to-html
> -
> http://stackoverflow.com/questions/29952543/how-do-i-prevent-org-mode-from-executing-all-of-the-babel-source-blocks
> 
> Both refer to babel variables you can set.[1] You can put them in a
> single file (at the very top):
> 
> # -*- org-confirm-babel-evaluate: nil; -*-
> 
> Or add this to .emacs
> 
> (setq org-confirm-babel-evaluate nil)
> 
> Or use #+bind[2] within a file (similar to the first local variable
> example).
> 

Thanks, John (and others) for this! You've saved me a lot of annoying
typing.

> >
> > 2) How does the export menu get set? I'm loading, for example,
> > ox-texinfo, but I don't see the option to export texinfo when I type C-c
> > C-e.  I'm also loading ox-pandoc, which shows me a slew of export
> > formats on my Mac, but only two, file and buffer, on my Win10 machine.
> >
> 
> Guessing it's something on your side? Having never used it, I just added:
> 
> (require 'ox-texinfo)
> 
> I get an [i] option after C-e with various "Export to texinfo" options.

Interestingly, if I do M-x load-library ox-texinfo in emacs, it works
and I get the texinfo options. However, just loading it in my startup
file doesn't seem to be working. Curious.

> 
> > 4) Is json a valid language for #+BEGIN_SRC? I don't see any syntax
> > highlighting in HTML or LaTeX/PDF output, and I'm getting errors from
> > LaTeX:
> >
> > ! Package Listings Error: language json undefined.
> >
> > Come to think of it, I think the org-mode doc lists both JavaScript (js)
> > and JSON (json) as supported languages for code blocks, but the Listings
> > LaTeX package doesn't list either of these.
> >
> 
> Not sure where that was. I use this page as my reference and don't see
> it (but do see js):
> - http://orgmode.org/worg/org-contrib/babel/languages.html

Hmmm. I don't remember where I saw it offhand, but js didn't work
either. This page now tells me I need to have node.js installed.

Thanks!
-pd




-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Misc. questions

2016-10-04 Thread Stig Brautaset
Peter Davis  writes:

> I apologize in advance for the flood of questions, but I'm using org in
> new ways now for creating documentation, and running into a lot of
> issues.
>
> 1) Is there a way to automatically say "yes" to all the "Evaluate code
> block...?" questions 

Yes, I believe so. Try

: M-x customize-variable RET org-export-babel-evaluate RET

> 2) How does the export menu get set? 

I noticed there's a variable to control it, but whether that's the whole
story I don't know. Anyway, try:

: M-x customize-variable RET org-export-backends

I'm afraid I can't help with the remaining questions.

Stig
-- 
: Stig Brautaset, GNU Emacs 25.1.1, Org-mode version 8.3.6




Re: [O] Misc. questions

2016-10-04 Thread Thomas S. Dye
Aloha pd,

Peter Davis writes:

> I apologize in advance for the flood of questions, but I'm using org in
> new ways now for creating documentation, and running into a lot of
> issues.
>
> 1) Is there a way to automatically say "yes" to all the "Evaluate code
> block...?" questions when I export, so I don't have to keep typing "yes"
> over and over again?

See org-confirm-babel-evaluate, then set it to nil.


hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Misc. questions

2016-10-04 Thread John Hendy
On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis  wrote:
> I apologize in advance for the flood of questions, but I'm using org in
> new ways now for creating documentation, and running into a lot of
> issues.
>
> 1) Is there a way to automatically say "yes" to all the "Evaluate code
> block...?" questions when I export, so I don't have to keep typing "yes"
> over and over again?

I googled "stop orgmode babel having to confirm" and got these:
- 
http://emacs.stackexchange.com/questions/23946/how-can-i-stop-the-confirmation-to-evaluate-source-code-when-exporting-to-html
- 
http://stackoverflow.com/questions/29952543/how-do-i-prevent-org-mode-from-executing-all-of-the-babel-source-blocks

Both refer to babel variables you can set.[1] You can put them in a
single file (at the very top):

# -*- org-confirm-babel-evaluate: nil; -*-

Or add this to .emacs

(setq org-confirm-babel-evaluate nil)

Or use #+bind[2] within a file (similar to the first local variable example).

>
> 2) How does the export menu get set? I'm loading, for example,
> ox-texinfo, but I don't see the option to export texinfo when I type C-c
> C-e.  I'm also loading ox-pandoc, which shows me a slew of export
> formats on my Mac, but only two, file and buffer, on my Win10 machine.
>

Guessing it's something on your side? Having never used it, I just added:

(require 'ox-texinfo)

I get an [i] option after C-e with various "Export to texinfo" options.

> 3) Still trying to find a way to get to DocBook XML (4, it turns out). I
> know the export page says to output texi (see #2 above) and then convert
> with makeinfo, but I have my doubts.  Of course, once I get texi working
> I'll be able to see for myself what information, if any, is lost.
>

No experience, so can't speak to this.

> 4) Is json a valid language for #+BEGIN_SRC? I don't see any syntax
> highlighting in HTML or LaTeX/PDF output, and I'm getting errors from
> LaTeX:
>
> ! Package Listings Error: language json undefined.
>
> Come to think of it, I think the org-mode doc lists both JavaScript (js)
> and JSON (json) as supported languages for code blocks, but the Listings
> LaTeX package doesn't list either of these.
>

Not sure where that was. I use this page as my reference and don't see
it (but do see js):
- http://orgmode.org/worg/org-contrib/babel/languages.html

> Thanks!
> -pd
>


Hope that helps,
John

[1] the manual where these are mentioned:
http://orgmode.org/manual/Code-evaluation-security.html
[2] http://orgmode.org/manual/Export-settings.html

> --
>   Peter Davis
>   www.techcurmudgeon.com
>