From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nchubrich Newsgroups: gmane.emacs.help Subject: Re: running multiple Emacs versions Date: Fri, 12 Feb 2010 21:55:25 -0800 (PST) Organization: http://groups.google.com Message-ID: <38846b90-512e-4321-84a3-18b34fff8330@o3g2000yqb.googlegroups.com> References: <87sk966mzd.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1266074672 13906 80.91.229.12 (13 Feb 2010 15:24:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2010 15:24:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 13 16:24:29 2010 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 1NgJrB-0003lB-Im for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Feb 2010 16:24:29 +0100 Original-Received: from localhost ([127.0.0.1]:58622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgJrA-0001uk-QK for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Feb 2010 10:24:28 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!o3g2000yqb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 86 Original-NNTP-Posting-Host: 72.85.159.18 Original-X-Trace: posting.google.com 1266040525 24838 127.0.0.1 (13 Feb 2010 05:55:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 13 Feb 2010 05:55:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o3g2000yqb.googlegroups.com; posting-host=72.85.159.18; posting-account=Cs3pDwoAAABsQNyS5lNAeN3vqIX3OQbB User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB7.0 GTBA, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:176773 X-Mailman-Approved-At: Sat, 13 Feb 2010 10:23:51 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:71846 Archived-At: Tim--- Thanks, initz sounds like what I am looking for---do you happen to know how to access the source without a debian package manager, since I am on Mac OS X? The download link is here: http://packages.debian.org/si= d/initz Drew--- Regarding .elc files, aren't most of these placed in the individual App directories on Mac OS X, i.e. Aquamacs.app, Emacs.app? When you refer to "byte compiling", do you mean Emacs LISP packages you have written, or are you talking about installing external packages say from Elpa? Thanks for all your help! On Feb 12, 8:04=A0pm, "Drew Adams" wrote: > > Using one .emacs file is probably not going to be the big issue. Your > > problem is likely to be byte code incompatibility, especially as emacs > > 23 moved to utf-8 encoding, which makes the *.elc files incompatible > > with versions prior to 23. Emacs 23 can read older *.elc files, but it > > does a translation/conversion process 'on the fly' which can > > substantially slow down file loading etc. > > > There are ways around all of this, but take a bit of work. As an > > example, you cold look at how Debian/Ubuntu handle running multiple > > emacs versions at the same time. For your init file, look at > > initz (see emacs wiki). I htink there is some other info on this > > in the wiki as well. > > > For your .emacs, you may be able to just get by using simple 'when' > > blocks for the version specific stuff i.e. > > > (when (=3D emacs-major-version 23) > > =A0 ;; do 23 specific stuff > > ) > > Everything Tim said is true, I believe. > > But as (only) one data point (FWIW), I routinely byte-compile in Emacs 20= (or in > 22, if the library isn't designed for 20/21), and then use the *.elc in m= ore > recent versions, including Emacs 23. I haven't particularly noticed any s= lowdown > (but I don't doubt that there is one, at least theoretically). > > However, some Emacs 23-specific features are available only if you byte-c= ompile > the code in Emacs 23. Likewise, some Emacs 22-specific features need to b= e > compiled using Emacs 22 (or 23). So while byte-compiling using an older r= elease > generally works and I haven't noticed a slowdown, you might lose some fea= tures > that are specific to more recent releases. In practice, this is pretty ra= re, > however (IMO/experience). > > Wrt version testing, to protect/expose various code sections (e.g. in you= r init > file): Yes, `emacs-major-version' is your friend. > > But if you know something more specific about the code that is needed fro= m that > release, then it's often better to test for the presence of that specific > object. =A0Testing the Emacs version is generally a last resort, but some= times it > is the most appropriate thing to do. > > You can test for a given feature (library) using (require... nil t) - or > `featurep' if already loaded. You can test for the presence of a specific > function using `fboundp'. You can test for the presence of a specific var= iable > using `boundp'. > > (What's not so easy to test for is a specific function signature. If a fu= nction > has a different number of arguments in different releases, then about the= only > way to test which is which is to use `condition-case' and tempt an error.= ) > > HTH.