From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/org ec6d1df 2/2: lisp/ox.el (org-export-to-file): Don't load the major mode Date: Mon, 03 May 2021 14:33:16 -0400 Message-ID: References: <20210503175717.27525.97949@vcs0.savannah.gnu.org> <20210503175719.483AE20D0E@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32606"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: TEC , Bastien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 03 20:34:08 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lddOR-0008N3-T1 for ged-emacs-devel@m.gmane-mx.org; Mon, 03 May 2021 20:34:07 +0200 Original-Received: from localhost ([::1]:47126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lddOQ-0004k8-Tu for ged-emacs-devel@m.gmane-mx.org; Mon, 03 May 2021 14:34:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lddNk-0004J9-9j for emacs-devel@gnu.org; Mon, 03 May 2021 14:33:24 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lddNh-0006hK-5b; Mon, 03 May 2021 14:33:23 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A010C100216; Mon, 3 May 2021 14:33:18 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0562D100091; Mon, 3 May 2021 14:33:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1620066797; bh=PFJjMnbh72/HtUXmnQZSbqk1Wjw+Np0ht0jTVmVkFxU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Bi++5km27+iwk+njnVIMPZzy7lTc+vRzA5AONyzu9EWJPHpNRhKSVAwzJ94mYNy9B yp17kSV25KCAn4PMkbbeXmGMV6O05/oMkVMGuo16+NueFKGOt8ks62xIIlNIUfn4wm v4915hjs++w2pZAgQ6IaxBQ7enTXNrOcSNvbT1SPdq9WR/unj+fP4hWfd+TH/HKQvq lyJ86OYfoaijoACDi6V8PntTmrD8rdpyQvbAGOL9Cv+kvKxlgmyJM0WRWOedemLrXh IkhTL4OOxbzIj46iRLfSppx3Qm2F4lCyPuk9xIzNMyRaUSzj0ElRqasWr4vOw0GvMd dQblB0JCzS4BQ== Original-Received: from alfajor (unknown [108.161.125.61]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C4B5C12031F; Mon, 3 May 2021 14:33:16 -0400 (EDT) In-Reply-To: <20210503175719.483AE20D0E@vcs0.savannah.gnu.org> (ELPA Syncer's message of "Mon, 3 May 2021 13:57:19 -0400 (EDT)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268831 Archived-At: > 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 `auto-mode-alist' to nil, all of these undesirable > behaviours can be avoided. Hmm... modes don't set themselves unless we ask for it (e.g. by using `file-find-noselect` instead of `insert-file-contents`), so maybe a better option is to change the code that causes the major modes to be set so that it doesn't happen? Binding `auto-mode-alist` to nil is not the end of the world, but it's a kind of ugly hack and inevitably comes with undesirable side-effects (e.g. any ELisp package that happens to be loaded during this time and whose initialization code adds/removes entries from `auto-mode-alist` will be affected). Stefan