From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#64543: [PATCH] package-report-bug: don't fail on custom groups defined by eval Date: Sat, 15 Jul 2023 17:45:12 +0000 (UTC) Message-ID: <87r0p9hxw7.fsf@catern.com> References: <83bkgdcyuu.fsf@gnu.org> <87wmz17ana.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29179"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: sbaugh@janestreet.com, Eli Zaretskii , 64543@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 19:46:21 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 1qKjLV-0007K9-J8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 19:46:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKjLI-0002lV-QQ; Sat, 15 Jul 2023 13:46: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 1qKjLG-0002l0-Kc for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:46:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKjLF-0003Mv-VO for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKjLF-00078Q-R2 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 13:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 17:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64543 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64543-submit@debbugs.gnu.org id=B64543.168944312127357 (code B ref 64543); Sat, 15 Jul 2023 17:46:01 +0000 Original-Received: (at 64543) by debbugs.gnu.org; 15 Jul 2023 17:45:21 +0000 Original-Received: from localhost ([127.0.0.1]:46036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKjKa-00077A-I8 for submit@debbugs.gnu.org; Sat, 15 Jul 2023 13:45:21 -0400 Original-Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:4912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKjKX-00076p-WB for 64543@debbugs.gnu.org; Sat, 15 Jul 2023 13:45:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=1vifentq7DyHadSyNFOzrK6k3t95YhcFfqdRdP4ulos=; b=Zyysd1U4MSOgEPZXZ29EM5k5bSRnzUv/Pmdsq11RXFrXTdJtQMh0KVzCt7so3N8Z9gvP 9EOJc0AKInGpfEst1/kUW/Bw5e/5u3Zi4Wrx90gmUC0oOQpcS7B8ouvvY/h3O6SAifBuGE O0V/2+qRzS+zdlSG4nlbPJlnWvGhkR6RYDiZFk6lAItUR6Kxtvyuv2SzGD+AqMeD9XqlpC oz9eNHTLlviFufeNE1qESVOMm75CgE9pM7w3xnA4acuRrqjksib8LgAsaccdUIjsxGyYpf tR23C0hi3Pq/2SE1WqLyM1CLXU1gMLu1CXI5OcXrpzwS00N66lGrq5KOPq8AdSNQ== Original-Received: by filterdrecv-66949dbc98-xnttg with SMTP id filterdrecv-66949dbc98-xnttg-1-64B2DB28-47 2023-07-15 17:45:12.50123974 +0000 UTC m=+1782616.679718240 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-7 (SG) with ESMTP id my6p7C4HSKSO-O5F0w46eg Sat, 15 Jul 2023 17:45:12.456 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=posteo.net Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 2AD2F6256B; Sat, 15 Jul 2023 13:45:12 -0400 (EDT) In-Reply-To: <87wmz17ana.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Jul 2023 10:05:13 +0000") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKO4Cm/dnh4mEooRIJ8+Gg+dlDevNLP4+qdv7tWpcf2U0A8i80nZDx1uYEqw6E7oM5KYkTTkgyuOQAB3Lbr/BXAsIjrmFReISSfQTvqh/4PIzuPh5qn/GpdjX4G/oPpyVVLfq8ypKDwU5BtccXq9q35VUKKCa8Z8mAy/M35ZWSpEA== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:265231 Archived-At: Philip Kaludercic writes: > Eli Zaretskii writes: > >>> Date: Sat, 15 Jul 2023 09:12:48 +0000 (UTC) >>> From: Spencer Baugh >>> Cc: Philip Kaludercic , sbaugh@janestreet.com, >>> 64543@debbugs.gnu.org >>> >>> On Jul 15, 2023 04:57, Eli Zaretskii wrote: >>> >>> > >> Previously we just assumed that the car of an element of >>> > >> custom-current-group-alist was a filename. But actually it >>> > >> can be nil >>> > >> if a custom group was defined by just evaling Lisp. >>> > > >>> > > Where is this behaviour documented? I couldn't reproduce it with a >>> > > simple experiment. >>> > >>> > To reproduce: >>> > M-: (defgroup mygroup nil "my group") RET >>> > >>> > The patch would ensure that if groups like these are defined (which >>> > might happen by mistake), then `package-report-bug' will remain robust >>> > and not fail due to a unrelated issue. >>> >>> Is this case important enough to make this change so late in the >>> pretest? Spencer, how did you bump into this situation in Real Life? >>> >>> I evaled a buffer containing a defgroup with C-c C-e (or maybe just >>> a region?) >> >> Why did you do that? > > Evaluating an entire buffer with C-c C-e is not unreasonable, but it > will not bind `load-file-name', which `load-file' would have done, but > there is no binding for that. Maybe we should add a binding for load-file? Or maybe C-c C-e should bind load-file-name if the region is not active? Btw, just curious: how do others test modifications they make to Lisp files? I usually make a couple changes to several functions or variables and then reloading the whole file is easier than going defun by defun.