ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexander Bokovoy <ab@altlinux.ru>
To: devel@linux.iplabs.ru
Subject: Re: [devel] Re: [mdk-re] /etc/emacs/site-start.d
Date: Sat, 5 May 2001 19:57:00 +0300
Message-ID: <20010505195700.B3380@boids.avilink.net> (raw)
In-Reply-To: <20010505171647.7044e4ca.vsu@mivlgu.murom.ru>; from vsu@mivlgu.murom.ru on Sat, May 05, 2001 at 05:16:47PM +0400

On Sat, May 05, 2001 at 05:16:47PM +0400, Sergey Vlasov wrote:
> > установленные после появления этих пользователей - в соответствии с
> > содержимым /etc/emacs/site-start.d. Правда, судя по названию каталога,
> > прописывать такую команду предполагалось все-таки в общесистемный
> > /usr/share/emacs/site-lisp/site-start.el, но в этом случае у
> > пользователя
> > нет простого способа отменить загрузку этих файлов.
> 
> Вот еще один вариант реализации. В /usr/share/emacs/site-lisp кладем файл
> package-autoload.el:
> 
> ;;; package-autoload.el --- run package autoload files
> 
> ;; Copyright (C) 2001 by Free Software Foundation, Inc.
> 
> ;; Author: Sergey Vlasov <vsu@altlinux.ru>
> ;; Keywords: extensions
> 
> ;; This file is free software; you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation; either version 2, or (at your option)
> ;; any later version.
> 
> ;; This file is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
> 
> ;; You should have received a copy of the GNU General Public License
> ;; along with GNU Emacs; see the file COPYING.  If not, write to
> ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
> ;; Boston, MA 02111-1307, USA.
> 
> ;;; Commentary:
> 
> ;; This file loads .el files from /etc/emacs/site-start.d.  Files in
> ;; this directory are supposed to be autoload files for Emacs add-on
> ;; packages.
> 
> ;;; Code:
> 
> (mapcar 'load-file 
> 	(directory-files "/etc/emacs/site-start.d" t "\\.el$"))
> 
> (provide 'package-autoload)
> 
> ;;; package-autoload.el ends here
> 
> В этом же каталоге в файле default.el пишем:
> 
> (require 'package-autoload)
> 
> В /etc/skel*/.emacs в начало добавляем:
> 
> (require 'package-autoload nil t)
> 
> В результате получаем следующее:
> 
> 1. У новых пользователей с ~/.emacs из нового etcskel в начале обработки
> ~/.emacs загрузятся все файлы автозагрузки из /etc/emacs/site-start.d. При
> этом require в default.el молча проигнорируется.
> 
> 2. У пользователей со старым ~/.emacs файлы автозагрузки будут грузиться
> из default.el, т.е. после обработки ~/.emacs. Из-за этого в ~/.emacs
> нельзя будет настраивать эти пакеты, если не добавить предварительно
> строку (require 'package-autoload). Если дополнительно не настраивать, все
> будет работать и так.
> 
> 3. Пользователи, которым по каким-то причинам не нравится автозагрузка
> файлов из /etc/emacs/site-start.d, могут выбросить из ~/.emacs
> соответствующую команду и отменить загрузку default.el, установив
> inhibit-default-init.
> 
> 4. Наконец, если в системе установлен новый пакет etcskel, но старый
> emacs, в котором нет файла package-autoload.el, проблем при запуске Emacs
> тоже не возникнет (за исключением незагрузки файлов из
> /etc/emacs/site-start.d), поскольку (require 'package-autoload nil t)
> игнорирует отсутствие запрошенного файла.
> 
> Ваши замечания?
Выглядит красиво. Олег, что Вы скажете?
-- 
С уважением,
    Александр Боковой.

ALT Linux Team // www.altlinux.ru
-- You won't skid if you stay in a rut.
		-- Frank Hubbard
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel


  reply	other threads:[~2001-05-05 16:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-04  6:51 ` Dmitry V. Levin
2001-05-04  6:46   ` Oleg Tihonov
2001-05-04  7:09     ` Dmitry V. Levin
2001-05-04  7:08       ` Oleg Tihonov
2001-05-04  7:30         ` Dmitry V. Levin
2001-05-04  7:41           ` Oleg Tihonov
2001-05-04  8:33             ` Dmitry V. Levin
2001-05-04  8:47               ` Oleg Tihonov
2001-05-04  9:16                 ` Sergey Vlasov
2001-05-04  9:28                   ` Oleg Tihonov
2001-05-04 10:36                     ` Sergey Vlasov
2001-05-04 20:39             ` Ivan Zakharyaschev
2001-05-05  9:08               ` Sergey Vlasov
2001-05-05  9:24                 ` Dmitry V. Levin
2001-05-05  9:37                   ` Sergey Vlasov
2001-05-07  7:31                   ` Oleg Tihonov
2001-05-05 10:07                 ` Ivan Zakharyaschev
2001-05-05 10:43                   ` Sergey Vlasov
2001-05-05 13:16                     ` Sergey Vlasov
2001-05-05 16:57                       ` Alexander Bokovoy [this message]
2001-05-07  7:43                         ` Oleg Tihonov
2001-05-07  7:51                           ` Oleg Tihonov
2001-05-07  7:21               ` Oleg Tihonov
2001-05-04  8:49       ` Sergey Bolshakoff

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20010505195700.B3380@boids.avilink.net \
    --to=ab@altlinux.ru \
    --cc=devel@linux.iplabs.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git