emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add keyword search and display in details for list-packages


From: Ted Zlatanov
Subject: Re: add keyword search and display in details for list-packages
Date: Fri, 22 Nov 2013 10:13:40 -0500
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On Thu, 21 Nov 2013 20:23:13 -0500 Stefan Monnier <address@hidden> wrote: 

SM> Not sure how you plan to do that.
>> I was thinking of appending "k1,k2,..." to the description.

SM> But that means it'll be "out of view" in many/most cases.  Not sure it's
SM> worth the trouble.

Well, it would be visible at least... better than having to hit `?' on
every package.  Maybe it can be toggled as an addition or as a column
instead with `k' in the packages listing?

>> (1) works for me as well.  Do you or I need to do work on the backend
>> tools to make it happen?  That's the prerequisite for the other work
>> listed here, which I can do on my own afterwards.

SM> If you can work on the elpa/admin/* scripts to make them DTRT, then I'll
SM> take care of installing them in elpa.gnu.org.

It was hard to get around the compilation failure of `packages/diff-hl'.
I had to remove it temporarily in order to test the `make' output.  Is
there a way to do "make ignore-errors" in ELPA?  I tested with this
commit as HEAD: 30809c7e797f57c50a63f64ac19eb8b78bc21939 (master from
today).

Either way, I believe I added the keywords correctly, see the attached
patch.  But I couldn't test it properly, sorry :) Doing all combinations
of `make clean; make; make archive-full' didn't refresh
`archive-contents' with the keywords, even though they were in place.
Maybe you can update the README or I'm missing something obvious?

Thanks
Ted

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 7ee9c1c..8fee66b 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -187,13 +187,18 @@ Otherwise, return nil."
                  (requires-str (lm-header "package-requires"))
                  (pt (lm-header "package-type"))
                  (simple (if pt (equal pt "simple") (= (length files) 1)))
+                 (keywords (split-string (or (lm-header "keywords") "")
+                                         "," t "[ ]+"))
                  (url (or (lm-header "url")
                           (format "http://elpa.gnu.org/packages/%s.html"; pkg)))
                  (req
                   (if requires-str
                       (mapcar 'archive--convert-require
                               (car (read-from-string requires-str))))))
-            (list simple version description req (list (cons :url url)))))))
+            (list simple version description req
+                  ;; extra parameters
+                  (list (cons :url url)
+                        (cons :keywords keywords)))))))
      ((not (file-exists-p pkg-file))
       (error "Can find single file nor package desc file in %s" dir)))))
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]