From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lin Sun via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package Date: Tue, 30 May 2023 03:56:00 +0000 Message-ID: References: <1181651021.466162.1581309285621.ref@mail.yahoo.com> <1181651021.466162.1581309285621@mail.yahoo.com> <87sfd2ns6d.fsf@posteo.net> <833551ecb2.fsf@gnu.org> <87ttxh4e9i.fsf@posteo.net> <87bkjmiqtz.fsf@posteo.net> <83edn6new6.fsf@gnu.org> <83bki7l9ge.fsf@gnu.org> Reply-To: lin Sun Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31545"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62767@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 30 05:57:29 2023 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 1q3qUD-0007xQ-4t for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 May 2023 05:57:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3qTo-000584-I3; Mon, 29 May 2023 23:57:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3qTm-00057j-Pe for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 23:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3qTm-0004xc-G7 for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 23:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3qTm-00035J-B8 for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 23:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 May 2023 03:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62767-submit@debbugs.gnu.org id=B62767.168541898611809 (code B ref 62767); Tue, 30 May 2023 03:57:02 +0000 Original-Received: (at 62767) by debbugs.gnu.org; 30 May 2023 03:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:59618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3qTC-00034P-Ba for submit@debbugs.gnu.org; Mon, 29 May 2023 23:56:26 -0400 Original-Received: from sonic314-22.consmr.mail.ne1.yahoo.com ([66.163.189.148]:46138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3qTA-00034A-9J for 62767@debbugs.gnu.org; Mon, 29 May 2023 23:56:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685418978; bh=zUrkEryQLEve81hY0bXBiWg94PphuawH0+Wl4BM34V4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From:Subject:Reply-To; b=TNNEDb1vhKpid1J/jQfyB9AorZwEo4cuqXXuDLoB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rOuyPY.wU_yQkPy8uFfd6EipeyJ rsjenvdfrI0MDy1yf9UhReQnTpF40f6b1YlmegOyIK7HylZMhTF9CD7WbWGB1aIeGeG7MdaJ3nd_ e7BOCr1rAS_kxP6DGDGCr9CV6qnqgQXa5lE4m03aCMX_QOjgvqcF6PlTmDW9IfEw2V58FdCARjdN Q7MKcwiXDb7Taj9WsRm4HnBaElsrLvJPeoKxRAzLFiyPSKPrb5sPh6HQaBjyX_qk_4nXKk5gTNup 5m8_hsF7evfnmlp2k572edu3fixd.hIQ7lyUJ210QQDaTC6iA87W7LisE9mKMmRb3HIacdr4gPc2 hOMifJDIYfhxCa1aOFb_MdO5V_T0YKfkhnniuOz5R7jmepxg_oX62v7.QMTARV7lzixKuQZsVpPx kpdAyRUoMt6mgI4YPbCJsE.Zrk3Mg3HQRSW5Kso3LpxynXUuQewRCQRwgWjxdWQpqgaIDlGIklzG rmqsUdH2sF1tL0UHCZ.5PAriUWkooayoZJ9lxT.PTvZPnjqxL1li8J6IMRl8Nl57h4sP0dMzhqVw GaOwOdxqDIX5iv40NNN0S1cio5tYkTiMEW15iblZZF X-Sonic-MF: X-Sonic-ID: 1bfaa6a7-6ef1-4eb3-828e-7a69be075918 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Tue, 30 May 2023 03:56:18 +0000 Original-Received: by hermes--production-ir2-7867f454fc-z6m77 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 18b5a1acb94572d244e4bbb3f789fab9; Tue, 30 May 2023 03:56:13 +0000 (UTC) Original-Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5149390b20aso4608042a12.3 for <62767@debbugs.gnu.org>; Mon, 29 May 2023 20:56:13 -0700 (PDT) X-Gm-Message-State: AC+VfDyEMNb2gtBTkfL8aYWuzJr1w7VWy/w1xAIJPTNLEcIBUSA3g5KB h3xhSd/9IgAUbDUNzG9RP9wsS6zHFlgOWvBkd+0= X-Google-Smtp-Source: ACHHUZ5DRGl8zyAbEXmtk0yhn8T4PlS6WDrOuKLI3ysiAvSAo9hMv6MpIlUdGOwWiAMWslrPW2H40caN7wtdkGYQ/S4= X-Received: by 2002:a17:907:2684:b0:96a:246b:c65d with SMTP id bn4-20020a170907268400b0096a246bc65dmr1050215ejc.12.1685418972570; Mon, 29 May 2023 20:56:12 -0700 (PDT) In-Reply-To: <83bki7l9ge.fsf@gnu.org> X-Gmail-Original-Message-ID: X-Mailer: WebService/1.1.21495 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262618 Archived-At: On Fri, May 26, 2023 at 9:37=E2=80=AFAM Eli Zaretskii wrote: > But I don't think it's TRT to have users or > Lisp programs outside of info.el manipulate Info-directory-list and > mutate it. Instead, I think we should have a package.el-specific > directory list of Info files, say, package-info-directory-list, and we > should arrange for info.el to look in those directories _before_ it > looks in the directories mentioned by Info-directory-list. Then > there'll be no need to play with info-initialize and the variable we > use to indicate info-initialize was already called, and (more > importantly), no code outside of info.el will mess with > Info-directory-list. And package.el will add directories to this new > variable. > > OK? Totally understand your concern. The proposed mechanism will request info.el to reserve a variable that allows customer change outside of info.el, then info.el reads the variable and proceeds the paths before the info.el major function. So adding a new variable package-info-directory-list or using the current Info-directory-list are nearly equal, except that the new name is for package.el special. > > > > + (when-let ((info-dirs (butlast Info-directory-list))) > > > > + (pp `(defvar Info-directory-list '()) (current-buffer)) > > > > + (pp `(setq Info-directory-list > > > > + (delete-dups > > > > + (append ',info-dirs Info-directory-list))) > > > > + (current-buffer))) > > > > > > Using 'append' here could cause duplicate directories in > > > Info-directory-list. > > The `delete-dups' will avoid that. > > Yes, but why not use add-to-list in the first place? `add-to-list' will be a good choice here. The code is following its previous code lines, almost same format, paste as follow, > (pp `(defvar package-activated-list) (current-buffer)) > (pp `(setq package-activated-list > (delete-dups > (append ',(mapcar #'package-desc-name package--quickstar= t-pkgs)