Skip to content

Commit

Permalink
wording and version change
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Apr 13, 2024
1 parent 98ed08e commit d51a5b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 8 additions & 9 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
Create local Emacs package repository from *installed packages* so package upgrade never breaks.

* Why
- Emacs Lisp compile file (*.elc) is not portable for different versions of Emacs. So =emacs.d= copied from higher version of Emacs might crash in lower version of Emacs
- Package installation is fast. 15 seconds to install 115 packages
- The repository could be hosted on USB/Dropbox/GitHub. So you can install packages behind corp firewall
- Tested with Emacs 25, 26, 27, 28 on OSX/Cygwin/Windows10/Linux
- Package installation is fast. It takes only 15 seconds to install 115 packages
- The package repository could be hosted on USB/Dropbox/GitHub
- Tested with Emacs 27, 28 on OSX/Cygwin/Windows10/Linux
* Install
CLI program tar is required. It's already installed on Windows10/Linux/macOS.
CLI program "tar" is required. It's already installed on Windows10/Linux/macOS.

- Download =elpa-mirror.el= to somewhere (say =~/.emacs.d/site-lisp/elpa-mirror/=)
- Add below code into your ~/.emacs,
- Add below code into "~/.emacs",
#+begin_src elisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/elpa-mirror")
(require 'elpa-mirror)
Expand All @@ -25,12 +24,12 @@ CLI program tar is required. It's already installed on Windows10/Linux/macOS.

To update existing local repository, run =M-x elpamr-create-mirror-for-installed= again.

BTW, you can run =elpa-mirror.el= as a independent script,
BTW, =elpa-mirror.el= can run as an independent script,
#+begin_src sh
mkdir -p ~/myelpa && emacs --batch -l ~/.emacs.d/init.el -l ~/any-directory-you-prefer/elpa-mirror.el --eval='(setq elpamr-default-output-directory "~/myelpa")' --eval='(elpamr-create-mirror-for-installed)'
#+end_src

To use the local repository =~/myelpa/=, insert below code into your =~/.emacs=,
To use the local repository =~/myelpa/=, insert below code into =~/.emacs=,
#+begin_src elisp
;; myelpa is the ONLY repository now, dont forget trailing slash in the directory
(setq package-archives '(("myelpa" . "~/myelpa/")))
Expand Down Expand Up @@ -83,4 +82,4 @@ Below setup adds directory "bin/" into package "vagrant-tramp".

* Report a Bug

Reproduce the bug, report it at [[https://github.com/redguardtoo/elpa-mirror]], and attach the contents of the =*elpa-mirror log*= buffer.
Reproduce the bug, report it at [[https://github.com/redguardtoo/elpa-mirror]], and attach the contents of the buffer =*elpa-mirror log*=.
8 changes: 4 additions & 4 deletions elpa-mirror.el
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
;;; elpa-mirror.el --- Create local package repository from installed packages

;; Copyright (C) 2014-2020 Chen Bin
;; Copyright (C) 2014-2024 Chen Bin

;; Author: Chen Bin <[email protected]>
;; URL: http://github.com/redguardtoo/elpa-mirror
;; Package-Requires: ((emacs "25.1"))
;; Version: 2.2.2
;; Package-Requires: ((emacs "27.1"))
;; Version: 2.3.0
;; Keywords: tools
;;
;; This file is not part of GNU Emacs.
Expand Down Expand Up @@ -294,7 +294,7 @@ command compatible with BSD tar instead of GNU tar."
(defun elpamr-version ()
"Current version."
(interactive)
(message "2.2.2"))
(message "2.3.0"))

(defun elpamr--win-executable-find (exe)
"Find EXE on windows."
Expand Down
2 changes: 1 addition & 1 deletion pkg.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
name=elpa-mirror
version=2.2.2
version=2.3.0
pkg=$name-$version
mkdir $pkg
cp *.el $pkg
Expand Down

0 comments on commit d51a5b8

Please sign in to comment.