Bug#334347: [Pkg-octave-devel] Re: Inappropriate user-level configuration in system files

Peter S Galbraith psg at debian.org
Wed Oct 19 14:47:42 UTC 2005


Rafael Laboissiere <rafael at debian.org> wrote:

> [N.B. 1: Niels, Dirk, and other members of the DOG: I am moving this
> discussion to debian-emacs.  I cannot really make my mind on this issue
> and I hope that broadening the discussion will help us to find a
> consensus.]
> 
> [N.B. 2: Please, keep Cc: to 334347 at bugs.debian.org]
> 
> Dear debian-emacsen lurkers,
> 
> I am bringing Bug#334347 to your attention.  Here is a summary of the
> events:
> 
> * Niels Möller files a bug report against octave2.1-emacsen complaining
>   that /etc/emacs/site-start.d/50octave.el fiddles with user preferences.
>   
> * Dirk Eddelbuettel, the original author of that file, considers this a
>   non-bug, since 50octave.el is a configuration file, which can be edited
>   at will.  Besides, the defaults set are reasonable.
> 
> * Niels Möller gives a long reply, making his arguments clearer.
> 
> I would like to know what people in this mailing list think about this
> issue.


This isn't even close.

First, I'll say that I have long advocated that while "some" Emacs
system configuration could stay under /etc, the core of it should get
out of there.  Consider that many Emacs add-on poackage get setup as if
there were installed when they are removed (but not purged) and the
/etc/emacs/site-start.d/ files remain.

The content of /etc/emacs/site-start.d/ files should be limited to the
autoloads and defgroups that Emacs would ship with by default if the
packaged files were included in Emacs in the first place, no more.  As
such, that content doesn't really belong under /etc and I don't want
anyone to edit it in my packages.  For large packages like
emacs-goodies-el, the startup file does nothing more that add to the
load-path and load the real setup file located outside of /etc.

Niels is completely right in my view (Sorry Dirk).  Nobody would be
adding personal preferences to mode hooks in these files.  Nobody should
be adding anything to hooks at all in packages anyway.  Hooks are for
the end user. If you think it's a good idea to have it, then create a
defcustom to enable it (see below).

In particular, font-lock has been enabled using (global-font-lock-mode)
for ages now and (even better) people that want font-lock can simply
click on their "Options" menu and enable it.  I have for years.  You can
be sure that even loading font-lock doesn't enable it because
"(elisp)Coding Conventions" states:

   * When a package provides a modification of ordinary Emacs behavior,
     it is good to include a command to enable and disable the feature,
     Provide a command named `WHATEVER-mode' which turns the feature on
     or off, and make it autoload (*note Autoload::).  Design the
     package so that simply loading it has no visible effect--that
     should not enable the feature.(2)  Users will request the feature
     by invoking the command.

So if you like a set of setups that you think make it easy for new
users, then create a defcustom in your package that sets them up and
document it in the README.Debian file.  But don't ship the package with
it enabled.

BTW, Rafael, I notice that you are the author of
50dictionaries-common.el and it also has some extraneous code in there
that should also be handled by a defcustom.  But you are no longer the
maintainer so I'll fill a bug report.

Thanks,
-- 
Peter




More information about the Pkg-octave-devel mailing list