From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Re-approaching package tagging Date: Thu, 20 Dec 2018 08:53:12 +0100 Message-ID: <87pntwskgn.fsf@gnu.org> References: <875zvsq8ov.fsf@dustycloud.org> <87imzrgjit.fsf@gnu.org> <87h8fa7ums.fsf@dustycloud.org> <871s6dwob2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZt8v-0000Zf-IA for guix-devel@gnu.org; Thu, 20 Dec 2018 02:53:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZt8t-00013h-BV for guix-devel@gnu.org; Thu, 20 Dec 2018 02:53:17 -0500 In-Reply-To: (zimoun's message of "Thu, 20 Dec 2018 00:12:04 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: zimoun Cc: Guix Devel Hello, zimoun skribis: >> And how the regexp works ? >> I am not able to find some doc... I am diving in the code but it is >> not easy to find. :-) > > If I understand well, basically the code is here, right? > http://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/package.scm#n= 754 > > And the regexp engine comes from the module (ice-9 regex), right? > Documented there: > https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.h= tml#Regular-Expressions Yes, just plain POSIX regexps. >> For example, how to search package with the name emacs and not the name = emacs- >> or how to search package with the name emacs and with the decription GNU? >> The '-s foo -s bar' is OR. What about the AND? >> etc. > > This needs more than the actual implementation, right? Having multiple -s flags makes it an =E2=80=9Cor=E2=80=9D but it influences= the relevance score: https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-packa= ge.html#index-searching-for-packages So if you take the results with the highest score, that=E2=80=99ll probably= be those that match all the regexps. HTH! Ludo=E2=80=99.