From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Debian's idiosyncratic complexification of Emacs Date: Tue, 22 Jul 2008 16:22:41 +0200 Message-ID: <4885ED31.9090402@gmail.com> References: <4eb0089f0807111345h13eccdds9b2cf43370b94074@mail.gmail.com> <4eb0089f0807121340x5e26f6dbve03ef50b238f3a3a@mail.gmail.com> <87k5fph5rh.fsf@stupidchicken.com> <20080713214648.GB1076@muc.de> <487A783B.7060603@gmail.com> <20080713232635.GD1076@muc.de> <85od51id2t.fsf@lola.goethe.zz> <20080714204242.GH6711@volo.donarmstrong.com> <20080714223059.GG3445@muc.de> <20080715013845.GX3675@rzlab.ucr.edu> <877ibl8vjs.fsf@red-bean.com> <87lk01ij7f.fsf@anzu.internal.golden-gryphon.com> <87ljzvormp.fsf@red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070209090002070806030800" X-Trace: ger.gmane.org 1216736590 17616 80.91.229.12 (22 Jul 2008 14:23:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2008 14:23:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 16:23:59 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLImP-0000Us-6A for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2008 16:23:53 +0200 Original-Received: from localhost ([127.0.0.1]:46190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLIlV-00059M-O9 for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2008 10:22:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLIlQ-000590-62 for emacs-devel@gnu.org; Tue, 22 Jul 2008 10:22:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLIlP-00058M-Jh for emacs-devel@gnu.org; Tue, 22 Jul 2008 10:22:51 -0400 Original-Received: from [199.232.76.173] (port=37907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLIlP-00058A-6f for emacs-devel@gnu.org; Tue, 22 Jul 2008 10:22:51 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:56654) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KLIlO-0000O0-Mn for emacs-devel@gnu.org; Tue, 22 Jul 2008 10:22:51 -0400 Original-Received: from c83-254-151-176.bredband.comhem.se ([83.254.151.176]:59683 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KLIlM-0004JB-8C; Tue, 22 Jul 2008 16:22:49 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <87ljzvormp.fsf@red-bean.com> X-Antivirus: avast! (VPS 080722-0, 2008-07-22), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.176 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1KLIlM-0004JB-8C. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KLIlM-0004JB-8C 36018b150e3c5f785ee0d889540f7bab X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101202 Archived-At: This is a multi-part message in MIME format. --------------070209090002070806030800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Karl Fogel wrote: > Manoj Srivastava writes: >>> Or if the problem is that Debian isn't allowed to touch anything under >>> /usr/local/, then put code in /etc/emacs/site-start.el that loads >>> /usr/share/.../site-start.el and /usr/local/share/.../site-start.el >>> (and same for any other potentially blocked 'site-start.el's). >> While Debian maintainers can not touch anything under >> /usr/local, Debian install emacs with the PREFIX=/usr, and >> /usr/share/emacs/site-lisp/site-start.el Could be made to load the file >> under /etc. >> >>> Wouldn't that solve all the problems here? >> Either the symlink or the modified version put in >> $PREFIX/share/emacs/site-lisp/site-start.el will solve the issue, yes. > > I think we're almost there. > > The trick is not to load the one in /etc, but to have the one in /etc > load whatever other ones exist -- some of which may be user-produced and > shadowed by the one in /etc. > > The problem, IIUC, is that Emacs loads the first site-start.el it finds > in load-path, and no others. Since the /etc one is Debian-maintained, > it is free to find the others (in likely places) and load them. As long > as it does so last, everything will work out fine: user-created code > will be evaluated after Debian-created code, which is what we want. I have attached a site-start.el that maybe can be used for the common site-start.el --------------070209090002070806030800 Content-Type: text/plain; name="site-start.el" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="site-start.el" ;;; site-start.el --- Common site-start, will start user siste-start ;; ;; Author: Lennart Borgman (lennart O borgman A gmail O com) ;; Created: 2008-07-21T23:48:58+0200 Mon ;; Version: 0.5 ;; Last-Updated: 2008-07-22T00:04:41+0200 Mon ;; URL: ;; Keywords: ;; Compatibility: ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; Written for the Debian packaging problem. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Change log: ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program 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 program 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 this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth ;; Floor, Boston, MA 02110-1301, USA. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (message "Common site-start running ...") ;; Load the users site-start file. (let* ((this-dir (file-truename (file-name-as-directory (file-name-directory (if load-file-name load-file-name buffer-file-name))))) (load-path (mapcar (lambda (path) (unless (string= this-dir (file-truename (file-name-as-directory (expand-file-name path)))) path)) load-path))) (setq load-path (delq nil load-path)) ;;(message "this-dir=%s" this-dir) ;;(with-current-buffer "*Messages*" (insert (pp-to-string load-path))) (let ((user-site-start (locate-library "site-start"))) (if user-site-start (progn (message "SITE-START: Loading user %s" user-site-start) (load-file user-site-start)) (message "SITE-START: There was no user specific site-start.el(c)")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; site-start.el ends here --------------070209090002070806030800--