1

i've formatted my laptop and i want to get back my emacs settings and packages . i've kept only .emacs file is it enought ?

can i restore my settings and packages just from .emacs ?

in this file i have write a lot of macros i want to recover it , and a lot of packages names .

important packages are written with require and add-hook functions :

ex:
    (require 'ac-emacs-eclim-source)
    (add-hook 'java-mode-hook 'eclim-mode)

is their any script to install them quickly again . or i have to find them manually .

melbx
  • 319
  • 1
  • 3
  • 17
  • Emacs automatically creates a `.emacs.d` folder in the HOME directory. You can copy your old `.emacs` file to the HOME directory and start Emacs regularly. In terms of restoring potentially other stuff, it depends on what packages you had previously installed. Some people keep a list of their installed packages inside their `.emacs` file. If you don't see a list or other mention of what packages you previously installed, then you'll have to spend time figuring it out and reinstall them. Given that you asked this particular question, you may be better off with Emacs 25 and not a snapshot. – lawlist Oct 20 '16 at 21:48
  • is there a way to create liste of installed packages ...? maybe open list-packages and copy all packages with installed value ? – melbx Oct 20 '16 at 22:03
  • You have nothing to compare it against if you did not backup your prior installation -- including `.emacs.d`. So if you have no back-up and if your `.emacs` file does not contain sufficient information as to what you previously installed, then you are out of luck and will need to spend time figuring it out. For example, I have seen people create a list and a check against that list each time they launch Emacs -- missing packages will automatically be installed or updated. If you have no such animal in your `.emacs` file, then the famous card game to play is called "Go Fish". Always backup! – lawlist Oct 20 '16 at 22:15
  • @lawlist i didn't understand all what you say because of my english . but some packages have sufficient informations and some others i found out how to get them back ... anway now i want to save all those packages information in separet file ? there is a way ? this is emacs :D – melbx Oct 20 '16 at 22:37
  • Since you have not provided the contents of your `.emacs` file in the question above, you have created an interesting "guessing game" -- or as one regular forum participant sometimes says that he would have to consult his magical "crystal ball". You might have this or you might have that, who knows? You or whoever looks at your `.emacs` file would have to read it line by line and see what packages are mentioned, if any. The `elpa` server that stores the package repositories does not keep track of what each individual user has installed on his/her computer. – lawlist Oct 20 '16 at 22:40
  • use a simple english i didn't understand anything :) – melbx Oct 20 '16 at 22:44
  • contents of `.emacs` file = potential answer – lawlist Oct 20 '16 at 22:45
  • my friend now i have restore everything perfectly from .emacs and from my memory ...! – melbx Oct 20 '16 at 22:46
  • now i need to know if there is a way to save all those packages infos in a separet file ? – melbx Oct 20 '16 at 22:46
  • "**How to save a list of all the installed packages**": http://stackoverflow.com/questions/13866848/how-to-save-a-list-of-all-the-installed-packages-in-emacs-24 – lawlist Oct 20 '16 at 22:56

0 Answers0