emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: bug&fix for org-compile-file on Windows


From: Mirko Vukovic
Subject: [O] Bug: bug&fix for org-compile-file on Windows
Date: Mon, 12 Dec 2016 03:06:04 +0000

To: address@hidden
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 <address@hidden>
--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"
"<src lang=\"?\">\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>")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE"
"<verse>\n?\n</verse>")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM"
"<verbatim>\n?\n</verbatim>")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER"
"<center>\n?\n</center>")
("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX"
"<literal style=\"latex\">\n?\n</literal>")
("L" "#+LaTeX: " "<literal style=\"latex\">?</literal>")
("h" "#+BEGIN_HTML\n?\n#+END_HTML"
"<literal style=\"html\">\n?\n</literal>")
...)
 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 "\\<Mirko Vukovic\\>"
 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
 )


reply via email to

[Prev in Thread] Current Thread [Next in Thread]