all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* circular list for ELPAs
@ 2022-11-14 16:05 Emanuel Berg
  2022-11-16  1:04 ` John Haman
  0 siblings, 1 reply; 3+ messages in thread
From: Emanuel Berg @ 2022-11-14 16:05 UTC (permalink / raw)
  To: help-gnu-emacs

Circular list for the package manager.

Pop until you drop! B)

Maybe it can be defined in a oneliner to get rid of the unused
binding but when I do that it just ...

If anything can start anew, then everything must continue!

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/elpa.el

(require 'cl-lib)
(require 'close)
(require 'package)
(require 'scroll)

(cl-pushnew '("melpa" . "https://melpa.org/packages/")
            package-archives :test #'equal)

(let*((pack-status '("" "available" "built-in"  "dependency"
                        "incompat"  "installed" "new") )
      (_ (setf (cdr (last pack-status)) pack-status)) )

  (defun pack-filter (&optional status)
    (interactive)
    (unless status (setq status (pop pack-status)))
    (package-menu-filter-by-status status)
    (message (if (string-empty-p status)
                 "all"
               status) ))

  (declare-function pack-filter nil) )

(defun elpa (&optional fetch)
  (interactive "P")
  (if fetch
      (list-packages)
    (let ((buf (get-buffer "*Packages*"))) ; hardcoded in package.el 28 times
      (if (and buf (bufferp buf))
          (pop-to-buffer buf)
        (list-packages) ))))

(defalias 'melpa #'elpa)

(let ((kmap package-menu-mode-map))
  (set-close-key        kmap)
  (set-pane-scroll-keys kmap)
  (set-vertical-keys    kmap)
  (define-key kmap "\t" #'pack-filter) )

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: circular list for ELPAs
  2022-11-14 16:05 circular list for ELPAs Emanuel Berg
@ 2022-11-16  1:04 ` John Haman
  2022-11-16  2:15   ` Emanuel Berg
  0 siblings, 1 reply; 3+ messages in thread
From: John Haman @ 2022-11-16  1:04 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <incal@dataswamp.org> writes:

> Circular list for the package manager.
>
> Pop until you drop! B)
> ...

What does this do? What is the outcome?

--
Dr. John Haman
Bethesda, MD




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: circular list for ELPAs
  2022-11-16  1:04 ` John Haman
@ 2022-11-16  2:15   ` Emanuel Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Emanuel Berg @ 2022-11-16  2:15 UTC (permalink / raw)
  To: help-gnu-emacs

John Haman wrote:

>> Circular list for the package manager.
>>
>> Pop until you drop! B) [...]
>
> What does this do? What is the outcome?

It depends how many times you hit TAB ...

It shows packages based on the package status, the statuses being

  (nothing, which hear means show all)
  available
  built-in
  dependency
  incompat
  installed
  new

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-16  2:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 16:05 circular list for ELPAs Emanuel Berg
2022-11-16  1:04 ` John Haman
2022-11-16  2:15   ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.