Git Product home page Git Product logo

Comments (6)

kepi avatar kepi commented on August 22, 2024 1

Thanks, its really helpful. It would be great to mention this customization in project README. Maybe there are more "not so used to Emacs" ppl like me :) who failed to find this by their own.

from ox-pandoc.

kawabata avatar kawabata commented on August 22, 2024

Export shortcut option is defined in the variable `org-pandoc-menu-entry'.
As pandoc supports huge number of formats, ox-pandoc do not assign all of them
into specific keyboard shortcut. Customizing this variable and load the library
may solve the problem. It's default value is ::

(defcustom org-pandoc-menu-entry
'(
;;(?a "to asciidoc." org-pandoc-export-to-asciidoc)
(?a "to asciidoc and open." org-pandoc-export-to-asciidoc-and-open)
(?A "as asciidoc." org-pandoc-export-as-asciidoc)
;;(?b "to beamer." org-pandoc-export-to-beamer)
;;(?1 "to beamer and open." org-pandoc-export-to-beamer-and-open)
;;(?! "as beamer." org-pandoc-export-as-beamer)
(?b "to beamer-pdf and open." org-pandoc-export-to-beamer-pdf-and-open)
(?B "to beamer-pdf." org-pandoc-export-to-beamer-pdf)
;;(?q "to commonmark." org-pandoc-export-to-commonmark)
;;(?c "to context." org-pandoc-export-to-context)
(?c "to context and open." org-pandoc-export-to-context-and-open)
(?C "as context." org-pandoc-export-as-context)
;;(?d "to docbook." org-pandoc-export-to-docbook)
(?d "to docbook and open." org-pandoc-export-to-docbook-and-open)
(?D "as docbook." org-pandoc-export-as-docbook)
(?x "to docx and open." org-pandoc-export-to-docx-and-open)
(?X "to docx." org-pandoc-export-to-docx)
;;(?z "to dzslides." org-pandoc-export-to-dzslides)
(?z "to dzslides and open." org-pandoc-export-to-dzslides-and-open)
(?Z "as dzslides." org-pandoc-export-as-dzslides)
;;(?3 "to epub and open." org-pandoc-export-to-epub-and-open)
;;(?# "to epub." org-pandoc-export-to-epub)
(?e "to epub3 and open." org-pandoc-export-to-epub3-and-open)
(?E "to epub3." org-pandoc-export-to-epub3)
;;(?f "to fb2." org-pandoc-export-to-fb2)
(?f "to fb2 and open." org-pandoc-export-to-fb2-and-open)
(?F "as fb2." org-pandoc-export-as-fb2)
;;(?h "to html." org-pandoc-export-to-html)
;;(?5 "to html and open." org-pandoc-export-to-html-and-open)
;;(?% "as html." org-pandoc-export-as-html)
;;(?h "to html5." org-pandoc-export-to-html5)
(?h "to html5 and open." org-pandoc-export-to-html5-and-open)
(?H "as html5." org-pandoc-export-as-html5)
;;(?i "to icml." org-pandoc-export-to-icml)
(?i "to icml and open." org-pandoc-export-to-icml-and-open)
(?I "as icml." org-pandoc-export-as-icml)
;;(?j "to json." org-pandoc-export-to-json)
(?j "to json and open." org-pandoc-export-to-json-and-open)
(?J "as json." org-pandoc-export-as-json)
;;(?l "to latex." org-pandoc-export-to-latex)
;;(?2 "to latex and open." org-pandoc-export-to-latex-and-open)
;;(?" "as latex." org-pandoc-export-as-latex)
(?l "to latex-pdf and open." org-pandoc-export-to-latex-pdf-and-open)
(?L "to latex-pdf." org-pandoc-export-to-latex-pdf)
;;(?m "to man." org-pandoc-export-to-man)
(?m "to man and open." org-pandoc-export-to-man-and-open)
(?M "as man." org-pandoc-export-as-man)
;;(?k "to markdown." org-pandoc-export-to-markdown)
(?k "to markdown and open." org-pandoc-export-to-markdown-and-open)
(?K "as markdown." org-pandoc-export-as-markdown)
;;(?g "to markdown_github." org-pandoc-export-to-markdown_github)
(?g "to markdown_github and open." org-pandoc-export-to-markdown_github-and-open)
(?G "as markdown_github." org-pandoc-export-as-markdown_github)
;;(?4 "to markdown_mmd." org-pandoc-export-to-markdown_mmd)
;;(?4 "to markdown_mmd and open." org-pandoc-export-to-markdown_mmd-and-open)
;;(?$ "as markdown_mmd." org-pandoc-export-as-markdown_mmd)
;;(?6 "to markdown_phpextra." org-pandoc-export-to-markdown_phpextra)
;;(?6 "to markdown_phpextra and open." org-pandoc-export-to-markdown_phpextra-and-open)
;;(?& "as markdown_phpextra." org-pandoc-export-as-markdown_phpextra)
;;(?7 "to markdown_strict." org-pandoc-export-to-markdown_strict)
;;(?7 "to markdown_strict and open." org-pandoc-export-to-markdown_strict-and-open)
;;(?' "as markdown_strict." org-pandoc-export-as-markdown_strict)
;;(?w "to mediawiki." org-pandoc-export-to-mediawiki)
(?w "to mediawiki and open." org-pandoc-export-to-mediawiki-and-open)
(?W "as mediawiki." org-pandoc-export-as-mediawiki)
;;(?n "to native." org-pandoc-export-to-native)
(?n "to native and open." org-pandoc-export-to-native-and-open)
(?N "as native." org-pandoc-export-as-native)
(?o "to odt and open." org-pandoc-export-to-odt-and-open)
(?O "to odt." org-pandoc-export-to-odt)
;;(?8 "to opendocument and open." org-pandoc-export-to-opendocument-and-open)
;;(?( "to opendocument." org-pandoc-export-to-opendocument)
;;(?9 "to opml." org-pandoc-export-to-opml)
;;(?9 "to opml and open." org-pandoc-export-to-opml-and-open)
;;(?) "as opml." org-pandoc-export-as-opml)
;;(?0 "to org." org-pandoc-export-to-org)
;;(?0 "to org and open." org-pandoc-export-to-org-and-open)
;;(? "as org." org-pandoc-export-as-org)
;;(?p "to plain." org-pandoc-export-to-plain)
(?p "to plain and open." org-pandoc-export-to-plain-and-open)
(?P "as plain." org-pandoc-export-as-plain)
;;(?v "to revealjs." org-pandoc-export-to-revealjs)
(?v "to revealjs and open." org-pandoc-export-to-revealjs-and-open)
(?V "as revealjs." org-pandoc-export-as-revealjs)
;;(?r "to rst." org-pandoc-export-to-rst)
(?: "to rst and open." org-pandoc-export-to-rst-and-open)
(?* "as rst." org-pandoc-export-as-rst)
;;(?: "to rtf." org-pandoc-export-to-rtf)
(?r "to rtf and open." org-pandoc-export-to-rtf-and-open)
(?R "as rtf." org-pandoc-export-as-rtf)
(?s "to s5." org-pandoc-export-to-s5)
(?s "to s5 and open." org-pandoc-export-to-s5-and-open)
;;(?S "as s5." org-pandoc-export-as-s5)
;;(?< "to slideous." org-pandoc-export-to-slideous)
;;(?< "to slideous and open." org-pandoc-export-to-slideous-and-open)
;;(?, "as slideous." org-pandoc-export-as-slideous)
;;(?y "to slidy." org-pandoc-export-to-slidy)
(?y "to slidy and open." org-pandoc-export-to-slidy-and-open)
(?Y "as slidy." org-pandoc-export-as-slidy)
;;(?= "to texinfo." org-pandoc-export-to-texinfo)
(?t "to texinfo and open." org-pandoc-export-to-texinfo-and-open)
(?T "as texinfo." org-pandoc-export-as-texinfo)
;;(?t "to textile." org-pandoc-export-to-textile)
;;(?t "to textile and open." org-pandoc-export-to-textile-and-open)
;;(?T "as textile." org-pandoc-export-as-textile)
)
"Pandoc menu-entry."
:group 'org-pandoc
:type 'list)

from ox-pandoc.

iachettifederico avatar iachettifederico commented on August 22, 2024

Could you expand on this a little bit?

I've tried setting the variable like this:

 (setq org-pandoc-menu-entry
	   '(
	     (?4 "to html5." org-pandoc-export-to-html5)
	     (?$ "to html5 and open." org-pandoc-export-to-html5-and-open)
	     ;; other options
	     ))

But after restarting emacs the menu looks the same as before, am I missing something?

I checked that the var is actually being set via customize-group and it is.

Thank you very much in advance

from ox-pandoc.

kepi avatar kepi commented on August 22, 2024

It seams same as one I'm using and mine is working. Btw. you don't need to restart emacs, just eval that one sexp and try if it is working, or use emacs customization system for variables.

Here is mine version, but I don't see any difference and no reason why yours shouldn't work.

    (setq org-pandoc-menu-entry (quote (
                                        ;; ----------------------------------------------------------------------
                                        ;; Docs
                                        ;; ----------------------------------------------------------------------
                                        (?m "to markdown and open." org-pandoc-export-to-markdown-and-open)
                                        (?M "as markdown." org-pandoc-export-as-markdown)
                                        (?k "to markdown_mmd." org-pandoc-export-to-markdown_mmd)
                                        (?K "to markdown_mmd and open." org-pandoc-export-to-markdown_mmd-and-open)
                                        (?p "to plain and open." org-pandoc-export-to-plain-and-open)
                                        (?P "as plain." org-pandoc-export-as-plain)
                                        (?a "to asciidoc and open." org-pandoc-export-to-asciidoc-and-open)
                                        (?A "as asciidoc." org-pandoc-export-as-asciidoc)
                                        (?n "to man and open." org-pandoc-export-to-man-and-open)
                                        (?N "as man." org-pandoc-export-as-man)
                                        ;; ----------------------------------------------------------------------
                                        ;; WIKIs
                                        ;; ----------------------------------------------------------------------
                                        (?u "to dokuwiki and open." org-pandoc-export-to-dokuwiki-and-open)
                                        (?U "as dokuwiki." org-pandoc-export-as-dokuwiki)
                                        (?w "to mediawiki and open." org-pandoc-export-to-mediawiki-and-open)
                                        (?W "as mediawiki." org-pandoc-export-as-mediawiki)
                                        ;; ----------------------------------------------------------------------
                                        ;; Slides
                                        ;; ----------------------------------------------------------------------
                                        (?r "to revealjs and open." org-pandoc-export-to-revealjs-and-open)
                                        (?R "as revealjs." org-pandoc-export-as-revealjs)
                                        (?s "to slidy and open." org-pandoc-export-to-slidy-and-open)
                                        (?S "as slidy." org-pandoc-export-as-slidy)
                                        (?z "to dzslides and open." org-pandoc-export-to-dzslides-and-open)
                                        (?Z "as dzslides." org-pandoc-export-as-dzslides)
                                        ;; ----------------------------------------------------------------------
                                        ;; DOC
                                        ;; ----------------------------------------------------------------------
                                        (?o "to odt and open." org-pandoc-export-to-odt-and-open)
                                        (?O "to odt." org-pandoc-export-to-odt)
                                        (?x "to docx and open." org-pandoc-export-to-docx-and-open)
                                        (?X "to docx." org-pandoc-export-to-docx)
                                        ;; ----------------------------------------------------------------------
                                        ;; HTML
                                        ;; ----------------------------------------------------------------------
                                        (?h "to html5 and open." org-pandoc-export-to-html5-and-open)
                                        (?H "as html5." org-pandoc-export-as-html5)
                                        (?5 "to html5-pdf and open." org-pandoc-export-to-html5-pdf-and-open)
                                        (?% "to html5-pdf." org-pandoc-export-to-html5-pdf)
                                        ;; ----------------------------------------------------------------------
                                        ;; PDF
                                        ;; ----------------------------------------------------------------------
                                        (?l "to latex-pdf and open." org-pandoc-export-to-latex-pdf-and-open)
                                        (?L "to latex-pdf." org-pandoc-export-to-latex-pdf)
                                        (?= "to ms-pdf and open." org-pandoc-export-to-ms-pdf-and-open)
                                        (?- "to ms-pdf." org-pandoc-export-to-ms-pdf)
                                        (?b "to beamer-pdf and open." org-pandoc-export-to-beamer-pdf-and-open)
                                        (?B "to beamer-pdf." org-pandoc-export-to-beamer-pdf)
                                        (?c "to context-pdf and open." org-pandoc-export-to-context-pdf-and-open)
                                        (?C "to context-pdf." org-pandoc-export-to-context-pdf)
                                        ;; ----------------------------------------------------------------------
                                        ;; E-books
                                        ;; ----------------------------------------------------------------------
                                        (?e "to epub3 and open." org-pandoc-export-to-epub3-and-open)
                                        (?E "to epub3." org-pandoc-export-to-epub3)
                                        ;; ----------------------------------------------------------------------
                                        ;; Dev
                                        ;; ----------------------------------------------------------------------
                                        (?j "to json and open." org-pandoc-export-to-json-and-open)
                                        (?J "as json." org-pandoc-export-as-json))))

from ox-pandoc.

iachettifederico avatar iachettifederico commented on August 22, 2024

Thanks

It's like the variable is set but ox-pandoc is not using the new version or something like that.

Could you share your entire config for ox-pandoc so I can compare it? Maybe I'm changing this at the wrong time or something...

Thanks a lot for answering

from ox-pandoc.

kepi avatar kepi commented on August 22, 2024

Its only change I did in my config, but I'm using pandoc from spacemacs pandoc Spacemacs layer so try to check there.

from ox-pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.