emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Export Org mode files to (gag, barf) MS Office?
Date: Mon, 28 Jun 2021 08:38:35 +1000	[thread overview]
Message-ID: <8735t23nyj.fsf@gmail.com> (raw)
In-Reply-To: <SA1PR13MB4799021B592A6F3C38696787A2049@SA1PR13MB4799.namprd13.prod.outlook.com>


That error would tend to indicate there is a problem with the way the
file uri is being encoded. This could either be a bug or it could be due
to an error in your configuration or possibly the original org file your
trying to encode. Unfortunately, in that backtrace output, I cannot see
the full uri. I would start by looking at the full uri and seeing if you
can spot what is wrong with the encoding and identify where that uri is
coming from (i.e. your config, a link in the org file your trying to
export etc). 

Here is what I would do -

- Create a minimal basic org file which generates the error when you try
to export to odt

- Post that minimal org file, together with details on your Emacs
version, org-mode version to the list. You might be lucky and someone
else on Windows will be able to use your test org file to see if they
get the same error when exporting to odt. Maybe someone not on windows
can also try exporting it to verify it is not a platform independent
bug. See M-x org-submit-bug-report for a straight-forward way to
generate the email.

- Try running emacs -Q and then adding a minimal config to get org odt
export to work and verify you still get the error. This may help
identify bad local config, bad org installation/update or issue with org
version you have.

The objective here is to provide all the information necessary for
someone else to try and reproduce your issue. This will help in
determining whether you have a real org or emacs bug, a local
setup/config error or a problem in your org file.

BTW it probably would be worth running org-lint on the org file your
trying to export, just to verify it has good org syntax etc.

Brandon Taylor <donnie126_2002@hotmail.com> writes:

> Here's the generated backtrace after doing M-x toggle-debug-on-error and then trying to do export on Windows.
>
> Debugger entered--Lisp error: (rng-uri-error "Bad escapes in URI ‘file:///c:/Program%20Files/Ema...")
>   signal(rng-uri-error ("Bad escapes in URI ‘file:///c:/Program%20Files/Ema..."))
>   rng-uri-error("Bad escapes in URI `%s'" "file:///c:/Program%20Files/Emacs/x86_64/share/emac...")
>   rng-uri-file-name-1("file:///c:/Program%20Files/Emacs/x86_64/share/emac..." nil)
>   rng-uri-file-name("file:///c:/Program%20Files/Emacs/x86_64/share/emac...")
>   rng-locate-schema-file()
>   rng-auto-set-schema(t)
>   rng-validate-mode(1)
>   rng-nxml-mode-init()
>   xml-mode()
>   set-auto-mode-0(xml-mode nil)
>   set-auto-mode()
>   normal-mode(t)
>   after-find-file(nil nil)
>   find-file-noselect-1(#<buffer styles.xml> "c:/Users/donni/AppData/Local/Temp/odt-s6F4yN/style..." t nil
> "c:/Users/donni/AppData/Local/Temp/odt-s6F4yN/style..." (6755399441121385 3391104951))
>   find-file-noselect("c:/Users/donni/AppData/Local/Temp/odt-s6F4yN/style..." t)
>   org-odt-template(#("\n\n<text:h text:style-name=..." 186 203 (:parent (headline ... ...)) 304 509 (:parent (paragraph ... ...)) 704 714 (:parent
> (headline ... ...)) 815 987 (:parent (paragraph ... ...)) 995 1044 (:parent (paragraph ... ...)) 1052 1083 (:parent (paragraph ... ...)) 1278 1289 (:parent
> (headline ... ...)) 1390 1489 (:parent (paragraph ... ...)) ...) (:export-options nil :back-end #s(org-export-backend :name odt :parent nil :transcoders
> (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (...) :blocks nil
> :menu (111 "Export to ODT" ...)) :translate-alist ((bold . org-odt-bold) (center-block . org-odt-center-block) (clock . org-odt-clock) (code .
> org-odt-code) (drawer . org-odt-drawer) (dynamic-block . org-odt-dynamic-block) (entity . org-odt-entity) (example-block . org-odt-example-block)
> (export-block . org-odt-export-block) (export-snippet . org-odt-export-snippet) (fixed-width . org-odt-fixed-width) (footnote-definition .
> org-odt-footnote-definition) (footnote-reference . org-odt-footnote-reference) (headline . org-odt-headline) (horizontal-rule . org-odt-horizontal-rule)
> (inline-src-block . org-odt-inline-src-block) (inlinetask . org-odt-inlinetask) (italic . org-odt-italic) (item . org-odt-item) (keyword . org-odt-keyword)
> (latex-environment . org-odt-latex-environment) (latex-fragment . org-odt-latex-fragment) (line-break . org-odt-line-break) (link . org-odt-link)
> (node-property . org-odt-node-property) (paragraph . org-odt-paragraph) ...) :exported-data #<hash-table eq 34/4001 0x26f5845> :input-buffer
> "belvoire.org" :input-file "c:/Users/donni/OneDrive/Do..." :odt-styles-file nil :description nil :keywords nil :subtitle nil :odt-content-template-file nil
> :odt-display-outline-level 2 :odt-fontify-srcblocks t ...))
>   org-export-as(odt nil nil nil nil)
>   org-odt-export-to-odt(nil nil nil nil)
>   org-export-dispatch(nil)
>   funcall-interactively(org-export-dispatch nil)
>   call-interactively(org-export-dispatch nil nil)
>   command-execute(org-export-dispatch)
>
> Sent from Mailspring, the best free email app for work
> On Jun 26 2021, at 11:05 pm, Tim Cross <theophilusx@gmail.com> wrote:
>
>  Brandon Taylor <donnie126_2002@hotmail.com> writes:
>
>  > Okay. Well, I've gone ahead and installed LibreOffice, which took care of the "missing 'soffice'" problem, but like a frustrating game of
>  Whac-A-Mole,
>  > another problem popped up. Now I'm left high and dry as to what might have happened, because after adding the location of soffice.exe in
>  my
>  > Windows PATH environment variable, I get the following output:
>  >
>  > Executing soffice --headless --convert-to odt --outdir "c:/Users/donni/OneDrive/Documents/"
>  "c:/Users/donni/OneDrive/Documents/belvoire.odt"
>  >
>  > Export to c:/Users/donni/OneDrive/Documents/belvoire.odt failed
>  >
>  > with absolutely no rhyme or reason as to what went wrong.
>  >
>
>  You can try turning on debug on error with
>
>  M-x toggle-debug-on-error
>
>  which might give you a backtrace that will provide more details.
>
>  I would also try executing the command
>
>  soffice --headless --convert-to odt --outdir "c:/Users/donni/OneDrive/Documents/" "c:/Users/donni/OneDrive/Documents/belvoire.odt"
>
>  at a command prompt and see if you get any additonal information. I've
>  not done odt exports of org files, but that command line looks odd to me
>  - it looks like it is trying to convert an odt file to odt?
>
>  I suspect you will have a hard time getting all this to work on Windows.
>  It is possible, but as Windows is not a 'preferred' platform, you have a
>  significant amount of configuration/customisation to do to get it
>  working.
>
>  I never use Windows, so cannot provide much help of any real substance.
>  I do wonder if it might be easier if you use WSL?
>
>  --
>  Tim Cross


