important note:
do check upfront if these procedures are ok within your company’s security policies.- This is very useful when you are behind a corporate firewall or a slow proxy or even in a situation where you have no internet connection and want to hack in emacs and want to tweak your configuration.
- git clone d12frosted’ elpa mirror or just put the repo inside an usb stick and place the repo in the
~/.emacs.d/mirror-elpa
folder (use the `–depth 1` option to grab just the last commit):
$ git clone --depth 1 https://github.com/d12frosted/elpa-mirror.git
- place the provided
init.el
file in~/.emacs.d
. - use the timeless and infinitely powerful editor at will.
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("melpa" . "~/.emacs.d/mirror-elpa/melpa/")
("org" . "~/.emacs.d/mirror-elpa/org/")
("gnu" . "~/.emacs.d/mirror-elpa/gnu/")))
(package-initialize)
(unless (package-installed-p 'use-package) ; Bootstrap John Wigley's `use-package'
(package-refresh-contents)
(package-install 'use-package))
(use-package evil ; this will install evil mode even without an internet connection.
:ensure t
:config
(evil-mode))
- You now have unlimited access to all of melpa, elpa and orgmode without having to send/receive a single network packet.
- this also means that instead of taking minutes do download your 100+ packages, it now takes nanoseconds.
- You have to rely on @d12frosted to manually update the whole mirror. But he does a very good job at it.
- generate your thin-mirror out of your ~/.emacs.d/elpa folder using @redguartoo’s elpa-mirror
elpamr-create-mirror-for-installed
command. - move this thin generated mirror to
~/.emacs.d/thin-elpa-mirror/
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("melpa" . "~/.emacs.d/thin-elpa-mirror/")))
(package-initialize)
(unless (package-installed-p 'use-package) ; Bootstrap John Wigley's `use-package'
(package-refresh-contents)
(package-install 'use-package))
(use-package evil ; this will install evil mode even without an internet connection.
:ensure t
:config
(evil-mode))
- The advantage is that you don’t have to wait for @d12frosted to update his mirror.
- The disadvantage is that you are confined to the packages that you use, e.g., you can’t try out new packages.
copyright (C) 2016-2021 - Filipe Correa Lima da Silva Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.