emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] avoid loading major modes when exporting to file
Date: Sun, 02 May 2021 01:26:30 +0800	[thread overview]
Message-ID: <874kfmbc1l.fsf@gmail.com> (raw)
In-Reply-To: <874kfm8kgs.fsf@gnu.org>


Bastien <bzg@gnu.org> writes:

> This even be "auto-mode-alist" instead of "(auto-mode-alist nil)".

Ah, it can indeed.

> I'm still unsure the patch is correct: what if people *need* major
> mode initialization before any contents is exported to a file?

I haven't responded to this concern, because I haven't been able to
conceive of a single situation where loading the normal-mode for the
exported file could be desirable.

>> 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.
>
> I find it useful to have a small description of the change and why it
> is needed in the body of the email, when a patch is attached.

I think I may have been become overly used to how convenient mu4e is for
showing patches inline 😅.

For the sake of anyone just looking at the Email body, here's what I
considered to be an informative commit message, subtly reworded:

Currently, when `org-export-to-file' is 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.

--
Timothy


  reply	other threads:[~2021-05-01 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 15:25 [PATCH] avoid loading major modes when exporting to file Timothy
2021-05-01 16:52 ` Bastien
2021-05-01 17:26   ` Timothy [this message]
2021-05-03 17:25     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kfmbc1l.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).