From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qNRJIlj1qF4nEAAA0tVLHw (envelope-from ) for ; Wed, 29 Apr 2020 03:32:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id lEmQHWH1qF51fgAAbx9fmQ (envelope-from ) for ; Wed, 29 Apr 2020 03:32:49 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 82379943E7E for ; Wed, 29 Apr 2020 03:32:47 +0000 (UTC) Received: from localhost ([::1]:40904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTdSp-0005N0-BI for larch@yhetil.org; Tue, 28 Apr 2020 23:32:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55176) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTdPC-00049T-0T for emacs-orgmode@gnu.org; Tue, 28 Apr 2020 23:32:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTdP9-000382-9K for emacs-orgmode@gnu.org; Tue, 28 Apr 2020 23:29:01 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTdP8-0002yn-Sl for emacs-orgmode@gnu.org; Tue, 28 Apr 2020 23:28:58 -0400 Received: by mail-wr1-x444.google.com with SMTP id k13so716526wrw.7 for ; Tue, 28 Apr 2020 20:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=FVB3OBbWoaKqEHhoOBPkI1K3C/+8eI1Y7HvEFXwHwTA=; b=mBSdXyRaiXySoVzNEQh2QlsZ2EIhtNiA3LY342Mi52on9QvUYwuo4UYjPqKBBcm8lM 60c2s6OGUsJeHOrYcZAUyrZ0T5w2GGFd4x71qJoBSy4O1RR8GzPdf79uVbVpXQ3a0SF1 +6xnLvIXe/xdtN9bMOVKwHcb0P14vYp+azi9zKXlwE9VYxtCX/d9yd1vFaGZOnPJWoG9 xslqclFn+3PnMSP0mepQQEjhYmV6n0ZRT5pmjatQub/TgJl3efNB0e0AN2M6vDWiCVh3 klD8i+rzVyQzgV4m2aFy8+/90oLf4jukg3GOdrlQavo4Bev/TdR4v0hedHS9LeDBtM1x Jcag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=FVB3OBbWoaKqEHhoOBPkI1K3C/+8eI1Y7HvEFXwHwTA=; b=uSxZCZlrx3EdumI1mfE7v6eHV+5R9tH8YmO9U1j8vDUCvEySMUDNNP8kNBadiEULzt STfk+GaV1WJgdC/X0TGXLMhHFojE0qxbXyJ7E77fTNU5JJC84Frop2JEazKQw33psZo7 HKsmmIGiDQ2gDnBuGPhOeFpl2zESc1Tw0NrEvmnIjDGpykTVzgVeUBGfbyDvwiB+Bpk8 DZG1B4/VDGYFQYHdkg7sbUE++QTXUG4calGN/qbWT47T1PBHZVss/EKpmchp/G5yp+4G /T3f+InJLOyVy3piQ+DPfAmh/664B5yaUltGFzH2kOueHXZChqzJWxKlyo7I31vr21FC OCwA== X-Gm-Message-State: AGi0PuZiXzAY417sBiEpRtHqEaDxxk5v5pi17zKNRXMWOFTYEXwpokcl puEE+sxKhP0M75fOIuNERXmoSYoN/70= X-Google-Smtp-Source: APiQypIewJwQeXXsvJk2Q+Oa0sJQkVoVW4WUnMXlWSiUU3OV+iR1tzmj9QzRXTc0IlRPxxXQl8VZgw== X-Received: by 2002:adf:db41:: with SMTP id f1mr34698426wrj.13.1588130935805; Tue, 28 Apr 2020 20:28:55 -0700 (PDT) Received: from delllaptop.lockywolf.net ([95.85.18.95]) by smtp.gmail.com with ESMTPSA id y63sm5493246wmg.21.2020.04.28.20.28.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 20:28:55 -0700 (PDT) From: Vladimir Nikishkin To: emacs-orgmode@gnu.org Subject: Bug: org-preview-latex-process-alist's :latex-header should not fall back to org-format-latex-header [9.3.4 (9.3.4-5-ga0f3bb-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20200210/)] Date: Wed, 29 Apr 2020 11:28:42 +0800 Message-ID: <87d07r9dhx.fsf@delllaptop.lockywolf.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=lockywolf@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -1.71 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=mBSdXyRa; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-1.71 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.4932779832859]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail,gmail.com:server fail]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.18), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[lockywolf@gmail.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; URIBL_BLOCKED(0.00)[orgmode.org:url]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 0+O0nWikETG9 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 https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ So, the problem is the following: There are two almost unrelated latex-using processes in org. One is export, the other one is generating previews. The latter one is far less demanding than the former. Previews only care about certain math, whereas exports may very well be super tricky. Therefore, preparing org documents for export often includes setting a separate latex compiler (in 99% of the cases lualatex or xelatex), and a custom #+LATEX_HEADER. the latex compiler controlled with (setq org-latex-compiler "lualatex") (setq org-latex-bib-compiler "biber") is completely ignored by the preview process. This is fine, since previews only care about small things. However, #+LATEX_HEADER is _not_ ignored, which means that previews will fail to compile, since LATEX_HEADER is prepared for a different compiler. This can be worked around with various means, but I think that the problem here is more general. The two processes should be either completely amalgamated (that is the previews should not have a separate org-preview-latex-default-process, and just take the settings from the ones used for the export), or should be completely independent, but not entangled by a single variable. Thanks. Emacs : GNU Emacs 26.3 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 3.24.12) of 2019-11-26 Package: Org mode version 9.3.4 (9.3.4-5-ga0f3bb-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20200210/) current state: ============== (setq org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".") (setq geiser-autodoc--inhibit t)) org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-babel-after-execute-hook '((lambda nil (if org-inline-image-overlays (progn (org-redisplay-inline-images))) ) ) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-with-sub-superscripts '{} org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-pretty-entities t org-odt-format-headline-function 'org-odt-format-headline-default-function org-agenda-files '("~/Personal_Planner/lockywolf_net.org" "~/Personal_Planner/cyberpunk_smarthome.org" "~/Personal_Planner/notes.org" "~/Personal_Planner/2020-04-28-hotkeys-to-remember.txt.org" "~/DevLinux/chibi-sicp/index.org" "~/Personal_Planner/Planner.org") org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-modules '(org-habits ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww) org-plantuml-jar-path "/usr/local/bin/plantuml.jar" org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] turn-on-org-cdlatex org-tempo-setup (lambda nil (add-to-list (quote org-structure-template-alist) (quote ("p" . "src plantuml :noweb no :exports both :file "))) (add-to-list (quote org-structure-template-alist) (quote ("SO" . "src scheme :exports both :results output"))) (add-to-list (quote org-structure-template-alist) (quote ("SV" . "src scheme :exports both :results value"))) (add-to-list (quote org-structure-template-alist) (quote ("SE" . "src scheme :exports code"))) (add-to-list (quote org-structure-template-alist) (quote ("EL" . "src elisp :exports both :results output"))) (add-to-list (quote org-structure-template-alist) (quote ("F" . "src f90 :exports both :results output"))) ) (lambda nil (modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")) (lambda nil (imenu-add-to-menubar "Imenu")) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-preview-latex-default-process 'imagemagick org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-latex-compiler "lualatex" org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((plantuml . t) (C . t) (scheme . t) (latex . t) (shell . t) (fortran . t)) org-log-done 'time org-startup-align-all-tables t org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql)) org-catch-invisible-edits t org-occur-hook '(org-first-headline-recenter) org-log-into-drawer t org-edit-src-auto-save-idle-delay 15 org-agenda-include-diary t org-structure-template-alist '(("F" . "src f90 :exports both :results output") ("EL" . "src elisp :exports both :results output") ("SE" . "src scheme :exports code") ("SV" . "src scheme :exports both :results value") ("SO" . "src scheme :exports both :results output") ("p" . "src plantuml :noweb no :exports both :file ") ("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse")) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-edit-src-turn-on-auto-save t org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-hierarchical-todo-statistics nil org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-babel-tangle-lang-exts '(("fortran" . "F90") ("latex" . "tex") ("D" . "d") ("C++" . "cpp") ("emacs-lisp" . "el") ("elisp" . "el")) org-format-latex-options '(:foreground default :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) org-confirm-shell-link-function 'yes-or-no-p org-link-parameters '(("attachment" :follow org-attach-open-link :export org-attach-export-link :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow eww :store org-eww-store-link) ("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 :export org-irc-export) ("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) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) (#1="news" :follow #[257 #2="\301\300\302Q!\207" [#1# browse-url #4=":"] 5 #5= "\n\n(fn URL)"] ) (#3="mailto" :follow #[257 #2# [#3# browse-url #4#] 5 #5#]) (#6="https" :follow #[257 #2# [#6# browse-url #4#] 5 #5#]) (#7="http" :follow #[257 #2# [#7# browse-url #4#] 5 #5#]) (#8="ftp" :follow #[257 #2# [#8# browse-url #4#] 5 #5#]) ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi)) org-latex-format-headline-function 'org-latex-format-headline-default-function org-agenda-start-with-follow-mode t org-link-elisp-confirm-function 'yes-or-no-p org-org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")) ) org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-tab-before-tab-emulation-hook '(org-tempo-complete-tag) org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-image-actual-width nil org-html-use-infojs t org-html-format-headline-function 'org-html-format-headline-default-function org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate org-use-sub-superscripts '{} org-use-speed-commands t org-latex-bib-compiler "biber" org-default-notes-file "~/Personal_Planner/notes.org" ) -- -- Vladimir Nikishkin (MiEr, lockywolf)