From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ME6jGhSY72M1SAAAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 16:07:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qLXNGhSY72MgBAEA9RJhRA (envelope-from ) for ; Fri, 17 Feb 2023 16:07:00 +0100 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 059AB2FB0E for ; Fri, 17 Feb 2023 16:06:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT2JX-0002L9-0b; Fri, 17 Feb 2023 10:06:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT2JN-0002G4-Qf for emacs-orgmode@gnu.org; Fri, 17 Feb 2023 10:06:14 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT2JL-0006Qw-HB for emacs-orgmode@gnu.org; Fri, 17 Feb 2023 10:06:09 -0500 Received: from localhost ([::ffff:102.85.219.29]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000103A05.0000000063EF97BA.00006DDC; Fri, 17 Feb 2023 08:05:29 -0700 Date: Fri, 17 Feb 2023 17:39:30 +0300 From: Jean Louis To: Ihor Radchenko Cc: Bruno BEAUFILS , emacs-orgmode@gnu.org Subject: Re: Bug: org-latex-export-to-pdf does not remove .tex file [9.4 (9.4-elpa @ /home/bruno/.emacs.d/elpa/org-9.4/)] Message-ID: Mail-Followup-To: Ihor Radchenko , Bruno BEAUFILS , emacs-orgmode@gnu.org References: <20230215184951.edu6n6k57lmfnqxz@settat> <87a61e4qcg.fsf@localhost> <20230216102249.uxhkbezoheb4mvdi@settat> <87fsb4d0ih.fsf@localhost> <20230217131845.ein4q6ig2gcytjtc@settat> <873574berm.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <873574berm.fsf@localhost> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676646420; a=rsa-sha256; cv=none; b=X6znugsiUs6gRSlnbskvJM+odHAxZmZtrotOqYpltLE3KyKnqn00dgTCOFayz8UT+uIo8m ksYhwIEksNyQZ1yWuc/imE8zHVSUTfVMZL9MlJUm1/rEF6HwpXeIClxi6NhkIQH+JO3oV9 lIraNANiyBCBYeldNEKfKB/+ZESKs9Z6xQCmCH/NlRO51jsypeaFNW8sPbkJFikhAibIjC GJZhxeWU4CwQoBOe+LB7sajSgAkTtAyX0J94Sj+EJLiRG7vVz5prndVGO3MvZ2HYw4cqdf 3H9m4LqQumXnqsQNbZsY5+30bH1dFGE9uate2S8ZA0jrmspheyg3nN9BvQktBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676646420; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NglDP5sTMs3NNgEUPQoXOPtrAFp68fKiYYHAX7+T6/g=; b=fiYK8Hm4koR+UuhVQCx+Y4qenqTsyrcKlYODX4/Lx5sjB7m+8veJItV7Ack/93G0BLSaxh bd7d2hH8zKJxYcXGEOUQaZezVtLxR0DY1NGH8uv84ifYDCCRilBb/jQM+2Rr8Hxui8TH6W dhex4EPEu2b0XfhPAnjJNn1a/02pvAtj2ODVoQaHXqEaqVrUsR35NXY6p2oRzEXSYyYXKa 9UQs5/vDB4ehqf7LIIUiFYG81rbG3DwErjngqzqA6ftQenXMmfr2bEukNolW8BrqypO2uF uwesd104aTYvvazE/Awz/tVTE3Zg6jAXA2zTwkVavMNDa5v6FJ6QEKdZVPDtvg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.43 X-Spam-Score: -2.43 X-Migadu-Queue-Id: 059AB2FB0E Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-TUID: RNgCMMaVtWMt * Ihor Radchenko [2023-02-17 16:32]: > Bruno BEAUFILS writes: > > > On Fri, Feb 17, 2023 at 10:55:34AM +0000, Ihor Radchenko wrote: > >> > How so? > >> > >> latexmk -interaction=nonstopmode > > > > Still do not get the problem. I though that the exit code of the > > underlying process was used but after having try to understand some of > > the ox-latel.el I discover that it seems to be done another way > > (analysing the output if I am right). > > Even if we used exit code, what would it achieve? - user wants PDF file - with exit code other but zero there will be no PDF file - display error or move user straight to LaTeX file to try it out manually or find what is wrong. Personally I use exit code from LaTeX processing. - I like to be careful with existing PDF files, as sometimes PDF file is exported in different way, and maybe I am making mistake. So I like to be cautious about it. - Here below `latex-function' must return zero and `pdf-file' must exist for system to update it's Hyperlink correctly, and to launch Evince PDF viewer. - But if error status is not zero, I want to find myself in LaTeX file straight, then I can try C-c C-a to understand why it did not work. (defun hyperscope-latex-to-pdf (id) (let* ((default-directory (hyperscope-expand-directory-for-id id)) (latex-file (hyperscope-hyperdocument-file-name-full id "tex")) (text (hyperscope-text id)) (pdf-file (hyperscope-hyperdocument-file-name-full id "pdf")) (latex-function (lambda () (call-process "pdflatex" nil "*pdflatex*" nil latex-file)))) (string-to-file-force text latex-file) (when (and (file-exists-p pdf-file) (y-or-n-p "Delete existing PDF? ")) (delete-file pdf-file)) (cond ((and (zerop (funcall latex-function)) (file-exists-p pdf-file)) (rcd-db-update-entry "hyobjects" "hyobjects_link" id pdf-file hs-db) (hyperscope-evince pdf-file)) (t (rcd-warning-message "Could not create PDF") (find-file latex-file))))) If I would just assume that `latex' command "just worked", that means I am blindly continuing with some other functions thereafter, but that would mean I am creating some errors. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/