unofficial mirror of
 help / color / mirror / code / Atom feed
From: Timothy <>
To: Bastien <>
Cc: org-mode-email <>
Subject: Re: [PATCH] avoid loading major modes when exporting to file
Date: Sun, 02 May 2021 01:26:30 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Bastien <> 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.


  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 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:

  List information:

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

  git send-email \ \ \ \ \
    --subject='Re: [PATCH] avoid loading major modes when exporting to file' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of

This inbox may be cloned and mirrored by anyone:

	git clone --mirror orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ \
	public-inbox-index orgmode

Example config snippet for mirrors.
Newsgroups are available over NNTP:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git