emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Misc. questions
@ 2016-10-04 19:02 Peter Davis
  2016-10-04 19:57 ` John Hendy
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Peter Davis @ 2016-10-04 19:02 UTC (permalink / raw)
  To: emacs-orgmode

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?

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.

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.

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.

Thanks!
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com

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

* Re: Misc. questions
  2016-10-04 19:02 Misc. questions Peter Davis
@ 2016-10-04 19:57 ` John Hendy
  2016-10-04 20:26   ` Peter Davis
  2016-10-05 10:22   ` Colin Baxter
  2016-10-04 19:58 ` Thomas S. Dye
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: John Hendy @ 2016-10-04 19:57 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis <pfd@pfdstudio.com> 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
>

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

* Re: Misc. questions
  2016-10-04 19:02 Misc. questions Peter Davis
  2016-10-04 19:57 ` John Hendy
@ 2016-10-04 19:58 ` Thomas S. Dye
  2016-10-04 20:21 ` Stig Brautaset
  2016-10-05 17:35 ` Peter Davis
  3 siblings, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2016-10-04 19:58 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

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

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

* Re: Misc. questions
  2016-10-04 19:02 Misc. questions Peter Davis
  2016-10-04 19:57 ` John Hendy
  2016-10-04 19:58 ` Thomas S. Dye
@ 2016-10-04 20:21 ` Stig Brautaset
  2016-10-05 13:08   ` Peter Davis
  2016-10-05 17:35 ` Peter Davis
  3 siblings, 1 reply; 9+ messages in thread
From: Stig Brautaset @ 2016-10-04 20:21 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> 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

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

* Re: Misc. questions
  2016-10-04 19:57 ` John Hendy
@ 2016-10-04 20:26   ` Peter Davis
  2016-10-04 20:50     ` Thomas S. Dye
  2016-10-05 10:22   ` Colin Baxter
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Davis @ 2016-10-04 20:26 UTC (permalink / raw)
  To: emacs-orgmode


On Tue, Oct 4, 2016, at 03:57 PM, John Hendy wrote:
> On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis <pfd@pfdstudio.com> 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

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

* Re: Misc. questions
  2016-10-04 20:26   ` Peter Davis
@ 2016-10-04 20:50     ` Thomas S. Dye
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2016-10-04 20:50 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

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

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

* Re: Misc. questions
  2016-10-04 19:57 ` John Hendy
  2016-10-04 20:26   ` Peter Davis
@ 2016-10-05 10:22   ` Colin Baxter
  1 sibling, 0 replies; 9+ messages in thread
From: Colin Baxter @ 2016-10-05 10:22 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode, Peter Davis


On Tue, Oct 04 2016, John Hendy wrote:

> On Tue, Oct 4, 2016 at 2:02 PM, Peter Davis <pfd@pfdstudio.com> 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:

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

* Re: Misc. questions
  2016-10-04 20:21 ` Stig Brautaset
@ 2016-10-05 13:08   ` Peter Davis
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Davis @ 2016-10-05 13:08 UTC (permalink / raw)
  To: emacs-orgmode



On Tue, Oct 4, 2016, at 04:21 PM, Stig Brautaset wrote:
> Peter Davis <pfd@pfdstudio.com> 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

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

* Re: Misc. questions
  2016-10-04 19:02 Misc. questions Peter Davis
                   ` (2 preceding siblings ...)
  2016-10-04 20:21 ` Stig Brautaset
@ 2016-10-05 17:35 ` Peter Davis
  3 siblings, 0 replies; 9+ messages in thread
From: Peter Davis @ 2016-10-05 17:35 UTC (permalink / raw)
  To: emacs-orgmode

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

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

end of thread, other threads:[~2016-10-05 17:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 19:02 Misc. questions Peter Davis
2016-10-04 19:57 ` John Hendy
2016-10-04 20:26   ` Peter Davis
2016-10-04 20:50     ` Thomas S. Dye
2016-10-05 10:22   ` Colin Baxter
2016-10-04 19:58 ` Thomas S. Dye
2016-10-04 20:21 ` Stig Brautaset
2016-10-05 13:08   ` Peter Davis
2016-10-05 17:35 ` Peter Davis

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