-
Notifications
You must be signed in to change notification settings - Fork 12
Make install check aware of alternative package managers #1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b848656
1a09c2b
601858a
2209f3f
2567d9e
27e61c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| ;; Author: Bob Weiner | ||
| ;; | ||
| ;; Orig-Date: 7-Jun-89 at 22:08:29 | ||
| ;; Last-Mod: 13-Jun-26 at 13:33:38 by Bob Weiner | ||
| ;; Last-Mod: 13-Jul-26 at 20:43:12 by Mats Lidell | ||
| ;; | ||
| ;; SPDX-License-Identifier: GPL-3.0-or-later | ||
| ;; | ||
|
|
@@ -38,8 +38,6 @@ | |
| (require 'hsys-consult) | ||
| (require 'hsys-org) ;; For `hsys-org-cycle-bob-file-list' | ||
| (require 'hypb) ;; For `hypb:mail-address-regexp' and `hypb:add-to-invisibility-spec' | ||
| (eval-when-compile | ||
| `(hyrolo-install-markdown-mode)) | ||
|
matsl marked this conversation as resolved.
|
||
| (require 'outline) | ||
| (require 'reveal) | ||
| ;; Avoid any potential library name conflict by giving the load directory. | ||
|
|
@@ -3095,7 +3093,7 @@ package is not installed." | |
| package-archives) | ||
|
|
||
| ;; 2. Skip this if the markdown-mode package is installed | ||
| (unless (package-installed-p 'markdown-mode) | ||
| (unless (require 'markdown-mode nil t) | ||
| ;; 3. If any `hyrolo-file-list' file has a markdown file suffix, | ||
| (when (delq nil (mapcar (lambda (suffix) | ||
| (string-match-p (concat "\\(?:" hyrolo-markdown-suffix-regexp "\\)$") | ||
|
|
@@ -3231,13 +3229,17 @@ files to search." | |
|
|
||
| (defun hyrolo-install-markdown-mode () | ||
| "Install `markdown-mode' package unless already installed." | ||
| (unless (package-installed-p 'markdown-mode) | ||
| (unless (assoc "nongnu" package-archives) | ||
| (setq package-archives (cl-copy-list package-archives)) | ||
| (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") | ||
| t)) | ||
| (package-refresh-contents) | ||
| (package-install 'markdown-mode))) | ||
| (or (require 'markdown-mode nil t) | ||
| (pcase (hypb:users-package-manager) | ||
| ('package (when (or (not hypb:ask-to-install-package-flag) | ||
| (y-or-n-p (format "Install `%s' to enable this feature? " 'markdown-mode))) | ||
| (unless (assoc "nongnu" package-archives) | ||
| (setq package-archives (cl-copy-list package-archives)) | ||
| (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") | ||
| t)) | ||
| (package-refresh-contents) | ||
| (package-install 'markdown-mode))) | ||
| (manager (hypb:notify-manual-install-needed 'markdown-mode manager))))) | ||
|
Comment on lines
+3232
to
+3242
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is implemented on its own to allow the insertion of nongnu if that is missing only in the case where package.el is used. An alternative would be to do that either always or if package.el is in use and then call |
||
|
|
||
| (defun hyrolo-isearch-for-regexp (regexp fold-search-flag) | ||
| "Interactively search forward for the next occurrence of REGEXP. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add quelpa too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read up on quelpa and it seems it is based on top of package.el. Users can mix installing using quelpa and package.el directly. So it is not clear a user would prefer to install the packages we dynamically depend on using quelpa. So we can let package.el handle a potential install for quelpa users. It will not cause any big problem for them if I understand things correctly.