From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20682: 25.0.50; Enable users to combine --script and --quick Date: Thu, 28 May 2015 14:48:04 -0400 Message-ID: References: <878uc8pzyc.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432838971 8195 80.91.229.3 (28 May 2015 18:49:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 May 2015 18:49:31 +0000 (UTC) Cc: 20682@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 28 20:49:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yy2re-0008AM-HS for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 May 2015 20:49:10 +0200 Original-Received: from localhost ([::1]:60344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy2rd-0007P2-U9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 May 2015 14:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy2ra-0007Ot-F8 for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 14:49:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy2rX-0006yQ-6Y for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 14:49:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy2rX-0006yL-2K for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 14:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yy2rW-0004RW-MW for bug-gnu-emacs@gnu.org; Thu, 28 May 2015 14:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2015 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20682 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20682-submit@debbugs.gnu.org id=B20682.143283888917018 (code B ref 20682); Thu, 28 May 2015 18:49:02 +0000 Original-Received: (at 20682) by debbugs.gnu.org; 28 May 2015 18:48:09 +0000 Original-Received: from localhost ([127.0.0.1]:59795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy2qe-0004QP-6b for submit@debbugs.gnu.org; Thu, 28 May 2015 14:48:09 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:57465) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy2qc-0004QF-EB for 20682@debbugs.gnu.org; Thu, 28 May 2015 14:48:07 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t4SIm3oV016373; Thu, 28 May 2015 14:48:04 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9B0E2660D6; Thu, 28 May 2015 14:48:04 -0400 (EDT) In-Reply-To: <878uc8pzyc.fsf@web.de> (Michael Heerdegen's message of "Thu, 28 May 2015 15:57:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5320=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5320> : inlines <3095> : streams <1446230> : uri <1942656> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103281 Archived-At: > This is a feature request to enable users to write emacs scripts (=E0 la > --script) that can be executed in a way that --quick does (i.e. avoid > loading site stuff). I'm not very much in favor of adding yet another ad-hoc arg for that. OTOH I'd be happy to see a new argument that lets you provide various args as one. E.g. "emacs --args=3D-Q,--script" which would be more generally useful to deal with the limit of only one arg in shebang. Given the size limit of shebang lines, we'd also want this extra arg to be shortish. An alternative would be to combine --args and --script, so you could say "emacs --script=3D-Q" to get what you're asking for. > - There are no messages like: > Loading 00debian-vars... > Loading /etc/emacs/site-start.d/50a2ps.el (source)... > Loading /etc/emacs/site-start.d/50autoconf.el (source)... > Loading /etc/emacs/site-start.d/50cmake-data.el (source)... > Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... > Loading debian-ispell... > Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (so= urce)... > Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (sour= ce)... > Loading /etc/emacs/site-start.d/51debian-el.el (source)... > when running a script. That would be a nice thing if you wanted to > write something like wc or so. I consider those messages as bugs. BTW, Ideally, Debian packaging of Emacs packages should move towards installing those packages as ELPA packages (i.e. install them into one of package-directory-list and let Emacs load their -autoloads.el file). > - It would speed up startup by a factor of five (for me, 0.01 secs > vs. 0.002 secs when using the wrapper from above) We should look into speeding this up, BTW. Part of it might be a problem on Debian's side (where those files do too much), but I suspect that the problem goes deeper and we should figure out how to improve it. E.g. package.el's handling of package initialization could use some optimization for the usual case where the set of packages is the same as last time. E.g. Ideally we could cache somewhere the last set of packages seen along with the resulting set of -autoloads.el files that we loaded and actually keep the concatenation of those files into a single file which we'd load instead. Of course, this won't work currently because those files are "position dependent" (e.g. they use load-file-name or #$), but we should try and solve those problems. > - It might not be necessary to load site stuff. On the contrary, if > you want to write portable scripts, it might be more desirable to be > able to write environment independent scripts I tend to consider that any -autoloads.el file should be 100% harmless, or at least that the kind of changes they cause should be no worse than the kinds of changes you experience when going from Emacs-A.B to Emacs-A.C or Emacs-A+1.C Stefan PS: Just to clarify, this should not be taken as an argument against providing a way to get both -Q and --script as a single arg.