bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20682: 25.0.50; Enable users to combine --script and --quick


From: Michael Heerdegen
Subject: bug#20682: 25.0.50; Enable users to combine --script and --quick
Date: Thu, 28 May 2015 15:57:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hello!

This is a feature request to enable users to write emacs scripts (à la
--script) that can be executed in a way that --quick does (i.e. avoid
loading site stuff).

AFAIK this is not directly possible currently, because if you try with a
file starting like this:

#!/usr/bin/emacs -Q --script

the "#!" implementation on most Unices will not be able to pass more
than one argument to the interpreter.

The only thing that can be done to force --quick is to define a separate
interpreter like this:

--8<---------------cut here---------------start------------->8---
#!/bin/bash

emacs --quick --script $@
--8<---------------cut here---------------end--------------->8---

(suggested by address@hidden in g.e.help).

I have been told in the same thread that if --script would be available
as -s, one could start scripts with "#!/usr/bin/emacs -Qs" and that
would already solve the problem.


These are the main reason why using --quick can be desirable:

 - 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 
(source)...
     Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
     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.

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

 - 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


Many thanks,

Michael.




In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
 of 2015-05-27 on drachen
Windowing system distributor `The X.Org Foundation', version 11.0.11701000
System Description:     Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB






reply via email to

[Prev in Thread] Current Thread [Next in Thread]