unofficial mirror of 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <>
To: TEC <>, Bastien <>
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	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (ELPA Syncer's message of "Mon,  3 May 2021 13:57:19 -0400 (EDT)")

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


       reply	other threads:[~2021-05-03 18:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
2021-05-03 18:33   ` Stefan Monnier [this message]
2021-05-03 19:38     ` 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: [elpa] externals/org ec6d1df 2/2: lisp/ox.el (org-export-to-file): Don'\''t load the major mode' \

* 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 emacs-devel/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 emacs-devel emacs-devel/ \
	public-inbox-index emacs-devel

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