From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pPE2N7uurWDjyAAAgWs5BA (envelope-from ) for ; Wed, 26 May 2021 04:13:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SGphMruurWAKEgAAB5/wlQ (envelope-from ) for ; Wed, 26 May 2021 02:13:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.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 88EA01E306 for ; Wed, 26 May 2021 04:13:13 +0200 (CEST) Received: from localhost ([::1]:43652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llj2k-0008Lt-H2 for larch@yhetil.org; Tue, 25 May 2021 22:13:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llihb-0005yU-Pp for emacs-orgmode@gnu.org; Tue, 25 May 2021 21:51:19 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119]:57540 helo=mail.kisara.moe) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llihU-0007R6-IO for emacs-orgmode@gnu.org; Tue, 25 May 2021 21:51:19 -0400 Received: from mk-desktop (unknown [90.215.36.244]) by mail.kisara.moe (Postfix) with ESMTPSA id BC90CA0520 for ; Wed, 26 May 2021 03:46:04 +0200 (CEST) From: mohsin kaleem To: emacs-orgmode@gnu.org Subject: [kisara.moe] Bug: async latex export fails due to post-process lambda [9.4.4 (release_9.4.4-188-ga8df76 @ /home/mohkale/.config/emacs/lisp/straight/build/org/)] Date: Wed, 26 May 2021 02:44:30 +0100 Message-ID: <87y2c21d6p.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.38.65.119; envelope-from=mohkale@kisara.moe; helo=mail.kisara.moe X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) BAYES_00=-1.9, NULL_IN_BODY=1.596, PP_MIME_FAKE_ASCII_TEXT=0.998, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 25 May 2021 22:08:59 -0400 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621995195; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=UZqiCN3rXqf2Wxl/3jbuJw5IOtRikjD5yLE33fhCYcs=; b=sSVBXi/mwC0Iwitli2re1yVQuvPzsIcCkABA0AgXIv7CiBB9UZpjJCNzqnejOeAl2W1ANY sf183tQ8G1kMh4THTt8nA/AaVgbmUcA1pKqdCH08MyvintY3LJNXNVjlb9O6leAc8WNRtZ fDCftVmFFKMDGP/AdzIDf8FcXZj4dec1Do/Lk9CniA2cbeFegEkM3o+ySA7uAzeJmQZnmv 1kcri3pKMDenj8z7fS+4AFIm4n00FhyTdwF9WWMweG+i9g4KzFR4bcl21tukEujf/VirN/ Cq2KwKLIYrsGOKZu0kMZcieo752TK0hyMmAo/gNzSyb8EA/pZkfdqjnvqdgi+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621995195; a=rsa-sha256; cv=none; b=QzQy1ymcT7gH1VFt/WZAingFqeJbk8JqgYrszidiWRoH4xBaGwhlIdG5hQZC43CCVhnreX 2A51NJ+2CTZdBsWVbsgtgEARryUAj86zdsRLBHLD5ZKSjxN8/SLEc6n8+Y0nB8wXjMWklg IGD8ci3tICCetuOyshkt2G4d1kUut13EhkMJEP/5hybuBrd715IlQqq3A7SEC4yE15Ikxe YyevOv7Dy/+txhYB8H8qoL1rHMD42MRSK9o8QWrlNA6hop7WZLdJU+8m2ApEa9t1pNuW9V Wax8gUtC0OLKqOJ2wACPStpKWOGZifZFZcYUKLCp2KQsyrWtyCT6wy4XrW8vOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kisara.moe (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 88EA01E306 X-Spam-Score: -2.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: UgNCxb9an87M --=-=-= Content-Type: text/plain I've been trying to get async-export setup for the past day and I've found it keeps failing due to an unexpected # in the compilation script generated by org-export. After doing a little debugging I found the script contained ~(funcall '# "foo.tex")~ so at some point in the export org-mode is including an evaluated lambda when a quoted one is required. I tracked down the bug to the ~org-latex-export-to-pdf~ function and fixed it by quoting the unquoted lambda. --=-=-= Content-Type: #("text/x-patch" 0 1 (face completions-first-difference completion-score 0.0)) Content-Disposition: inline; filename=async-latex.patch Content-Transfer-Encoding: 8bit Content-Description: fix diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index fb9fc3cd6..d3220d2bb 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3639,7 +3639,7 @@ Return PDF file's name." (let ((outfile (org-export-output-file-name ".tex" subtreep))) (org-export-to-file 'latex outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + `(lambda (file) (org-latex-compile file))))) (defun org-latex-compile (texfile &optional snippet) "Compile a TeX file. --=-=-= Content-Type: text/plain Content-Transfer-Encoding: 8bit I haven't had a chance to check any of the other exporters although this may be an issue for them as well. Emacs : GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4) of 2021-05-24 Package: Org mode version 9.4.4 (release_9.4.4-188-ga8df76 @ /home/mohkale/.config/emacs/lisp/straight/build/org/) current state: ============== (setq org-archive-location "/home/mohkale/.config/emacs/org/archive.org::* %s" org-link-elisp-confirm-function 'yes-or-no-p org-directory "/home/mohkale/.config/emacs/org" org-ditaa-jar-path "/home/mohkale/.config/emacs/var/org/bin/ditaa.jar" org-ref-cite-onclick-function '(closure (t) (_) (org-ref-cite-hydra/body)) org-ref-create-notes-hook '((lambda nil (org-narrow-to-subtree) (insert (format "cite:%s\n" (org-entry-get (point) "CUSTOM_ID")))) ) org-hide-emphasis-markers t org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-ref-insert-cite-function 'org-ref-consult-insert-cite-link org-log-done 'time org-fontify-done-headline nil org-ref-open-notes-function '(lambda nil (org-show-entry) (outline-show-branches) (outline-show-children) (org-cycle '(64)) (recenter-top-bottom 0)) org-log-into-drawer "LOGBOOK" org-ref-show-citation-on-enter nil org-agenda-files '("/home/mohkale/.config/emacs/org/notes/index.org" "/home/mohkale/.config/emacs/org/notes/projects/.dotfiles.org" "/home/mohkale/.config/emacs/org/notes/projects/ColorWheel.org" "/home/mohkale/.config/emacs/org/notes/projects/dotty.org" "/home/mohkale/.config/emacs/org/notes/projects/flakes.org" "/home/mohkale/.config/emacs/org/notes/projects/mohkale.io.org" "/home/mohkale/.config/emacs/org/notes/projects/puddle.org" "/home/mohkale/.config/emacs/org/notes/projects/software-hut.org" "/home/mohkale/.config/emacs/org/notes/projects/vimish-fold.org") org-capture-templates '(("t" "Todo" entry (file+function "/home/mohkale/.config/emacs/org/notes/index.org" (closure ((heading-regexp . "\\* TODOs \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* TODOs [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) ) #'doct--fill-template :empty-lines 0 :prepend t :doct (:doct-name "Todo" :keys "t" :before-finalize org-update-parent-todo-statistics :function (closure ((heading-regexp . "\\* TODOs \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* TODOs [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) :todo-state "TODO" :template ("* %{todo-state} %?" " %U") :type entry :hook flyspell-mode :file "/home/mohkale/.config/emacs/org/notes/index.org" :prepend t :empty-lines 0 :doct-custom (:todo-state "TODO")) ) ("T" "Todo with Clipboard" entry (file+function "/home/mohkale/.config/emacs/org/notes/index.org" (closure ((heading-regexp . "\\* TODOs \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* TODOs [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) ) #'doct--fill-template :empty-lines 0 :prepend t :doct (:doct-name "Todo with Clipboard" :keys "T" :template ("* %{todo-state} %?" " %U" " %c") :before-finalize org-update-parent-todo-statistics :function (closure ((heading-regexp . "\\* TODOs \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* TODOs [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) :todo-state "TODO" :type entry :hook flyspell-mode :file "/home/mohkale/.config/emacs/org/notes/index.org" :prepend t :empty-lines 0 :doct-custom (:todo-state "TODO")) ) ("d" "Itinerary" entry (file+function "/home/mohkale/.config/emacs/org/notes/index.org" (closure ((heading-regexp . "\\* Itinerary") (heading . "* Itinerary") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) ) #'doct--fill-template :empty-lines 0 :prepend nil :doct (:doct-name "Itinerary" :keys "d" :prepend nil :function (closure ((heading-regexp . "\\* Itinerary") (heading . "* Itinerary") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) :template ("* %{todo-state} %?") :before-finalize org-update-parent-todo-statistics :todo-state "TODO" :type entry :hook flyspell-mode :file "/home/mohkale/.config/emacs/org/notes/index.org" :empty-lines 0 :doct-custom (:todo-state "TODO")) ) ("j" "Job Application" entry (file+function "/home/mohkale/.config/emacs/org/notes/index.org" (closure ((heading-regexp . "\\* Job Search \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* Job Search [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min)) (search-forward-regexp heading-regexp) (line-beginning-position)) ) (error nil)) ) ) (if heading-point (goto-char heading-point) (goto-char (point-min)) (save-excursion (insert heading "\n"))) ) ) ) "* TODO [#%^{Priority|A|B|C}] %(org-get-link+) - %^{Company}\n DEADLINE: %^{deadline}t\n%^{LOCATION}p%^{DURATION}p\n %?" :empty-lines 0 :prepend t :doct (:doct-name "Job Application" :keys "j" :function (closure ((heading-regexp . "\\* Job Search \\[[[:digit:]]*/[[:digit:]]*\\]") (heading . "* Job Search [/]") t) nil (let ((heading-point (condition-case nil (progn (save-excursion (goto-char (point-min) )