progfolio / elpaca

An elisp package manager
GNU General Public License v3.0
578 stars 27 forks source link

[Feature]: jcs-elpa menu support #190

Closed failable closed 9 months ago

failable commented 9 months ago

Feature Description

The title says it all...

Confirmation

progfolio commented 9 months ago

The title says it all...

Please provide more information in future feature requests. Searching "jcs-elpa" didn't turn up anything Emacs related. Do you have a link to the ELPA you're referring to?

failable commented 9 months ago

Sorry, it's https://github.com/jcs-emacs/jcs-elpa

progfolio commented 9 months ago

Thank you for the link.

I won't be adding out-of-the-box support for JCS-ELPA, as it doesn't look like a very popular ELPA and most of what it offers is covered by the ELPAs which are already supported. However, it's possible to define a menu to support JCS-ELPA. I tried to make this even easier by generalizing the MELPA menu implementation. I've annotated the following test case to show how such support could be added:

Test Case [How to run this test?](https://github.com/progfolio/elpaca/wiki/Troubleshooting#the-elpaca-test-macro) ```emacs-lisp (elpaca-test ;; Note this branch has not been merged yet. ;; Adding this to your init with the current version of Elpaca will not work. :ref "feat/generalize-melpa-menu" ;; Just for testing purposes. :early-init (setq elpaca-menu-functions nil) :init ;; This would be it's own package. ;; The package must require elpaca as a dependency, ;; which will allow it to build off the elpaca-menu-melpa feature. (require 'elpaca-menu-melpa) ;; Define a cache variable for the menu-item index (defvar elpaca-menu-jcs-elpa-index-cache nil) ;; Define the menu function ;;@TODO: add autoload cookie if packaged (defun elpaca-menu-jcs-elpa (request) "Return JCS-ELPA index REQUEST." ;; Point variables to JCS-ELPA's infrastructure (let ((elpaca-menu-melpa-repo-url "git@github.com:jcs-emacs/jcs-elpa") (elpaca-menu-melpa-metadata-url "https://raw.githubusercontent.com/jcs-emacs/jcs-elpa/master/docs/archive.json") (elpaca-menu-melpa-name "JCS-ELPA") (elpaca-menu-melpa-index-cache elpaca-menu-jcs-elpa-index-cache) (elpaca-menu-melpa-metadata-formatter (lambda (data) (cl-loop for ((k . name) . rest) across data do (setf (alist-get 'desc rest) (alist-get 'summary rest)) collect (cons (intern name) rest))))) ;; Allow elpaca-menu-melpa do to rest of the work with the new variable values. (prog1 (elpaca-menu-melpa request) ;; Store cache in its own variable so regular MELPA menu doesn't overwrite it. (setq elpaca-menu-jcs-elpa-index-cache elpaca-menu-melpa-index-cache)))) ;; Users can then add the menu function to elpaca-menu-functions... (add-to-list 'elpaca-menu-functions #'elpaca-menu-jcs-elpa) ;;...And after updating the menu item cache (elpaca-update-menus) ;; They will be able to use the menu. (with-current-buffer (elpaca-manager) (print (buffer-substring-no-properties (point-min) (point-max))))) ```
Host Env
elpaca0fc9678 HEAD -> feat/generalize-melpa-menu, origin/feat/generalize-melpa-menu
isntaller0.5
emacsGNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-10-09
gitgit version 2.42.0
Output ```emacs-lisp INFO Scraping files for loaddefs... INFO Scraping files for loaddefs...done GEN ../elpaca-autoloads.el Cloning into '/tmp/elpaca.fbfsUW/elpaca/repos/elpaca'... Switched to a new branch 'feat/generalize-melpa-menu' branch 'feat/generalize-melpa-menu' set up to track 'origin/feat/generalize-melpa-menu'. Checking /tmp/elpaca.fbfsUW/elpaca/repos/elpaca... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-info.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-log.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-manager.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-menu-elpa.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-menu-melpa.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-menu-org.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-process.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-test.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca-ui.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/elpaca.el... Checking /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/doc... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/doc/early-init.el... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/doc/init.el... Checking /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/extensions... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/extensions/elpaca-use-package.el... Checking /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/images... Checking /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/test... Compiling /tmp/elpaca.fbfsUW/elpaca/repos/elpaca/test/elpaca-test.el... Done (Total of 11 files compiled, 3 skipped in 4 directories) Downloading JCS-ELPA recipes... Downloading JCS-ELPA recipes...100% Downloading JCS-ELPA... Downloading JCS-ELPA...100% Elpaca menu item cache refreshed. " Package Description Date Source ace-link-dashboard Ace link for dashboard 2023-10-13 JCS-ELPA asoc alist functions and macros 2023-10-13 JCS-ELPA auto-scroll-bar Automatically show/hide scroll-bars as needed 2023-10-13 JCS-ELPA balanced-windows Keep windows balanced 2023-10-13 JCS-ELPA beancount A major mode to edit Beancount input files. 2023-10-13 JCS-ELPA bitwarden Bitwarden command wrapper 2023-10-13 JCS-ELPA block-travel Move to previous/next blank line 2023-10-13 JCS-ELPA breadcrumb project and imenu-based breadcrumb paths 2023-10-13 JCS-ELPA buffer-menu-filter Filter buffer-menu items using fake header 2023-10-13 JCS-ELPA buffer-menu-project List buffers relative to project 2023-10-13 JCS-ELPA buffer-move easily swap buffers 2023-10-13 JCS-ELPA cask Cask: Project management for package development 2023-10-13 JCS-ELPA change-case Case conversion between camelCase, PascalCase, snake_case and more 2023-10-13 JCS-ELPA chatgpt Use ChatGPT inside Emacs 2023-10-13 JCS-ELPA chatgpt-shell ChatGPT shell + buffer insert commands 2023-10-13 JCS-ELPA chatgpt-sideline Sideline support for chatgpt 2023-10-13 JCS-ELPA cisco-router-mode Major mode for editing Cisco router configuration files 2023-10-13 JCS-ELPA codegpt Use GPT-3 tp help you write code 2023-10-13 JCS-ELPA codeium codeium client for emacs 2023-10-13 JCS-ELPA codemetrics Plugin shows complexity information 2023-10-13 JCS-ELPA commander Emacs command line parser 2023-10-13 JCS-ELPA company-autoconf completion for autoconf script 2023-10-13 JCS-ELPA company-box Company front-end with icons 2023-10-13 JCS-ELPA company-c-headers Company mode backend for C/C++ header files 2023-10-13 JCS-ELPA company-cmd company backend for cmd/batch 2023-10-13 JCS-ELPA company-coffee Emacs coffee completion 2023-10-13 JCS-ELPA company-dockerfile Company mode backend for dockefile 2023-10-13 JCS-ELPA company-eask Company backend for Eask-file 2023-10-13 JCS-ELPA company-elisp-keywords Company completion for `finder-known-keywords' 2023-10-13 JCS-ELPA company-fuzzy Fuzzy matching for `company-mode' 2023-10-13 JCS-ELPA company-kaomoji Company backend for Kaomoj 2023-10-13 JCS-ELPA company-makefile completion backend for gnu makefiles 2023-10-13 JCS-ELPA company-meta-net Company completion for C# project using meta-net 2023-10-13 JCS-ELPA company-mlton company-mode backend for MLton/Standard ML 2023-10-13 JCS-ELPA company-paths A company backend for paths 2023-10-13 JCS-ELPA company-powershell Emacs autocompletion backend for powershell 2023-10-13 JCS-ELPA consult-todo Search hl-todo keywords in consult 2023-10-13 JCS-ELPA copilot An unofficial Copilot plugin for Emacs 2023-10-13 JCS-ELPA cycle-case-style Cycle through case style (PascalCase, camelCase, etc) 2023-10-13 JCS-ELPA cycle-slash Cycle through slash, backslash, and double backslash 2023-10-13 JCS-ELPA dall-e Use DALL-E inside Emacs 2023-10-13 JCS-ELPA dashboard A startup screen extracted from Spacemacs 2023-10-13 JCS-ELPA dashboard-ls Display files/directories in current directory on Dashboard 2023-10-13 JCS-ELPA deepl Elisp library for the DeepL API 2023-10-13 JCS-ELPA doxygen-asterisk Minor mode that helps you insert pair /* and */ 2023-10-13 JCS-ELPA eask Core Eask APIs, for Eask CLI development 2023-10-13 JCS-ELPA eask-mode Major mode for editing Eask files 2023-10-13 JCS-ELPA easky Control Eask in Emacs 2023-10-13 JCS-ELPA eglot-grammarly Eglot Clients for Grammarly 2023-10-13 JCS-ELPA eglot-ltex Eglot Clients for LTEX 2023-10-13 JCS-ELPA eglot-shader Eglot Clients for Shader 2023-10-13 JCS-ELPA eglot-uniteai Eglot Clients for UniteAI 2023-10-13 JCS-ELPA ejira org-mode interface to JIRA 2023-10-13 JCS-ELPA eldoc-eask Eldoc support for Eask-file 2023-10-13 JCS-ELPA eldoc-meta-net Eldoc support for meta-net 2023-10-13 JCS-ELPA electric-indent-sexp Automatically indent entire balanced expression block 2023-10-13 JCS-ELPA elenv Emacs Lisp environment 2023-10-13 JCS-ELPA emp Emacs Music Playlist 2023-10-13 JCS-ELPA eping Ping websites to check internet connectivity 2023-10-13 JCS-ELPA eval-mark Evaluate then deactive mark 2023-10-13 JCS-ELPA execrun Run through `compilation-mode' 2023-10-13 JCS-ELPA fasm-mode Fasm major mode 2023-10-13 JCS-ELPA fextern Record file external stats 2023-10-13 JCS-ELPA ff-guard Create parent directory for non-existent file 2023-10-13 JCS-ELPA ffpc Find file in project or current directory 2023-10-13 JCS-ELPA file-header Highly customizable self design file header 2023-10-13 JCS-ELPA flx-rs flx in Rust using dynamic module 2023-10-13 JCS-ELPA flx-style Completion style for flx 2023-10-13 JCS-ELPA flycheck-deno Flycheck for deno-lint 2023-10-13 JCS-ELPA flycheck-eask Eask support in Flycheck 2023-10-13 JCS-ELPA flycheck-hl-todo Display hl-todo keywords in flycheck 2023-10-13 JCS-ELPA flymake-eask Eask support in Flymake 2023-10-13 JCS-ELPA flymake-elsa Flymake integration for Elsa 2023-10-13 JCS-ELPA flymake-vale flymake integration for vale 2023-10-13 JCS-ELPA fof Default configuration for `ff-find-other-file' 2023-10-13 JCS-ELPA font-lock-ext extensions to Emacs font-lock.el 2023-10-13 JCS-ELPA fuz-bin Fast and precise fuzzy scoring/matching utils 2023-10-13 JCS-ELPA git An Elisp API for programmatically using Git 2023-10-13 JCS-ELPA github-elpa Build and publish ELPA repositories with GitHub Pages 2023-10-13 JCS-ELPA github-tags Retrieve tags information through GitHub API 2023-10-13 JCS-ELPA helafy Minify/Uglify/Prettify contents 2023-10-13 JCS-ELPA hl-preproc Unhighlight invalid preprocessor region 2023-10-13 JCS-ELPA hlsl-mode major mode for Open HLSL shader files 2023-10-13 JCS-ELPA hurl-mode Major mode for hurl 2023-10-13 JCS-ELPA indent-bars highlight indentation with bars 2023-10-13 JCS-ELPA ivy-describe-modes Ivy interface to `describe-mode` 2023-10-13 JCS-ELPA ivy-point-history point-history with ivy interface 2023-10-13 JCS-ELPA jai-mode Major mode for JAI 2023-10-13 JCS-ELPA javap-mode Javap major mode 2023-10-13 JCS-ELPA jayces-mode Major mode for editing JayCeS file 2023-10-13 JCS-ELPA jcs-echobar An echo-bar for jcs-emacs 2023-10-13 JCS-ELPA jcs-frametitle A frame title for jcs-emacs 2023-10-13 JCS-ELPA jcs-modeline A modeline for jcs-emacs 2023-10-13 JCS-ELPA jcs-poptip Generic popup tip 2023-10-13 JCS-ELPA jenkinsfile-mode Major mode for editing Jenkins declarative pipeline syntax 2023-10-13 JCS-ELPA jet Emacs integration for jet Clojure tool 2023-10-13 JCS-ELPA kaomoji Input kaomoji superb easily 2023-10-13 JCS-ELPA lambda-line A custom status line 2023-10-13 JCS-ELPA lemmington RPC Emacs server 2023-10-13 JCS-ELPA license-templates Create LICENSE using GitHub API 2023-10-13 JCS-ELPA line-reminder Line annotation for changed and saved lines 2023-10-13 JCS-ELPA lsp-compose lsp-mode client for compose server 2023-10-13 JCS-ELPA lsp-grammarly-un LSP Clients for Grammarly (Unofficial) 2023-10-13 JCS-ELPA lsp-shader LSP Clients for ShaderLab 2023-10-13 JCS-ELPA lsp-uniteai LSP Clients for UniteAI 2023-10-13 JCS-ELPA maple-line maple line configuration. 2023-10-13 JCS-ELPA marquee-header Code interface for displaying marquee in header 2023-10-13 JCS-ELPA mbs Minibuffer Stats 2023-10-13 JCS-ELPA message-clean-mode Keep messages buffer clean 2023-10-13 JCS-ELPA meta-net Parse .NET assembly's XML 2023-10-13 JCS-ELPA meta-view View metadata from .NET assemblies 2023-10-13 JCS-ELPA mint-mode Major mode for the Mint programming language 2023-10-13 JCS-ELPA mode-minder List all major and minor modes 2023-10-13 JCS-ELPA msgu Utility functions help output the messages 2023-10-13 JCS-ELPA multi-shell Managing multiple shell buffers 2023-10-13 JCS-ELPA nerd-icons-buffer-menu Display nerd icons in `buffer-menu' 2023-10-13 JCS-ELPA noflet locally override functions 2023-10-13 JCS-ELPA on Hooks for faster startup 2023-10-13 JCS-ELPA openai Elisp library for the OpenAI API 2023-10-13 JCS-ELPA org-bars Add bars to virtual indentation 2023-10-13 JCS-ELPA org-modern-indent org-indent blocks like org-modern 2023-10-13 JCS-ELPA origami Flexible text folding 2023-10-13 JCS-ELPA outli Org-like code outliner 2023-10-13 JCS-ELPA package-build Tools for assembling a package archive 2023-10-13 JCS-ELPA pallet A package management tool for Emacs, using Cask. 2023-10-13 JCS-ELPA pkg-dm Package dependencies management 2023-10-13 JCS-ELPA point-history Show the history of points you visited before 2023-10-13 JCS-ELPA point-undo undo/redo position 2023-10-13 JCS-ELPA preview-it Preview anything at point 2023-10-13 JCS-ELPA prt Progress Reporter Library 2023-10-13 JCS-ELPA qsharp-mode Programming mode for the Q# language 2023-10-13 JCS-ELPA quick-peek Inline quick-peek windows 2023-10-13 JCS-ELPA recentf-excl Exclude commands for recent files 2023-10-13 JCS-ELPA repos-window Reposition window if when needed 2023-10-13 JCS-ELPA resurrect No description available. 2023-10-13 JCS-ELPA send-to-osx-grammarly A simple plugin to sent text to Grammarly 2023-10-13 JCS-ELPA sideline Show information on the side 2023-10-13 JCS-ELPA sideline-blame Show blame messages with sideline 2023-10-13 JCS-ELPA sideline-color Show color information with sideline 2023-10-13 JCS-ELPA sideline-eldoc sideline backend for eldoc. 2023-10-13 JCS-ELPA sideline-flycheck Show flycheck errors with sideline 2023-10-13 JCS-ELPA sideline-flymake Show flymake errors with sideline 2023-10-13 JCS-ELPA sideline-lsp Show lsp information with sideline 2023-10-13 JCS-ELPA sln-mode a major-mode for msvc's *.sln files 2023-10-13 JCS-ELPA smartchr emacs version of smartchr.vim 2023-10-13 JCS-ELPA sound-async Play sound asynchronously 2023-10-13 JCS-ELPA sublime-fuzzy Fuzzy matching algorithm like Sublime Text's string search 2023-10-13 JCS-ELPA toggle-profiler Useful functions to interact with profiler 2023-10-13 JCS-ELPA tree-sitter Incremental parsing system 2023-10-13 JCS-ELPA tree-sitter-indent Provide indentation with a Tree-sitter backend 2023-10-13 JCS-ELPA tree-sitter-langs Grammar bundle for tree-sitter 2023-10-13 JCS-ELPA treemacs-nerd-icons Emacs Nerd Font Icons theme for treemacs 2023-10-13 JCS-ELPA treesit-langs TODO 2023-10-13 JCS-ELPA ts-docstr A document string minor mode using tree-sitter 2023-10-13 JCS-ELPA ts-fold Code folding using tree-sitter 2023-10-13 JCS-ELPA tsc Core Tree-sitter APIs 2023-10-13 JCS-ELPA tspew Clean and format \"template spew\" errors from gcc and Clang 2023-10-13 JCS-ELPA turbo-log The simple package for fast log selected region 2023-10-13 JCS-ELPA txl Provides machine translation via DeepL's REST API 2023-10-13 JCS-ELPA typst-mode A major mode for working with Typst typesetting system 2023-10-13 JCS-ELPA undo-hl Highlight undo/redo 2023-10-13 JCS-ELPA undo-tree-vf visualizer follow mode for undo-tree 2023-10-13 JCS-ELPA use-ttf Keep font consistency across different OSs 2023-10-13 JCS-ELPA vbs-repl Run visual basic repl as inferior process 2023-10-13 JCS-ELPA vbscript-mode No description available. 2023-10-13 JCS-ELPA vc-refresh Refresh vc-state in certain events for better UX 2023-10-13 JCS-ELPA vertico-flx Flx integration for vertico 2023-10-13 JCS-ELPA visual-basic-mode A mode for editing Visual Basic programs. 2023-10-13 JCS-ELPA vs-comment-return Comment return like Visual Studio 2023-10-13 JCS-ELPA vs-dark-theme Visual Studio IDE dark theme 2023-10-13 JCS-ELPA vs-edit-mode Minor mode accomplish editing experience in Visual Studio 2023-10-13 JCS-ELPA vs-electric-spacing Add spacing around operators like Visual Studio 2023-10-13 JCS-ELPA vs-light-theme Visual Studio IDE light theme 2023-10-13 JCS-ELPA vs-revbuf Revert buffers like Visual Studio 2023-10-13 JCS-ELPA vsc-edit-mode Implement editing experience like VSCode 2023-10-13 JCS-ELPA vsc-multiple-cursors multiple-curosrs integration behave like VSCode 2023-10-13 JCS-ELPA wat-mode A major mode for WebAssembly 2023-10-13 JCS-ELPA yank-indent Automatically indent yanked text 2023-10-13 JCS-ELPA yasnippet-capf Yasnippet Completion At Point Function 2023-10-13 JCS-ELPA zoom-to-point Zoom in or out on the line at point. 2023-10-13 JCS-ELPA " Test Env Elpaca 0fc9678 HEAD -> feat/generalize-melpa-menu, origin/feat/generalize-melpa-menu installer: 0.5 emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-10-09 git --version: git version 2.42.0 ```

If you or someone else (perhaps a maintainer of JCS-Emacs) is interested in maintaining such a package, let me know and I can merge the changes mentioned above so such a package can be written.

failable commented 9 months ago

Thanks, that helps!