branch: elpa/helm
commit 49724c6d28a0dd4f957ffdcb161a5ca46a7c0b7d
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Add a fallback url for orphan packages
---
 helm-packages.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/helm-packages.el b/helm-packages.el
index 531c011438..88145b4530 100644
--- a/helm-packages.el
+++ b/helm-packages.el
@@ -45,6 +45,9 @@
 (defvar helm-packages--gnu-elpa-recipes-cache nil)
 (defvar helm-packages--nongnu-elpa-recipes-cache nil)
 
+;; EmacsMirror
+(defvar helm-packages-fallback-url-for-cloning 
"https://github.com/emacsmirror/%s";)
+
 
 (defgroup helm-packages nil
   "Helm interface for package.el."
@@ -292,7 +295,9 @@ PROVIDER can be one of \"gnu\" or \"nongnu\"."
     (cl-assert (not (file-directory-p (expand-file-name (symbol-name package) 
directory)))
                nil (format "Package already exists in %s" directory))
     (with-helm-default-directory directory
-      (let* ((url (helm-packages-get-url-for-cloning package))
+      (let* ((url (or (helm-packages-get-url-for-cloning package)
+                      ;; Fallback to emacsmirror if no url found.
+                      (format helm-packages-fallback-url-for-cloning package)))
              process-connection-type
              (proc (start-process
                     "git" "*helm packages clone"

Reply via email to