Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2012, 11:30 AM
semin semin is offline
Senior Member
 
Join Date: Jun 2008
Location: ./South Hemisphere/New Zealand/Wairarapa/Masterton
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Default Emacs (and its Lisp libraries and init file) for PCBSD
I am managing to build an ESS (Emacs Speaks Statistics; /ports/math/ess) PBI module for PCBSD so that I can use a statistical package R (/ports/math/R) under emacs on my amd64 machine. However I have encountered several issues described below:

1. I first tried to use EasyPBI to build the module and then build the PBI, and the PBI size ended up with 230.9MB. As this is just an extension for emacs the file size should have bee much much smaller than this. Is there anyway that I can shrink the file to a more reasonable size?

2. The ess PBI created by using EasyPBI actually didn't work after trying to install on my machine, so I decided to look at the ess homepage (http://ess.r-project.org) and tried to install manually. On the website it says to install ess from the source I have to:

(1) Extract all the files from ess-VERSION.tgz into the directory PREFIX/site-lisp where PREFIX is appropriate for GNU Emacs on your system; PREFIX will most likely be either /usr/share/emacs or /usr/local/share/emacs.

(2) Then, add the line

(require 'ess-site)

to ~/.emacs and restart Emacs.

(3) If you see a buffer named *ESS*, then the simple instructions were most likely successful.

Since PCBSD uses pbi system, I assume the PREFIX here should be /usr/pbi/emacs-amd64. Under this directory, however, there are two site-lisp directories:

(i) /usr/pbi/emacs-amd64/share/emacs/site-lisp/

(ii) /usr/pbi/emacs-amd64/share/emacs/24.0.90/site-lisp/

So which site-lisp directory should I extract the source code ess-VERSION.tgz into?

3. Where is the init file for emacs in PCBSD? I have looked around in my PCBSD system but just couldn't find any init file under ~/.emacs.d directory? I couldn't even find any file like ~/.emacs nor ~/.emacs/init.el anywhere in my system even though the emacs was installed over AppCafe. If any of you have been using emacs for your work on PCBSD, where do you put your init file??

Regards,
Sam
Reply With Quote
  #2  
Old 05-23-2012, 01:13 PM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default
Here's an easy solution:

Create a local directory for lisp files, and add it to your ~/.emacs init file:

Code:
$ mkdir -p ~/.emacs.d/site-lisp
... open your .emacs file, and add:

Code:
(add-to-list 'load-path "~/.emacs.d/site-lisp/")
OR

Simply extract the ESS tarball somewhere in your home directory, and add the path to your .emacs file, e.g:

Code:
(add-to-list 'load-path "/usr/home/username/applications/ess-x.xx/lisp/")
The latter is the way I load ESS in my .emacs file, but either should do the trick.
__________________
My Blog About Emacs and (PC)BSD
Promethean Machines
Reply With Quote
  #3  
Old 05-24-2012, 04:45 PM
Beanpole's Avatar
Beanpole Beanpole is offline
Senior Member
 
Join Date: May 2010
Posts: 1,605
Thanks: 2
Thanked 147 Times in 129 Posts
Default
Some clarification about the PBI and it's size:

Since a PBI file includes all the dependencies a program needs to run properly, the PBI is generally quite a bit larger than the individual program itself. In this case, math/ess has listed runtime dependencies of both math/R and editors/emacs [1]. This means that you are not only building the plugin? for emacs, but are also including an entire install of emacs itself (which is huge). For plugins, I have found that it is generally better to simply add that plugin to the PBI for the main program (emacs in this case) in order to avoid having multiple copies of the main program on your system. Another solution would be to simply use the copy of emacs that is included in your "ess" PBI (make a link to (pbi-dir)/bin/emacs in the ess PBI), rather than trying to merge/integrate two PBI's together (which defeats the purpose of a PBI in the first place).

[1] http://www.freshports.org/math/ess
__________________
~ Ken Moore ~
PC-BSD/iXsystems

Last edited by Beanpole; 05-24-2012 at 04:46 PM. Reason: Add link to math/ess page
Reply With Quote
  #4  
Old 05-25-2012, 06:13 AM
semin semin is offline
Senior Member
 
Join Date: Jun 2008
Location: ./South Hemisphere/New Zealand/Wairarapa/Masterton
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Is there anyway to build the ess plugin itself only as a PBI so that users can install the ess pbi on top of the emacs already exist in their system? Or otherwise I will have to submit a pbi module for the ess-included emacs?
Reply With Quote
  #5  
Old 05-29-2012, 05:59 PM
Beanpole's Avatar
Beanpole Beanpole is offline
Senior Member
 
Join Date: May 2010
Posts: 1,605
Thanks: 2
Thanked 147 Times in 129 Posts
Default
Our current Emacs PBI is actually building the editors/emacs-devel port (to keep up with the latest versions). The math/ess plugin requires the older (I.E. stable) editors/emacs port instead. Because of this, I have renamed our current emacs PBI's as Emacs-devel (without the ess plugin) and I am going to add a module for the stable editors/emacs port with the ess plugin (and simply call it Emacs). It will take a little while for the changes to take effect (need the PBI's to build and get approved first), but I think this will clear up any issues with emacs plugins, as we can simply add them to the stable Emacs PBI, and leave the Emacs-devel PBI alone for those who simply want the editor by itself.
__________________
~ Ken Moore ~
PC-BSD/iXsystems
Reply With Quote
  #6  
Old 05-31-2012, 02:02 AM
purgatori purgatori is offline
Senior Member
 
Join Date: May 2010
Posts: 234
Thanks: 6
Thanked 15 Times in 14 Posts
Default
Originally Posted by Beanpole View Post
Our current Emacs PBI is actually building the editors/emacs-devel port (to keep up with the latest versions). The math/ess plugin requires the older (I.E. stable) editors/emacs port instead. Because of this, I have renamed our current emacs PBI's as Emacs-devel (without the ess plugin) and I am going to add a module for the stable editors/emacs port with the ess plugin (and simply call it Emacs). It will take a little while for the changes to take effect (need the PBI's to build and get approved first), but I think this will clear up any issues with emacs plugins, as we can simply add them to the stable Emacs PBI, and leave the Emacs-devel PBI alone for those who simply want the editor by itself.
Ugh... it took an age to make my .emacs (from version 23) compatible with 24; it's going to suck if I have to go back. As it stands now, I pretty much have Emacs back to full functionality; the only thing I haven't been able to get working is EMMS, which really does need a PBI or something because it has a bunch of dependencies.

And trust me, nobody who uses Emacs just wants to use the editor by itself
__________________
My Blog About Emacs and (PC)BSD
Promethean Machines
Reply With Quote
  #7  
Old 06-04-2012, 08:19 AM
semin semin is offline
Senior Member
 
Join Date: Jun 2008
Location: ./South Hemisphere/New Zealand/Wairarapa/Masterton
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by Beanpole View Post
Our current Emacs PBI is actually building the editors/emacs-devel port (to keep up with the latest versions). The math/ess plugin requires the older (I.E. stable) editors/emacs port instead. Because of this, I have renamed our current emacs PBI's as Emacs-devel (without the ess plugin) and I am going to add a module for the stable editors/emacs port with the ess plugin (and simply call it Emacs). It will take a little while for the changes to take effect (need the PBI's to build and get approved first), but I think this will clear up any issues with emacs plugins, as we can simply add them to the stable Emacs PBI, and leave the Emacs-devel PBI alone for those who simply want the editor by itself.
Great, so finally it's possible that I can use math/R on emacs on PCBSD - I have been scratching my hairs on this issue as I really need to use math/R for my work and this is one of the reasons why I cannot really use PCBSD for most of my work (another main reason is that I cannot use TeXLive on PCBSD... but still that's a good movement).

