helm-ag icon indicating copy to clipboard operation
helm-ag copied to clipboard

helm-ag Package can not be found on melpa

Open porcow opened this issue 4 months ago • 3 comments

The package can not be found on either MELPA or MELPA Stable.

porcow avatar Jul 10 '25 08:07 porcow

It's been remove from MELPA, see https://github.com/melpa/melpa/pull/9520.

jcs090218 avatar Jul 10 '25 09:07 jcs090218

Oof. This is hosing me up too. I'll install by hand.

jweaver avatar Jul 13 '25 00:07 jweaver

Not sure why it was necessary to remove it from MELPA. It still works fine, and has some features (full directory paths, edit matching results) that helm-do-grep-ag doesn't have.

We can install it directly from the repo w/:

(package-vc-install '(helm-ag :url "https://github.com/emacsattic/helm-ag"))

For those using helm-projectile, here's the old helm-projectile-ag function:

(defun helm-projectile-ag (&optional options)
  "Helm version of `projectile-ag'."
  (interactive (if current-prefix-arg (list (helm-read-string "option: " "" 'helm-ag--extra-options-history))))
  (if (require 'helm-ag nil t)
      (if (projectile-project-p)
          (let* ((grep-find-ignored-files (cl-union (projectile-ignored-files-rel) grep-find-ignored-files))
                 (grep-find-ignored-directories (cl-union (projectile-ignored-directories-rel) grep-find-ignored-directories))
                 (ignored (mapconcat (lambda (i)
                                       (concat "--ignore " i))
                                     (append grep-find-ignored-files grep-find-ignored-directories (cadr (projectile-parse-dirconfig-file)))
                                     " "))
                 (helm-ag-base-command (concat helm-ag-base-command " " ignored " " options))
                 (current-prefix-arg nil))
            (helm-do-ag (projectile-project-root) (car (projectile-parse-dirconfig-file))))
        (error "You're not in a project"))
    (when (yes-or-no-p "`helm-ag' is not installed. Install? ")
      (condition-case nil
          (progn
            (package-vc-install '(helm-ag :url "https://github.com/emacsattic/helm-ag"))
            (helm-projectile-ag options))
        (error (error "`helm-ag' is not available. Can you reach GitHub?"))))))

xiongtx avatar Oct 28 '25 07:10 xiongtx