From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Compiling emacs 24 under Debian Date: Tue, 04 Jan 2011 14:23:32 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <87ei8tgxmz.fsf@puma.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294112448 18607 80.91.229.12 (4 Jan 2011 03:40:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2011 03:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 04 04:40:43 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZxlJ-00042n-Ke for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Jan 2011 04:40:41 +0100 Original-Received: from localhost ([127.0.0.1]:37407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZxlJ-0005gc-0R for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 22:40:41 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:sM/Y6+sc8Geuhjw3+UufXzjIkgU= Original-Lines: 187 Original-NNTP-Posting-Host: 9498b739.news.astraweb.com Original-X-Trace: DXC=Ro:b; ICeia8fB5aLm@JgR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78145 Archived-At: Richard Riley writes: > Could someone please share the secret for making emacs 24 under Debian > (testing) so that it can still see the system installed libraries that > are not part of emacs proper? > > I have this but I'm not altogether sure its good enough:- > > (setq load-path (append load-path '("/usr/local/emacs/site-lisp" > "/usr/share/emacs/site-lisp"))) > (load-library "debian-startup") > (debian-startup 'emacs23) > (load-library "/etc/emacs/site-start") > The most reliable way I've found is to edit lisp/startuo.el and add the debian-emacs-flavor variable and modify the code further down where the site-start library is loaded. If you do a diff on the startup.el file from debian's emacs and the one from emacs bzr, you will quickly see the necessary changes. There are some other differences, but I've found these to be cosmetic. The startup.el file rarely changes and bzr will auto merge if possible when you do a bzr pull to update. As there can be byte code issues between versions of emacs, I also tend to install the emacs-snapshot and set the debian-emacs-flavor to 'emacs-snapshot. I also have 2 simple bash script that I run to setup appropriate symlinks and /etc/alternatives. Not necessary, but handy if you want to easily and consistently move between different versions of emacs such that running 'emacs' will give consistent version results. I install emacs into the default /usr/local tree. After running make install, I rm /usr/local/share/emacs/24.0.50/site-lisp and replace it with a sym link to /usr/share/emacs-snapshot/site-lisp I use load-path-shadow to verify everything is consistent and loading what I think it is after each new build of emacs. #!/bin/bash # Filename: setup-emacs.sh # Creation Date: Monday, 05 July 2010 10:33 AM EST # Last Modified: Tuesday, 06 July 2010 06:06 PM EST # Description: Simple script to setup emacs24 and make it the default alterntaive # if [ -f /usr/local/bin/b2m ]; then if [ -f /usr/local/bin/b2m.emacs24 ]; then rm /usr/local/bin/b2m.emacs24 fi mv /usr/local/bin/b2m /usr/local/bin/b2m.emacs24 fi if [ -f /usr/local/bin/ctags ]; then if [ -f /usr/local/bin/ctags.emacs24 ]; then rm /usr/local/bin/ctags.emacs24 fi mv /usr/local/bin/ctags /usr/local/bin/ctags.emacs24 fi if [ -f /usr/local/bin/ebrowse ]; then if [ -f /usr/local/bin/ebrowse.emacs24 ]; then rm /usr/local/bin/ebrowse.emacs24 fi mv /usr/local/bin/ebrowse /usr/local/bin/ebrowse.emacs24 fi if [ -f /usr/local/bin/emacs ]; then if [ -f /usr/local/bin/emacs24-x ]; then rm /usr/local/bin/emacs24-x fi mv /usr/local/bin/emacs /usr/local/bin/emacs24-x fi if [ -f /usr/local/bin/emacsclient ]; then if [ -f /usr/local/bin/emacsclient.emacs24 ]; then rm /usr/local/bin/emacsclient.emacs24 fi mv /usr/local/bin/emacsclient /usr/local/bin/emacsclient.emacs24 fi if [ -f /usr/local/bin/etags ]; then if [ -f /usr/local/bin/etags.emacs24 ]; then rm /usr/local/bin/etags.emacs24 fi mv /usr/local/bin/etags /usr/local/bin/etags.emacs24 fi if [ -f /usr/local/bin/grep-changelog ]; then if [ -f /usr/local/bin/grep-changelog.emacs24 ]; then rm /usr/local/bin/grep-changelog.emacs24 fi mv /usr/local/bin/grep-changelog /usr/local/bin/grep-changelog.emacs24 fi if [ -f /usr/local/bin/rcs-checkin ]; then if [ -f /usr/local/bin/rcs-checkin.emacs24 ]; then rm /usr/local/bin/rcs-checkin.emacs24 fi mv /usr/local/bin/rcs-checkin /usr/local/bin/rcs-checkin.emacs24 fi #!/bin/bash # Filename: emacs-alternative.sh # Creation Date: Monday, 05 July 2010 10:54 AM EST # Last Modified: Monday, 05 July 2010 11:38 AM EST # Description: Switch between alternative emacs versions # if [ $# -ne 1 ]; then echo "Error: Wrong # arguments" echo "Usage: $0 < 23 | 24 | emacs-snapshot >" exit 1 fi EMACS_VERSION=$1 echo "Configureing for emacs $EMACS_VERSION" cd /etc/alternatives if [ $EMACS_VERSION == "23" ]; then echo "Configureing for Ubuntu emacs 23" rm b2m ln -s /usr/bin/b2m.emacs23 b2m rm ctags ln -s /usr/bin/ctags.emacs23 ctags rm ebrowse ln -s /usr/bin/ebrowse.emacs23 ebrowse rm emacs ln -s /usr/bin/emacs23-x emacs rm emacsclient ln -s /usr/bin/emacsclient.emacs23 emacsclient rm etags ln -s /usr/bin/etags.emacs23 etags rm grep-changelog ln -s /usr/bin/grep-changelog.emacs23 grep-changelog rm rcs-checkin ln -s /usr/bin/rcs-checkin.emacs23 rcs-checkin elif [ $EMACS_VERSION == "emacs-snapshot" ]; then echo "Configureing for Ubuntu emacs-snapshot" rm b2m ln -s /usr/bin/b2m.emacs-snapshot b2m rm ctags ln -s /usr/bin/ctags.emacs-snapshot ctags rm ebrowse ln -s /usr/bin/ebrowse.emacs-snapshot ebrowse rm emacs ln -s /usr/bin/emacs-snapshot-x emacs rm emacsclient ln -s /usr/bin/emacsclient.emacs-snapshot emacsclient rm etags ln -s /usr/bin/etags.emacs-snapshot etags rm grep-changelog ln -s /usr/bin/grep-changelog.emacs-snapshot grep-changelog rm rcs-checkin ln -s /usr/bin/rcs-checkin.emacs-snapshot rcs-checkin elif [ $EMACS_VERSION == "24" ]; then echo "Configuring for local emacs 24" rm b2m ln -s /usr/local/bin/b2m.emacs24 b2m rm ctags ln -s /usr/local/bin/ctags.emacs24 ctags rm ebrowse ln -s /usr/local/bin/ebrowse.emacs24 ebrowse rm emacs ln -s /usr/local/bin/emacs24-x emacs rm emacsclient ln -s /usr/local/bin/emacsclient.emacs24 emacsclient rm etags ln -s /usr/local/bin/etags.emacs24 etags rm grep-changelog ln -s /usr/local/bin/grep-changelog.emacs24 grep-changelog rm rcs-checkin ln -s /usr/local/bin/rcs-checkin.emacs24 rcs-checkin else echo "Unknown emacs version $EMACS_VERSION" exit 1 fi -- tcross (at) rapttech dot com dot au