From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44149: 28.0.50; M-x finder-by-keyword, giving weird descriptions for gnus and org Date: Mon, 26 Oct 2020 18:19:07 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44149@debbugs.gnu.org, Jean Louis To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 27 02:22:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXDgg-0006Ie-S3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 02:22:10 +0100 Original-Received: from localhost ([::1]:39864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXDgf-0005Vo-Ut for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 21:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXDed-0004OK-B9 for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 21:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXDed-0004Vh-1j for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 21:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXDec-0004WN-Tp for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 21:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 01:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44149 X-GNU-PR-Package: emacs Original-Received: via spool by 44149-submit@debbugs.gnu.org id=B44149.160376155617309 (code B ref 44149); Tue, 27 Oct 2020 01:20:02 +0000 Original-Received: (at 44149) by debbugs.gnu.org; 27 Oct 2020 01:19:16 +0000 Original-Received: from localhost ([127.0.0.1]:42171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXDds-0004V7-4e for submit@debbugs.gnu.org; Mon, 26 Oct 2020 21:19:16 -0400 Original-Received: from mail-ej1-f68.google.com ([209.85.218.68]:41450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXDdp-0004Uu-Nh for 44149@debbugs.gnu.org; Mon, 26 Oct 2020 21:19:14 -0400 Original-Received: by mail-ej1-f68.google.com with SMTP id s15so12440866ejf.8 for <44149@debbugs.gnu.org>; Mon, 26 Oct 2020 18:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=fxuGEFu/pKuu5Ln2Wy+NTuGspdJIoTE1BJpUa1RS/fg=; b=T6grvDs/IjTWS0mGox7vgkpasKvuyqT7BNXp5JxbbuC4ZfLLJ94Z8OPVTXbMFArT/8 cJfoT8hlGXGId3ba6AjvNCLd00a1xFcIdnkFxC1rZFubCBD3Jy+QJt6sPH3t6zG305lQ DxPdVAgUD9Z8/kq4dInxX1vB9Bh6L5GGvjvlvAOU+FkUTtAw33nlD7nyGL56eBqdJfut rlloRjb+m72LL9GEhemqvK3Nf22gfkkBpNWnDlESqsVW8XENTKJkMzZ4oQJh1gRHnY5o qGnSlWQzvxF03DKTYwaEmZZdWrLU8k6I6F20jcWKrPoTUl5/2rWgt1KWW1awuRilNMDg QwZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=fxuGEFu/pKuu5Ln2Wy+NTuGspdJIoTE1BJpUa1RS/fg=; b=HJOawYW7w90MGH0ahMagLytyNaeLINcDwiD5d1OANl+MM6phawBd1y2A8S3HWLE9DR vF+60K1w2z+pOlOjgjTfRGZMGq6sRNRY5JXC52DqX+zxCSIfh9NI30Q7vBKlDuu9W6Nx g7sm43rIS+BRUKTH1EWkk/TUe1adnKgTk1u9vSbJ6G4cP3T3UHIw3nU+IdWgFV6uTNL9 i4pxX/EyZ7So/6cqJSZc4vGpXt7aLOgnKvRearLuo3zhZ1lOaCEriiKugxjTh2EO6Gmr 9LvqWFOudX8L+ExZvTEDvRmphMzD3r0c+Sd0HzSqAXVgD9mRJjjJPRHwCX6Hiv7esP3P 3JDA== X-Gm-Message-State: AOAM531me9XKRavZVAbRxiz/YHpBuHUrYfbB48L3hvPBuVJh7U9RhF5v zKZh2O+hqKVckGhT797IIi3HEw3J0QWJ0t6JqeraTcQv X-Google-Smtp-Source: ABdhPJx7sv7Qv4m/VpvfpUiFwFUIY6ApKj+CIUS5V+eF6dXELsFe8yqyo+rpfUJkVT8zETxMJreuBa6b8TZjudT0KRA= X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr4385ejj.477.1603761548068; Mon, 26 Oct 2020 18:19:08 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 26 Oct 2020 18:19:07 -0700 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191692 Archived-At: Stefan Monnier writes: >>> Just tell me if it is a joke that gnus is described this way. >>> gnus 5.13 built-in Identifying spam >> The description comes from spam.el: >> ./spam.el:1:;;; spam.el --- Identifying spam > > But why is it put under the name "gnus"? [...] > Similarly, why is it put under the name "org"? See my analysis below. >> * lisp/finder.el (finder-compile-keywords): Grab version from >> package--builtin-versions when available. >> >> It makes "(or (eq base-name package) version)" below that always be true, > > I don't understand why it does that. The reason is that the local variable `version' is now always set for any file belonging to a built-in package. From your patch: (setq version (or (ignore-errors (version-to-list version)) (alist-get package package--builtin-versions))) We decide if a file belongs to a package based on if it is in a directory, so for any file "org/*.el" the local `package' variable will be the symbol `org'. A few lines down, we do this: ;; The idea here is that eg calc.el gets to define ;; the description of the calc package. ;; This does not work for eg nxml-mode.el. ((or (eq base-name package) version) (setq desc (cdr entry)) (aset desc 0 version) (aset desc 2 summary))) So, for example, we evaluate (or (eq base-name package) version) for "ox.el" with the following variables: base-name: 'org package: 'ox version: (alist-get 'org package--builtin-versions) => (9 3) So `version' is set for all files "org/*.el", and the package description will now be set to whatever is used in "ox.el" (since it is the last file alphabetically). >> Reverting the above commit fixes this issue here. > > I get the impression that there's some other underlying problem. > >> I'm not sure how best to fix this without breaking something else. >> Perhaps Stefan M has an idea? > > I don't understand this code enough to give much guidance, I'm afraid. I also feel a bit stuck...