Synthesise _SEARCHABLE-TEXT_ for locally-modified packages on demand
This commit is contained in:
parent
8bc1be2862
commit
fe20d9cccd
|
@ -281,7 +281,11 @@
|
||||||
|
|
||||||
(define ((package-text-matches? pkg) re)
|
(define ((package-text-matches? pkg) re)
|
||||||
(and (not (tombstone? pkg))
|
(and (not (tombstone? pkg))
|
||||||
(regexp-match? re (@ pkg _SEARCHABLE-TEXT_))))
|
(regexp-match? re (or (@ pkg _SEARCHABLE-TEXT_)
|
||||||
|
;; Packages lacking the _SEARCHABLE-TEXT_ key are _LOCALLY_MODIFIED_.
|
||||||
|
;; Synthesise searchable text here; a better (?) alternative would be
|
||||||
|
;; to do this at package save time, but this will do for now.
|
||||||
|
(pkg->searchable-text pkg)))))
|
||||||
|
|
||||||
(define (package-search text tags)
|
(define (package-search text tags)
|
||||||
(define res (map (lambda (r) (regexp (regexp-quote r #f))) (string-split text)))
|
(define res (map (lambda (r) (regexp (regexp-quote r #f))) (string-split text)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user