Ken how long would that amendment on those emacs PBIs take to be effective?

Cheers,
Sam
Reply With Quote
  #8  
Old 06-04-2012, 11:03 AM
Beanpole's Avatar
Beanpole Beanpole is offline
Senior Member
 
Join Date: May 2010
Posts: 1,605
Thanks: 2
Thanked 147 Times in 129 Posts
Default
The new Emacs PBI's will probably build this week sometime. The PBI build server was offline for a few days while building the latest PCBSD 9.1 snapshots, but that has finished now and the PBI builds were just started up again.
I would hazard a guess that the Emacs PBI shuffle will be finished by the end of the week (assuming that nothing goes wrong with the builds of course).
__________________
~ Ken Moore ~
PC-BSD/iXsystems
Reply With Quote
  #9  
Old 06-16-2012, 05:42 AM
semin semin is offline
Senior Member
 
Join Date: Jun 2008
Location: ./South Hemisphere/New Zealand/Wairarapa/Masterton
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by Beanpole View Post
The new Emacs PBI's will probably build this week sometime. The PBI build server was offline for a few days while building the latest PCBSD 9.1 snapshots, but that has finished now and the PBI builds were just started up again.
I would hazard a guess that the Emacs PBI shuffle will be finished by the end of the week (assuming that nothing goes wrong with the builds of course).
Hi Ken -

Has this been finished yet? It has been about two weeks since then and on AppCafe nothing has changed regarding Emacs. Or is the PBI build server still offline?

Regards,
Sam
Reply With Quote
  #10  
Old 06-20-2012, 05:26 PM
Beanpole's Avatar
Beanpole Beanpole is offline
Senior Member
 
Join Date: May 2010
Posts: 1,605
Thanks: 2
Thanked 147 Times in 129 Posts
Default
Yeah, the build server has been offline for quite a bit recently.
You can check the dates on the build server output here[1] to see when it gets going again.

[1]: http://pbibuild64.pcbsd.org (64-bit)
http://pbibuild.pcbsd.org (32-bit)
__________________
~ Ken Moore ~
PC-BSD/iXsystems
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:33 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.