mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 13:08:51 +08:00
commit
28b7c55757
11
el-get.el
11
el-get.el
|
@ -890,6 +890,17 @@ itself.")
|
|||
(el-get-remove package)
|
||||
(el-get-install package))
|
||||
|
||||
(defun el-get-cleanup (packages)
|
||||
"Removes packages absent from the argument list
|
||||
'packages. Useful, for example, when we
|
||||
want to remove all packages not explicitly declared
|
||||
in the user-init-file (.emacs)."
|
||||
(let* ((packages-to-keep (el-get-dependencies (mapcar 'el-get-as-symbol packages)))
|
||||
(packages-to-remove (set-difference (mapcar 'el-get-as-symbol
|
||||
(el-get-list-package-names-with-status
|
||||
"installed")) packages-to-keep)))
|
||||
(mapc 'el-get-remove packages-to-remove)))
|
||||
|
||||
;;;###autoload
|
||||
(defun el-get-cd (package)
|
||||
"Open dired in the package directory."
|
||||
|
|
48
el-get.info
48
el-get.info
|
@ -423,9 +423,9 @@ File: el-get.info, Node: Distributed Setup, Next: Setup Customization, Prev:
|
|||
|
||||
When you are sharing your emacs setup between several machines (work
|
||||
and home destops, laptop, etc); it's usual to manage your `.emacs.d'
|
||||
setup in a distributed repository (such as `git'). El-Get then provide
|
||||
and easy canonical list of packages you depend on to run emacs, and
|
||||
this documentation is usable as-is.
|
||||
setup in a distributed repository (such as `git'). El-Get then provides
|
||||
an easy canonical list of packages you depend on to run emacs, and this
|
||||
documentation is usable as-is.
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
|
||||
(require 'el-get)
|
||||
|
@ -456,6 +456,20 @@ this documentation is usable as-is.
|
|||
|
||||
(el-get 'sync my-packages)
|
||||
|
||||
Please note that when you unreference a package from `my-packages',
|
||||
it remains locally installed.
|
||||
|
||||
Going one step further with the idea of a canonical list, el-get
|
||||
provides the command `el-get-cleanup', which will remove all packages
|
||||
absent from `my-packages'. This allows, in effect, to put under version
|
||||
control only the user init file, instead of the whole `.emacs.d'
|
||||
directory, and still enjoy a truly portable emacs configuration.
|
||||
|
||||
In the code example above, replace the last line with the following:
|
||||
|
||||
(el-get-cleanup my-packages)
|
||||
(el-get 'sync my-packages)
|
||||
|
||||
|
||||
File: el-get.info, Node: Setup Customization, Prev: Distributed Setup, Up: Setup
|
||||
|
||||
|
@ -787,19 +801,19 @@ Node: Setup11900
|
|||
Node: Basic Setup12296
|
||||
Node: The el-get function13535
|
||||
Node: Distributed Setup14811
|
||||
Node: Setup Customization16122
|
||||
Node: User Init17268
|
||||
Node: Before and After properties17955
|
||||
Node: Initialization files19463
|
||||
Node: Recipes20116
|
||||
Node: Organizing recipes20591
|
||||
Node: Getting more recipes22106
|
||||
Node: Overriding package files22804
|
||||
Node: Authoring Recipes23187
|
||||
Node: Recipe format23618
|
||||
Node: Dependencies24287
|
||||
Node: Byte Compilation24633
|
||||
Node: Autoloads25199
|
||||
Node: Build26325
|
||||
Node: Setup Customization16705
|
||||
Node: User Init17851
|
||||
Node: Before and After properties18538
|
||||
Node: Initialization files20046
|
||||
Node: Recipes20699
|
||||
Node: Organizing recipes21174
|
||||
Node: Getting more recipes22689
|
||||
Node: Overriding package files23387
|
||||
Node: Authoring Recipes23770
|
||||
Node: Recipe format24201
|
||||
Node: Dependencies24870
|
||||
Node: Byte Compilation25216
|
||||
Node: Autoloads25782
|
||||
Node: Build26908
|
||||
|
||||
End Tag Table
|
||||
|
|
19
el-get.texi
19
el-get.texi
|
@ -421,7 +421,7 @@ list of already installed packages is considered.
|
|||
When you are sharing your emacs setup between several machines (work
|
||||
and home destops, laptop, etc); it's usual to manage your
|
||||
@code{.emacs.d} setup in a distributed repository (such as
|
||||
@code{git}). El-Get then provide and easy canonical list of packages
|
||||
@code{git}). El-Get then provides an easy canonical list of packages
|
||||
you depend on to run emacs, and this documentation is usable
|
||||
as-is.
|
||||
|
||||
|
@ -456,6 +456,23 @@ as-is.
|
|||
(el-get 'sync my-packages)
|
||||
@end example
|
||||
|
||||
Please note that when you unreference a package from
|
||||
@code{my-packages}, it remains locally installed.
|
||||
|
||||
Going one step further with the idea of a canonical list, el-get
|
||||
provides the command @code{el-get-cleanup}, which will remove all
|
||||
packages absent from @code{my-packages}. This allows, in effect, to
|
||||
put under version control only the user init file, instead of the
|
||||
whole @code{.emacs.d} directory, and still enjoy a truly portable
|
||||
emacs configuration.
|
||||
|
||||
In the code example above, replace the last line with the following:
|
||||
|
||||
@example
|
||||
(el-get-cleanup my-packages)
|
||||
(el-get 'sync my-packages)
|
||||
@end example
|
||||
|
||||
@node Setup Customization
|
||||
@section Setup Customization
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user