From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4J/cL8GUZGArWwEAgWs5BA (envelope-from ) for ; Wed, 31 Mar 2021 17:26:57 +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 6LfgKcGUZGBVdQAAB5/wlQ (envelope-from ) for ; Wed, 31 Mar 2021 15:26:57 +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 19690852D for ; Wed, 31 Mar 2021 17:26:57 +0200 (CEST) Received: from localhost ([::1]:35428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRckC-0005Jg-6n for larch@yhetil.org; Wed, 31 Mar 2021 11:26:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRcjI-0005JZ-3Y for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 11:26:00 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:35340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRcjF-0006o0-0O for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 11:25:59 -0400 Received: by mail-pg1-x52c.google.com with SMTP id q10so3253237pgj.2 for ; Wed, 31 Mar 2021 08:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=p6p/+23Xv0K2TAiRGDMYCrhi4eP1s1jALnemj8UkE98=; b=vBbSJtI7hhlgyQZ67ZtITirunz1gkcRB3Ce8ksgeHpdZM96N/TY7iMoKyC268LLohl G4o2S2DYPcFew91+M91izQoRaKaFq34jmXJRjAUbCcTNv78BCJnvkeZxz1qpXosCVw3p hXiNGtXs34chvqPiLlVFvXmOx/1f5co8zWGUwtVG8+U+iLVAckBJohRCJVrSEyTNKPYz T8PSeaUupcCuLhRNjhM9MhBWEv1qBc/Eah2JrXJB0IMPL0UYoJnP4hiTReoFbNYnDEVq DyLZTB4bzERieHQc+zCvQkOvqc8VUgjWHCr3GvdkrRYi1uZkY2efWUfP9oiRdyzY/F9m +trw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:message-id:date :mime-version; bh=p6p/+23Xv0K2TAiRGDMYCrhi4eP1s1jALnemj8UkE98=; b=HmOlwiarSYN6mLodPaWBN4lAAmkOPDGUAad68HeRX5qrZZffMsR50qKsU+z6/yclIu FV6Upb5yfruvTGNfzoFxXkr8jDx6pAE/glqi9jdUKAzITUojOPrRBKnL6iLYcUOztjLt dAkX3tnqdhk36YLD9wWioRt5vnXYz6d3M35COjrw9N3Ll/jyp5Xo9uKQq37kZMm0OhLg 1xG/XcN9IXIm6vafn1jSABLYY6AlS1vKGTPVjSFYnVC4ZBDIT8PieG6kQU8KWMxl4pOO Amp2ZPYNm9pquBGh5U84a9gEpRGQak6Oefp2+OKdE1McFCxSMqidzOjgwGX4jOjqsOKl 8+7w== X-Gm-Message-State: AOAM5334QhDnmrGRxCFyp3X8DtGogajVt3FsNjVeee2j565JNoLmdeL9 VWOoYPfxjv1JrkZ6CAYk4UUkVhGWY/0= X-Google-Smtp-Source: ABdhPJyKQXoCcQK3Jf+WcOZ8UqcaIHWcyDab+LKF3pf8QNx6xvFI7QPg+KcaycVb5fpWLTsvEBXwfA== X-Received: by 2002:a05:6a00:2302:b029:203:889c:26ff with SMTP id h2-20020a056a002302b0290203889c26ffmr3393484pfh.14.1617204355215; Wed, 31 Mar 2021 08:25:55 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id g72sm2671737pfb.189.2021.03.31.08.25.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 08:25:54 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: org-mode-email Subject: [PATCH] avoid loading major modes when exporting to file Message-ID: <87lfa3fips.fsf@gmail.com> Date: Wed, 31 Mar 2021 23:25:51 +0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=tecosaur@gmail.com; helo=mail-pg1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.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=1617204417; 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:dkim-signature; bh=p6p/+23Xv0K2TAiRGDMYCrhi4eP1s1jALnemj8UkE98=; b=lE8HhrmDrGlJSjzujTOE1zR4nXmX2zfQS+gna7AGzN5xCmoHIoi3rew3xh3Esxu3sis5xe H0I5mM3e3RsNaounOPOxPwxr/CXfk3L+KMPTI+EZYa6BDqrslAv6XnkdyygBoWIfvMdo6A 0DbaVCGI3t/LDt/s+2YmMePl32MlUFvl9ic/MZs/58EY5oQtimv3YlINdiLp/QgIMH8SPe kJH+bXqmH6UDjyawJGZBaanWM88J/8PkP8KIF0qCCkfAz5IVx9xoPKna0EMGfTiSprhtuj j+maNbATOLEO9/zwsS1L11rhcXLJfDLv1OPz4I+kVgSidNHXWIoMgOjGq/fABg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617204417; a=rsa-sha256; cv=none; b=H6/ztZLgekh1yCpZf7yUhmAY7N0Fws89z0ItV9prh5rhVDasSYS4GYCJ0rrmuA2HyvqkkR 2oPpn/+ALpI+rIzK3U9bd9SKyUFlGBbGjimBv9wGe9AKLBOKi2TWPAhWErmb5Lcx88N9fQ Vx547+lkHugzshgTbIoX/Neu9IWFiErRTZZ/vivR0uejPA4a4dq1BP2H4/eUQopCXQy69G NOQGJxeAyeIRe2ekJvC7BPpCbiqhspHkziLB9dp0Oaya5NeCAI6aK1wrmgIvwRqUg2oVf0 S7C5COKM3vd4SMj2mH2VXyKx9Rd2efCIM2tXoryNt58ro1iq0ZhtRganU8WtSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=vBbSJtI7; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=vBbSJtI7; dmarc=pass (policy=none) header.from=gmail.com; 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: 19690852D X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: P46PRr0Tr6bM --=-=-= Content-Type: text/plain Hello, Another little patch, this time a one-liner. I think the commit description is pretty thorough, so give that a look. TLDR; it makes `org-export-to-file' behave a bit more nicely. -- Timothy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ox-don-t-load-a-major-mode-when-exporting-to-file.patch >From eb9d7c038dbb9e7a4b89edf61db83a31dda27170 Mon Sep 17 00:00:00 2001 From: TEC Date: Wed, 31 Mar 2021 23:16:58 +0800 Subject: [PATCH] ox: don't load a major-mode when exporting to file * lisp/ox.el (org-export-to-file): Prior to this, when `org-export-to-file' was called it activated the major mode for that file type based on `auto-mode-alist'. This can be mildly annoying in various ways as loading the major mode (1) makes the export take longer, (2) can produce unwanted "noise" while initialising, namely warnings and errors related to the mode itself, (3) can produce spurious files like an .auctex-auto folder. By locally binding `auctex-auto' to nil all of these undesirable behaviours can be avoided. --- lisp/ox.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ox.el b/lisp/ox.el index f705bc83a..96d2866dd 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -6388,7 +6388,8 @@ (defun org-latex-export-to-latex (declare (indent 2)) (if (not (file-writable-p file)) (error "Output file not writable") (let ((ext-plist (org-combine-plists `(:output-file ,file) ext-plist)) - (encoding (or org-export-coding-system buffer-file-coding-system))) + (encoding (or org-export-coding-system buffer-file-coding-system)) + (auto-mode-alist nil)) (if async (org-export-async-start `(lambda (file) -- 2.30.1 --=-=-=--