From fee7a645c005b7f384fb0ea03ca453c97eceafa9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 00:50:27 -0500 Subject: [PATCH] Inherit from pre-existing recipe when updating :pin --- core/autoload/packages.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 337e49dba..35f275a61 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -210,6 +210,7 @@ Grabs the latest commit id of the package using 'git'." (interactive) ;; REVIEW Better error handling ;; TODO Insert a new `package!' if no `package!' at poin + (require 'straight) (ignore-errors (while (and (atom (sexp-at-point)) (not (bolp))) @@ -223,8 +224,10 @@ Grabs the latest commit id of the package using 'git'." (cdr (doom-call-process "git" "ls-remote" (straight-vc-git--destructure - (doom-plist-merge (plist-get (cdr recipe) :recipe) - (cdr (straight-recipes-retrieve name))) + (doom-plist-merge + (plist-get (cdr recipe) :recipe) + (or (cdr (straight-recipes-retrieve name)) + (plist-get (cdr (assq name doom-packages)) :recipe))) (upstream-repo upstream-host) (straight-vc-git--encode-url upstream-repo upstream-host)))))) (unless id