Created
March 27, 2016 20:31
-
-
Save darrik/4ec18259b27d4a1435ad to your computer and use it in GitHub Desktop.
Unmark packages matching REGEXP from being upgraded.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun darrik/package-install-unmark-regexp (pattern) | |
"Unmark packages matching REGEXP from being upgraded." | |
(interactive "sPattern: ") | |
(let* ((_prefix "^\\(I\\|D\\)\\\s+.*") | |
(_re (concat _prefix pattern))) | |
(while (re-search-forward _re nil t) | |
(beginning-of-line) | |
;; (message "%s" "I unmarked something!") | |
(package-menu-mark-unmark))) | |
(message "%s" "Finished unmarking packages.")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment