You are not logged in.

#1 2010-09-01 18:34:11

yms
Member
From: Switzerland
Registered: 2009-06-05
Posts: 64

Clean emacs install

Hi,

I have been using emacs for some time as my primary text editor. I would like to use it a lot more and really discover and master more and more of it over the next months/years.
I have not really paid attention to the installation and in addition to emacs itself, I installed several packages from the Arch repositories, from the AUR and even installed the Scala package from source.

Today I came across a blog post that said that installing emacs packages from one's distro repositories is bad practice. All packages should be downloaded directly from the package's website, untared in ~/.emacs.d/ and loaded using ~/.emacs (this last step is the same when using the Arch's emacs add-on packages). It has to be done this way so that everything (except emacs itself) is in the home directory and is thus very portable.

If this is really the Right Way to do it, I would like to know how to find out how to make my current, dirty emacs setup a new, better and cleaner setup. (i.e. Find out what emacs-related packages I installed). After that, in ~/.emacs.d/ is there a standard hierarchy/way to tidy stuff ? Is it one directory per package ?

I don't really know how to handle the situation so I don't know precisely what (other) questions to ask ...

Thank you in advance.


Sorry for any English mistakes, I am not a native speaker.

Offline

#2 2010-09-01 20:21:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Clean emacs install

yms wrote:

It has to be done this way so that everything (except emacs itself) is in the home directory and is thus very portable.

What do you mean 'portable'? How trusted / knowledgeable is that source of yours (that blog)?

I'm not an emacs user, so I can't help you with your problem, I'm just curious.

Offline

#3 2010-09-01 21:08:40

olvar
Member
Registered: 2009-11-13
Posts: 97

Re: Clean emacs install

I guess he means in that way you can have the same emacs behaviour across different installations, in case you reinstall or have a different OS.

IMHO I'd rather keep a clean arch install, than a clean emacs, since I don't plan to use anything but arch anyway tongue but what about pacman -Qs emacs and from that list select the packages you want to remove?
After doing that you can compare the behaviour of runing "emacs" and "emacs -Q". When everything looks fine try installing the packages locally.
also look at /usr/share/emacs <- the place where emacs extensions are installed.

finally look at your "load-path" in emacs (for example execute (print load-path)) to make sure your locally installed files takes precedence over the global ones.

Offline

#4 2010-09-01 23:14:40

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Clean emacs install

olvar wrote:

I guess he means in that way you can have the same emacs behaviour across different installations, in case you reinstall or have a different OS.

I can use my emacs packages from Windows in ArchLinux using the same .emacs.d and .emacs without install packages.
Just copy .emacs.d and .emacs and put them in ~/, and I can use emacs with my previous setting and packages from Windows.


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#5 2010-09-02 17:04:55

olvar
Member
Registered: 2009-11-13
Posts: 97

Re: Clean emacs install

igndenok: care to elaborate? what packages you have installed besides the core ones? how did you installed them? what is inside your .emacs.d/?
If you have installed the same set of packages in both places, then of course you can do it. Other alternative is you installed them locally, in your .emacs.d/ which is the question of the OP. Otherwise, how did the .el files end in your local directories? are you using some kind of binding for that? Maybe that could be useful for yms.

Offline

#6 2010-09-02 22:35:01

yms
Member
From: Switzerland
Registered: 2009-06-05
Posts: 64

Re: Clean emacs install

karol wrote:

What do you mean 'portable'? How trusted / knowledgeable is that source of yours (that blog)?

I'm not an emacs user, so I can't help you with your problem, I'm just curious.

Portable here means that as far as I understand, the ideal setup would be one where everything but emacs is in ~/.emacs.d and .emacs this means that if you copypaste you .emacs.d and .emacs somewhere else (on a system where just the plain core emacs package is installed) then you immediately get your whole environment, extensions ... everything as it was in your original installation. This is not as easy (just one copy/paste) if you use a distro's packages like for instance auctex, emacs-nxhtml, emms (just to name a few) in archlinux. This is because the paths vary. Hence if everything is in ~/.emacs.d, you don't break the paths when moving your installation.

I don't know if my explanation is clear.

The source is EnigmaCurry. The guy seems to know what he is talking about.

@olvar: pacman -Qs emacs is VERY helpful. Thank you. It is exactly the kind of thing I am looking for. How to be sure it is exhaustive though

igndenok wrote:

I can use my emacs packages from Windows in ArchLinux using the same .emacs.d and .emacs without install packages.
Just copy .emacs.d and .emacs and put them in ~/, and I can use emacs with my previous setting and packages from Windows.

This is exactly the kind of behavior I want. For instance I would like to copy my ~/.emacs.d and .emacs to the computers at school (where emacs is of course installed) and have an emacs setup that is indistinguishable from what I have at home. What does it take to be able to do that ? Is it enough to just have the extra packages (like auctex etc.) installed in ~/.emacs.d ?

Here is the output of pacman -Qs emacs. Maybe it can help you help me. I don't know.

$ pacman -Qs emacs
local/auctex 11.86-1
    An extensible package for writing and formatting TeX files in Emacs
local/emacs 23.2-1
    The Emacs Editor
local/emacs-nxhtml 2.05-1
    Emacs Utilities for Web Development
local/emacs-w3m 1.4.4-2
    w3m browser for emacs
local/emacs-yasnippet 0.6.1c-2
    Yet another snippet extension for Emacs.
local/emms 3.0-1
    The Emacs Multimedia System
local/pymacs 0.24_beta1-2
    Interface between Emacs Lisp and Python.
local/ropemacs 0.6-2
    Plugin for performing python refactorings in Emacs
local/slime-cvs 20091005-1
    The Superior Lisp Interaction Mode for Emacs

Sorry for any English mistakes, I am not a native speaker.

Offline

#7 2010-09-03 01:26:27

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Clean emacs install

My installed packages

$ pacman -Qs emacs
local/cedet 1.0-1 [15.10 MB]
    tools written with the end goal of creating an advanced development environment in Emacs.
local/ecb 2.40-4 [6.88 MB]
    Emacs Code Browser
local/emacs-apel 10.7-3 [0.45 MB]
    A library for making portable Emacs Lisp programs.
local/emacs-color-theme 6.6.0-3 [1.62 MB]
    Emacs color themes
local/emacs-git-mode 1.6.3.1-1 [0.20 MB]
    Emacs git-mode
local/emacs-lua-mode 20100404-1 [0.06 MB]
    Emacs lua-mode
local/emacs-nox 23.2-1 [90.41 MB]
    The Emacs Editor, without X11 support
local/emacs-org-mode 7.01h-1 [6.59 MB]
    Emacs Org Mode
local/pkgbuild-mode 0.10-1 [0.02 MB]
    A major mode for creating packages with emacs

My emacs packages that I get from emacswiki and I put it in ~/.emacs.d/site-lisp for convinience use.
And this packages I used for emacs on Windows before I use it on Arch.

$ ls ~/.emacs.d/site-lisp
asm86-mode.elc
auto-complete
auto-complete+.elc
auto-complete-etags.elc
auto-complete-extension.elc
auto-complete-octave.elc
auto-complete-verilog.elc
autoconf-mode.elc
autofit-frame.elc
autotest-mode.elc
bat-mode.elc
bm.elc
bm-ext.elc
bookmark+.el
boxquote.elc
butterfly.elc
clips-mode.elc
col-highlight.elc
column-marker.elc
command-frequency.elc
crosshairs.elc
cus-edit+.elc
dired-details.elc
dired-details+.elc
dired+.elc
dired-sort-map.elc
dired-sort-menu.elc
dired-sort-menu+.elc
eimp.elc
elscreen.elc
figlet.elc
files+.elc
fit-frame.elc
hexrgb.elc
hideshow-org.elc
hl-line+.elc
icomplete+.elc
iedit.elc
lacarte.elc
lib-requires.elc
linkd.elc
ls-lisp.elc
ls-lisp+.elc
misc-fns.elc
outline-magic.elc
package.elc
paredit.elc
plsql.elc
rect-mark.elc
smex.elc
sml-modeline.elc
sql.elc
sql-indent.elc
sqlplus.elc
sql-transform.elc
start.elc
start-opt.elc
strings.elc
tetris.elc
texdrive.elc
thingatpt+.elc
thing-edit.elc
thing-edit-extension.elc
vline.elc
zenburn.elc

Just like olvar said, you need add path to "load-path", but mine is "ugly" I think there's a better config out there.
I said "ugly" because I add another directory to "load-path" beside ~/.emacs/site-lisp even that directory is in the ~/.emacs/site-lisp so emacs can read that directory.
I don't know anything about LISP, so if anyone have solution for that let me know.

(add-to-list 'load-path "~/.emacs.d/site-lisp")
(add-to-list 'load-path "~/.emacs.d/site-lisp/auto-complete")

I hope this help you smile

Last edited by igndenok (2010-09-03 01:27:21)


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

Board footer

Powered by FluxBB