From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: Can I share ~/.emacs.d/elpa with two machines? Date: Fri, 2 Oct 2015 15:23:53 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1443815545 6320 80.91.229.3 (2 Oct 2015 19:52:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 19:52:25 +0000 (UTC) Cc: Help Gnu Emacs mailing list , Stefan Monnier To: Rainer M Krug Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 21:52:25 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zi6NT-0006lS-5a for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 21:52:23 +0200 Original-Received: from localhost ([::1]:34881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi6NS-0004Wl-I9 for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 15:52:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi5wZ-0000eN-8v for help-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:24:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi5wX-0004VT-MO for help-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:24:35 -0400 Original-Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:34605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi5wX-0004Ug-GF for help-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:24:33 -0400 Original-Received: by oiev17 with SMTP id v17so63131469oie.1 for ; Fri, 02 Oct 2015 12:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0yktLlnV9DAPX7aCVPRrZ5lG8IZAXC4UzdQU8i6eAvw=; b=SzkWY0AdDxxF+F3JKo1YgQSx5HW0hsVkjpUL/j/eE7+S72xNlBoMZV9EqgUJA7a903 YPn6eCCy6Ec/FgJYO4iLEtpDVWvpBehgVbp8WvvUlVTWi/UBUh7KO4hbIwn1i8PC+PQj Tm3Yby9Tsk6m+dO1woelj/MBp3Lr2OPYcNqcYmv2rTINoXPgoPyKeP46ADs9v0cWSAK2 yhtLl+2CU8inDj174094g/LPuUpxy6oYDgbBdLz+1zTahjzPGKpMqxWvshgsvv30IPO0 sPxZk/sRqJV+Yn/TFg4UnBAWQ4+rH1qCpbXCp+E0HDbEZ5UnGVQgMAATK2ugkbMQFVrZ +Xng== X-Received: by 10.202.211.10 with SMTP id k10mr10005752oig.34.1443813872726; Fri, 02 Oct 2015 12:24:32 -0700 (PDT) Original-Received: by 10.202.172.205 with HTTP; Fri, 2 Oct 2015 12:23:53 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::229 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107481 Archived-At: I also update org via git and faced the compiled code incompatibility issue. I resolved it the same way .. using version specific compiled org dirs. Here's the full code gathered from various places in my config: Part 1: https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872dc65fb45515e6/init.el#L9-L13 (setq user-home-directory (concat (getenv "HOME") "/")) ; must end with / (setq user-emacs-directory (concat user-home-directory ".emacs.d/")) ; must end with / (setq emacs-version-short (replace-regexp-in-string "\\([0-9]+\\)\\.\\([0-9]+\\).*" "\\1_\\2" emacs-version)) ; 25.0.50.1 -> 25_0 Part 2: https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872dc65fb45515e6/setup-files/setup-org.el#L32-L34 (add-to-list 'load-path (concat user-emacs-directory "elisp/org-mode/lisp_" emacs-version-short "/")) Part 3: The nasty part. Use a shell script or script of your preferred flavor to build org-mode for each of the emacs versions you are using and copy the built lisp/ dir to the version specific lisp dir. #!/bin/tcsh -f # Build script to compile org mode lisp for different emacs versions # # Back up your $PATH # alias get_org_mode_lisp_dir_suffix '\emacs --version | \grep -oE '"'"'Emacs [0-9]+\.[0-9]+'"'"' | \awk '"'"'{print $2}'"'"' | \tr "." "_"' #** Build for emacs master # # Set the $PATH *here* to use the emacs master (built from latest in git) # I use something work proprietary like GNU Modules to do this # echo "\nBuilding for emacs version: "`\emacs --version | \grep -E 'Emacs [0-9]+\.[0-9]+'`"\n" make clean make set org_mode_lisp_dir = "lisp_"`get_org_mode_lisp_dir_suffix` if ( -d "${org_mode_lisp_dir}" ) then \rm -rf ${org_mode_lisp_dir} endif \cp -rf lisp ${org_mode_lisp_dir} #** Build for emacs 24.5 # # Set the $PATH *here* to use emacs 24.5 # I use something work proprietary like GNU Modules to do this # echo "\nBuilding for emacs version: "`\emacs --version | \grep -E 'Emacs [0-9]+\.[0-9]+'`"\n" make clean make set org_mode_lisp_dir = "lisp_"`get_org_mode_lisp_dir_suffix` if ( -d "${org_mode_lisp_dir}" ) then \rm -rf ${org_mode_lisp_dir} endif \cp -rf lisp ${org_mode_lisp_dir} unalias get_org_mode_lisp_dir_suffix unset {org_mode_lisp_dir} # # Restore your $PATH to point to your default emacs version # Part 4: Restart any one of the versions of emacs for which you compiled the org files in Part 3. The org stuff will work just fine as it would pick out the org files from the correct lisp_<>/ directory. I hope all of this makes sense. -- Kaushal Modi On Fri, Oct 2, 2015 at 3:05 PM, Rainer M Krug wrote: > Kaushal Modi writes: > > > @Stefan, sharing elpa/ between at least emacs 24.5 and emacs 25.x (git > > master) does not work as the complied .elc files are not compatible > between > > the two versions. > > Just jumping in as I have the two version problem. > > I am fine with most of my stuff managed by cask, therefore aware of > versions. But how can I manage org, which is via git? Any smart > suggestion how I can use this between two versions on one machine? > > Rainer > > > > > > > > -- > > Kaushal Modi > > > > On Fri, Oct 2, 2015 at 11:54 AM, Stefan Monnier < > monnier@iro.umontreal.ca> > > wrote: > > > >> Yes, of course. > >> > >> Just like you can share it over NFS or any other file system. > >> You can share them even between different systems using different > >> Emacs versions, different processor architectures, and/or different > OSes. > >> > >> At least, if that leads to problems, then I'd recommend you file them > >> as bugs. > >> > >> > >> Stefan > >> > >> > >> > > > > -- > Rainer M. Krug > email: Rainerkrugsde > PGP: 0x0F52F982 >