From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mirko Vukovic Subject: Bug: bug&fix for org-compile-file on Windows Date: Mon, 12 Dec 2016 03:06:04 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0b63d6f6a65705436d6217 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGGxn-000244-Qe for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:07:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGGxk-000372-Iv for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:07:39 -0500 Received: from mail-yw0-f169.google.com ([209.85.161.169]:33151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGGxk-00032J-CU for emacs-orgmode@gnu.org; Sun, 11 Dec 2016 22:07:36 -0500 Received: by mail-yw0-f169.google.com with SMTP id r204so55470102ywb.0 for ; Sun, 11 Dec 2016 19:07:15 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" --94eb2c0b63d6f6a65705436d6217 Content-Type: text/plain; charset=UTF-8 To: emacs-orgmode@gnu.org Subject: Bug: bug&fix for org-compile-file on Windows [9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/elisp/org/)] From: Mirko Vukovic --text follows this line-- Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ I was not able to preview latex fragments using org-toggle-latex-fragment (C-c C-x C-l) I traced the problem to the (shell-command ...) in org-compile-file during the dvipng step. The problem was in the formatting of the destination file (the -o switch). It consists of the directory and filename. Both were enclosed in double quotes, so that when concatenated the string looked like this: \"path\"\"filename\".extension By trial and error in the scratch buffer I was able to confirm that removing the double \" fixed the problem. A quick and dirty fix was to post-process the string to remove the duplicate quoted double quote like so: (shell-command (replace-regexp-in-string "\"\"" "" (format-spec command spec)) log-buf) An elisp wizard will undoubdetly be able to create a more robust solution. Emacs : GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Package: Org mode version 9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/elisp/org/) current state: ============== (setq org-latex-format-headline-function 'org-latex-format-headline-default-function org-pretty-entities t org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-agenda-skip-scheduled-if-done t org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-parameters '(("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("id" :follow org-id-open) ...) org-archive-hook '(org-attach-archive-delete-maybe) org-id-method 'org org-refile-targets '(...) org-preview-latex-process-alist '((dvipng :programs ("latex" "dvipng") :description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type ...) (dvisvgm :programs ("latex" "dvisvgm") :description "dvi > svg" :post-clean (quote (\.tex \.aux)) :message "you need to install the programs: latex and dvisvgm." :use-xcolor ...) (imagemagick :programs ("latex" "convert") :description "pdf > png" :message "you need to install the programs: latex and imagemagick." :use-xcolor t :image-input-type ...) ) org-modules '(org-habit org-w3m org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe org-rmail) org-cycle-hook '(org-inlinetask-hide-tasks org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-custom-commands '(("1" "Q1" tags-todo "+important+urgent") ("2" "Q2" tags-todo "+important-urgent") ("3" "Q3" tags-todo "-important+urgent") ("4" "Q3" tags-todo "-important-urgent")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent org-depend-block-todo) org-babel-pre-tangle-hook '(save-buffer) org-return-follows-link t org-occur-hook '(org-first-headline-recenter) org-font-lock-hook '(org-inlinetask-fontify) org-link-file-path-type 'relative org-trigger-hook '(org-depend-trigger-todo) org-html-format-headline-function 'org-html-format-headline-default-function org-structure-template-alist '(("b" "#+BEGIN_BEAMER\n\n#+END_BEAMER" "") ("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "\n\n") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "\n?\n") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "\n?\n") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "\n?\n") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "\n?\n") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "
\n?\n
") ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "\n?\n") ("L" "#+LaTeX: " "?") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "\n?\n") ...) org-tag-persistent-alist '(("important" . 105) ("urgent" . 117)) org-log-done 'note org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-id-link-to-org-use-id t org-default-notes-file "~/org/notes.org" org-latex-classes '(...) org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn ## CONTENTS)"] org-export-backends '(taskjuggler beamer ascii html icalendar latex odt) org-load-hook '((lambda nil (define-key org-mode-map " " (quote org-next-link)) (define-key org-mode-map " " (quote org-previous-link)) (define-key org-mode-map " n" (quote org-next-item))) ) org-format-latex-options '(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" ...) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-startup-align-all-tables t org-enforce-todo-dependencies t org-mode-hook '((closure (buffer-face-mode-face org-struct-menu org-last-state remember-data-file iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list t) nil (add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) org-mode-reftex-setup turn-on-auto-fill #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5 "\n\n(fn)"] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5 "\n\n(fn)"] org-babel-result-hide-spec org-babel-hide-all-hashes (lambda nil (set-input-method "TeX")) turn-on-org-cdlatex) org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-tags-exclude-from-inheritance '(suspended pending) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-from-is-user-regexp "\\" org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-odt-format-headline-function 'org-odt-format-headline-default-function org-metadown-hook '(org-babel-pop-to-session-maybe) org-todo-keywords '((sequence "TODO(t@)" "STARTED(s@)" "WAITING(w@)" "RESUMED(r@)" "APPT(a@)" "SUSPENDED(p@)" "|" "DONE(d@)" "CANCELED(c@)" ...) ) org-agenda-files "~/org/org-agenda-files" org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-babel-tangle-lang-exts '(("lisp" . "lisp") ("latex" . "tex") ("emacs-lisp" . "el") ("elisp" . "el")) org-babel-load-languages '((ditaa . t) (emacs-lisp . t) (gnuplot . t) (latex . t) (lisp . t)) org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-confirm-shell-link-function 'yes-or-no-p ) --94eb2c0b63d6f6a65705436d6217 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Subject: Bug: bug&fix for org-compile-file = on Windows [9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d= /elisp/org/)]
From: Mirko Vukovic <mirko.vukovic@us.tel.com>
--text follows = this line--

Remember to cover the basics, that is,= what you expected to happen and
what in fact did happen.=C2=A0 Y= ou don't know how to make a good report?=C2=A0 See

=
<= br>
Your bug report will be posted to the Org mailing list.
=
----------------------------------------------------------------------= --

I was not able to preview latex fragments using=
org-toggle-latex-fragment (C-c C-x C-l)

I traced the problem to the (shell-command ...) in org-compile-file
<= div>during the dvipng step.

The problem was in the= formatting of the destination file (the -o switch).=C2=A0 It consists
of the directory and filename.=C2=A0 Both were enclosed in double quo= tes, so
that when concatenated the string looked like this:
=
\"path\"\"filename\".extension

By trial and error in the scratch buffer I was able to confirm that
removing the double \" fixed the problem.

A quick and dirty fix was to post-process the string to remove the
duplicate quoted double quote like so:

(sh= ell-command (replace-regexp-in-string "\"\"" "&quo= t;
= (format-spec command spec)) log-buf)

An el= isp wizard will undoubdetly be able to create a more robust solution.
=


Emacs =C2=A0: GNU Emacs 24.5.1 (i686-pc-= mingw32)
=C2=A0of 2015-04-11 on LEG570
Package: Org mod= e version 9.0.1 (release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/e= lisp/org/)

current state:
=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
=C2=A0org-latex-fo= rmat-headline-function 'org-latex-format-headline-default-function
=C2=A0org-pretty-entities t
=C2=A0org-html-format-inlinetas= k-function 'org-html-format-inlinetask-default-function
=C2= =A0org-agenda-skip-scheduled-if-done t
=C2=A0org-tab-first-hook &= #39;(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
<= div>=C2=A0org-link-parameters '(("rmail" :follow org-rmail-op= en :store org-rmail-store-link)
=C2=A0 =C2=A0 =C2=A0 ("mhe" :fo= llow org-mhe-open :store org-mhe-store-link)
=C2=A0 =C2=A0 =C2=A0 ("= irc" :follow org-irc-visit :store org-irc-store-link)
=C2=A0 =C2=A0 = =C2=A0 ("info" :follow org-info-open :export org-info-export :sto= re
org-info-store-link)
=C2=A0 =C2=A0 =C2=A0 ("gnus" :follow = org-gnus-open :store org-gnus-store-link)
=C2=A0 =C2=A0 =C2=A0 ("doc= view" :follow org-docview-open :export org-docview-export
:store org= -docview-store-link)
=C2=A0 =C2=A0 =C2=A0 ("bibtex" :follow org= -bibtex-open :store org-bibtex-store-link)
=C2=A0 =C2=A0 =C2=A0 ("bb= db" :follow org-bbdb-open :export org-bbdb-export :complete
= org-bbdb= -complete-link :store org-bbdb-store-link)
=C2=A0 =C2=A0 =C2=A0 ("w3= m" :store org-w3m-store-link) ("id" :follow org-id-open) ...= )
=C2=A0org-archive-hook '(org-attach-archive-delete-maybe)
=C2=A0org-id-method 'org
=C2=A0org-refile-targets &#= 39;(...)
=C2=A0org-preview-latex-process-alist '((dvipng :pro= grams ("latex" "dvipng") :description
=C2=A0 =C2=A0= "dvi > png" :message
=C2=A0 =C2=A0"you need to instal= l the programs: latex and dvipng."
=C2=A0 =C2=A0:image-input-type = "dvi" :image-output-type ...)
=C2=A0 (dvisvgm :programs (&quo= t;latex" "dvisvgm") :description
=C2=A0 =C2=A0"dvi = > svg" :post-clean (quote (\.tex \.aux))
=C2=A0 =C2=A0:message<= /div>
=C2=A0 =C2=A0"you need to install the programs: latex and dvisvgm.= " :use-xcolor ...)
=C2=A0 (imagemagick :programs ("latex"= ; "convert")
=C2=A0 =C2=A0:description "pdf > png&quo= t; :message
=C2=A0 =C2=A0"you need to install the programs: latex = and imagemagick." :use-xcolor t :image-input-type ...)
=C2=A0 )
=C2=A0org-modules '(org-habit org-w3m org-bbdb org-bibtex org-d= ocview org-gnus org-info
=C2=A0 =C2=A0 =C2=A0 org-irc org-mhe org-rmail)
=C2=A0org-cycle-hook '(org-inlinetask-hide-tasks org-cycle-hid= e-archived-subtrees
=C2=A0org-cycle-hide-drawers org-cycle-show-empty-lin= es
=C2=A0org-optimize-window-after-visibility-change)
=C2=A0org= -agenda-custom-commands '(("1" "Q1" tags-todo "= ;+important+urgent")
=C2=A0 =C2=A0 =C2=A0("2" "Q2&qu= ot; tags-todo "+important-urgent")
=C2=A0 =C2=A0 =C2=A0("= 3" "Q3" tags-todo "-important+urgent")
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> =C2=A0 = =C2=A0 =C2=A0("4" "Q3" tags-todo "-important-urgen= t"))
=C2=A0org-agenda-before-write-hook '(org-agenda-add= -entry-text)
=C2=A0org-speed-command-hook '(org-speed-command= -default-hook org-babel-speed-command-hook)
=C2=A0org-ascii-forma= t-inlinetask-function 'org-ascii-format-inlinetask-default
= =C2=A0org-blocker-hook '(org-block-todo-from-children-or-siblings-or-pa= rent
<= /span> =C2=A0 =C2=A0org-depend-block-todo)
=C2=A0org-babel-pre-ta= ngle-hook '(save-buffer)
=C2=A0org-return-follows-link t
=C2=A0org-occur-hook '(org-first-headline-recenter)
=C2= =A0org-font-lock-hook '(org-inlinetask-fontify)
=C2=A0org-lin= k-file-path-type 'relative
=C2=A0org-trigger-hook '(org-d= epend-trigger-todo)
=C2=A0org-html-format-headline-function '= org-html-format-headline-default-function
=C2=A0org-structure-tem= plate-alist '(("b" "#+BEGIN_BEAMER\n\n#+END_BEAMER"= "")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC"
= "<src lang=3D\"?\">\n\n</src>")
= ("= e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE"
"<example= >\n?\n</example>")
("q" "#+BEGIN_QUOTE\n?\n= #+END_QUOTE"
"<quote>\n?\n</quote>")
(&qu= ot;v" "#+BEGIN_VERSE\n?\n#+END_VERSE"
"<verse&g= t;\n?\n</verse>")
("V" "#+BEGIN_VERBATIM\n?\n#= +END_VERBATIM"
"<verbatim>\n?\n</verbatim>")=
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER"
"&l= t;center>\n?\n</center>")
("l" "#+BEGIN_LaT= eX\n?\n#+END_LaTeX"
"<literal style=3D\"latex\"&= gt;\n?\n</literal>")
("L" "#+LaTeX: " &qu= ot;<literal style=3D\"latex\">?</literal>")
(= "h" "#+BEGIN_HTML\n?\n#+END_HTML"
"<literal= style=3D\"html\">\n?\n</literal>")
...)
=C2=A0org-tag-persistent-alist '(("important" . 105) (&quo= t;urgent" . 117))
=C2=A0org-log-done 'note
=C2= =A0org-metaup-hook '(org-babel-load-in-session-maybe)
=C2=A0o= rg-confirm-elisp-link-function 'yes-or-no-p
=C2=A0org-id-link= -to-org-use-id t
=C2=A0org-default-notes-file "~/org/notes.org"
=C2=A0org-latex-classes= '(...)
=C2=A0org-latex-format-drawer-function #[514 "\2= 07" [] 3 "\n\n(fn ## CONTENTS)"]
=C2=A0org-export-= backends '(taskjuggler beamer ascii html icalendar latex odt)
=C2=A0org-load-hook '((lambda nil (define-key org-mode-map " &quo= t; (quote org-next-link))
=C2=A0(define-key org-mode-map " " (q= uote org-previous-link))
=C2=A0(define-key org-mode-map " n" (= quote org-next-item)))
)
=C2=A0org-format-latex-options '(:= foreground default :background default :scale 1.6
=C2=A0 =C2=A0:html-for= eground "Black" :html-background "Transparent" ...)
=C2=A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer)<= /div>
=C2=A0org-startup-align-all-tables t
=C2=A0org-enforce-= todo-dependencies t
=C2=A0org-mode-hook '((closure
= =C2=A0(b= uffer-face-mode-face org-struct-menu org-last-state
=C2=A0 remember-dat= a-file iswitchb-temp-buflist calc-embedded-open-mode
=C2=A0 calc-embedde= d-open-formula calc-embedded-close-formula
=C2=A0 align-mode-rules-list t= )
=C2=A0nil
=C2=A0(add-hook (quote change-major-mode-hook) (quote org-s= how-block-all)
=C2=A0 (quote append) (quote local))
=C2=A0)
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> org-mode-= reftex-setup turn-on-auto-fill
#[0 "\300\301\302\303\304$\207"<= /div>
=C2=A0 [add-hook change-major-mode-hook org-show-block-all append local] = 5
=C2=A0 "\n\n(fn)"]
#[0 "\300\301\302\303\304$\207"= ;
=C2=A0 [add-hook change-major-mode-hook org-babel-show-result-all appen= d
=C2=A0 =C2=A0local]
=C2=A0 5 "\n\n(fn)"]
org-babel-result= -hide-spec org-babel-hide-all-hashes
(lambda nil (set-input-method "= TeX")) turn-on-org-cdlatex)
=C2=A0org-ascii-format-drawer-fu= nction #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"= ;]
=C2=A0org-tags-exclude-from-inheritance '(suspended pendin= g)
=C2=A0org-odt-format-drawer-function #[514 "\207" []= 3 "\n\n(fn NAME CONTENTS)"]
=C2=A0org-from-is-user-reg= exp "\\<Mirko Vukovic\\>"
=C2=A0org-html-format-d= rawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)&quo= t;]
=C2=A0org-odt-format-headline-function 'org-odt-format-he= adline-default-function
=C2=A0org-metadown-hook '(org-babel-p= op-to-session-maybe)
=C2=A0org-todo-keywords '((sequence &quo= t;TODO(t@)" "STARTED(s@)" "WAITING(w@)" "RESU= MED(r@)"
=C2=A0 =C2=A0 =C2=A0"APPT(a@)" "SUSPENDED(p@= )" "|" "DONE(d@)" "CANCELED(c@)" ...)
= =C2=A0 =C2=A0 )
=C2=A0org-agenda-files "~/org/org-agenda-fil= es"
=C2=A0org-src-mode-hook '(org-src-babel-configure-ed= it-buffer
=C2=A0 =C2=A0 org-src-mode-configure-edit-buffer)
=C2= =A0org-after-todo-state-change-hook '(org-clock-out-if-current)
=C2=A0org-odt-format-inlinetask-function 'org-odt-format-inlinetask-= default-function
=C2=A0org-babel-tangle-lang-exts '(("li= sp" . "lisp") ("latex" . "tex") ("e= macs-lisp" . "el")
=C2=A0 =C2=A0 =C2=A0("elisp"= . "el"))
=C2=A0org-babel-load-languages '((ditaa .= t) (emacs-lisp . t) (gnuplot . t) (latex . t)
=C2=A0 =C2=A0(lisp . t))<= /div>
=C2=A0org-latex-format-inlinetask-function 'org-latex-format-= inlinetask-default-function
=C2=A0org-confirm-shell-link-function= 'yes-or-no-p
=C2=A0)

--94eb2c0b63d6f6a65705436d6217--