-- 
Tim Cross


  reply	other threads:[~2021-06-27 23:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26 14:44 Export Org mode files to (gag, barf) MS Office? Brandon Taylor
2021-06-26 14:54 ` Bruce D'Arcus
2021-06-26 14:56   ` Bruce D'Arcus
2021-06-26 14:57   ` Brandon Taylor
2021-06-26 15:00     ` Bruce D'Arcus
2021-06-26 15:29       ` Brandon Taylor
2021-06-26 15:49         ` Rob Sargent
2021-06-26 16:27           ` Brandon Taylor
2021-06-26 19:18             ` tomas
2021-06-26 19:49               ` Marcin Borkowski
2021-06-26 20:12                 ` Libre vs Open Office [was: Export Org mode files to (gag, barf) MS Office?] tomas
2021-06-27 19:38                   ` Marcin Borkowski
2021-06-26 19:07     ` Boo Hiss ;-) " tomas
2021-06-26 15:04 ` Export Org mode files to (gag, barf) MS Office? John Kitchin
2021-06-26 15:15 ` Juan Manuel Macías
2021-06-26 15:18 ` glyn
2021-06-26 21:46 ` Tim Cross
2021-06-26 22:30   ` George Mauer
2021-06-27  0:25     ` Brandon Taylor
2021-06-27  4:05       ` Tim Cross
2021-06-27 21:08         ` Brandon Taylor
2021-06-27 22:38           ` Tim Cross [this message]
2021-06-28  1:48             ` Brandon Taylor
2021-07-01  8:28 ` Karl Voit
  -- strict thread matches above, loose matches on Subject: below --
2021-06-27 16:13 emanuel.charpentier
2021-06-27 16:17 ` Samuel Banya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735t23nyj.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).