Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm answering myself here because in the end I opted for an alternate solution.</p> <p>phils' answer is still valid, but I found it troublesome to have the .emacs.d directory under version control, and to be fair I didn't want to bother with fake submodules. </p> <p>What I did instead: I contacted el-get's maintainer, Dimitri, and presented him with the problem. </p> <p>Dimitri said: </p> <blockquote> <p>I could see us adding an el-get-cleanup function that you would have to call with the current list of packages and that would el-get-remove any package already installed locally but not on the provided list.</p> </blockquote> <pre class="lang-el prettyprint-override"><code>(el-get-cleanup my-packages) </code></pre> <blockquote> <p>You could then use that from your user-init-file if you want to, or do that as a routine every now and then.</p> </blockquote> <p>With his guidance, I then wrote the function in question. </p> <pre class="lang-el prettyprint-override"><code>(defun el-get-cleanup (packages) "Remove packages not explicitly declared" (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))) </code></pre> <p>Ah, the joys of open source...</p> <p>(See also my blog <a href="http://danielsz.github.io/towards-a-declarative-dependency-management-s/index.html" rel="nofollow noreferrer">post</a>)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload