redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

How to install extra package in the offline machine ? #982

Closed guoqinglei closed 2 years ago

guoqinglei commented 2 years ago

I have installed stable version of emacs.d in an offline machine. Then someday, I need to install more packages e.g., TLDR. The question is: how to install it in a machine without internet connection ?

Could anyone help me ?

redguardtoo commented 2 years ago

M-x package-install-file

guoqinglei commented 2 years ago

Thanks. But TLDR package is a little special, It must connect to internet to download some docs and files. Then, I think one way is to install TLDR in a machine connected to the internet and copy all files related with TLDR to a machine without internet connection. I haven't tried this yet. Is there any better way ?

redguardtoo commented 2 years ago

Not sure. Usually you can just copy the whole .emacs.d to another computer. Ask tldr author if his/her package doesnot support offline installation.

guoqinglei commented 2 years ago

I have just copied the tldr package to the offline machine, and add the path/tp/tldr to the load-path, and also copied the tldr manual files to the default path, i.e., ~/.emacs.d/. Then restart emacs, the tldr is working. This is a manual and raw way of installing lisp package in emacs.