From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.bugs Subject: bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild Date: Mon, 22 Aug 2022 16:24:24 -0500 Message-ID: <14be763f-95f6-23c2-7f92-8e4eacb30de4@alphapapa.net> References: <87y28ot2u8.fsf@gnus.org> <24A8FD47-339C-4E1D-9F32-BFE97C60C0B6@gmail.com> <87ilmk4a8d.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24152"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Cc: 50214@debbugs.gnu.org To: Lars Ingebrigtsen , Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 22 23:25:14 2022 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 1oQEv3-00062z-QA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Aug 2022 23:25:14 +0200 Original-Received: from localhost ([::1]:46828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQEv2-0002lA-6O for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Aug 2022 17:25:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQEut-0002l2-C2 for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 17:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQEus-0003pv-8y for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 17:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQEur-0007E1-WB for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2022 17:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adam Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Aug 2022 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50214-submit@debbugs.gnu.org id=B50214.166120348027738 (code B ref 50214); Mon, 22 Aug 2022 21:25:01 +0000 Original-Received: (at 50214) by debbugs.gnu.org; 22 Aug 2022 21:24:40 +0000 Original-Received: from localhost ([127.0.0.1]:41941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQEuW-0007DK-3f for submit@debbugs.gnu.org; Mon, 22 Aug 2022 17:24:40 -0400 Original-Received: from poodle.tulip.relay.mailchannels.net ([23.83.218.249]:5331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQEuM-0007D1-Pd for 50214@debbugs.gnu.org; Mon, 22 Aug 2022 17:24:39 -0400 X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0686A4C1AA6; Mon, 22 Aug 2022 21:24:27 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a291.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7847A4C1D90; Mon, 22 Aug 2022 21:24:26 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1661203466; a=rsa-sha256; cv=none; b=pYTZXF9boHPr9OXZNl8eESMaZLHDO4H7ry8xeGj4EYwZ6kVkrNfQdlNagx6oXIkxmwqC8v BYABTUz4+8/7+I+u+HVFNw4WqK0FSB5IVU9Tjm09GYBUKGrCT44OGhxirnKMuFBIwXvKlW E5erz3gIE/PmwuWa0EXeob4WJUvLXX4NXIo3Yi63X8yCg+pTDGCT3iChbA/MpxZmUejDHw pxurUFAITrNBCPsLw6PuVoFRXIE0bEP0b+vdIiTxv/sebC4EH0HpKzXjVBT30g1RvcpPFw MHW6Cu3E+Rjz9ys5zulZvABET76OYUv/roC/t4ZLTMWMrRtitTHnTnyO89IJCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1661203466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aVSXIQKo6YxP+bTstNX7V9lqmKHyjKhlXD9u7O8h28Y=; b=pXH7njtQgRyR9PDpQRP8MaZOC4I6nf74wGyk7mdfG/p7W9kjDYdKAX7h67zFARlf6mLta8 3ydrHab1jfXBP8aXllNDnWRbPJO3/i3nvL1H8B/hC5nEhPhtZse3tHh4AVMMYMBbOT1ImL BzB8fIGMxc+26uugP/mXu/AHRqSDHwIiqTtSxZrWTtBtvyAGOcq24d7m5kZqP8rI+zir2y novFT+mDew3B3+Zc5uL0RXt4kPourIt+1TEjY92OdJh1XDoeo1hyAwTcym1gSA8aVsbPIc vXsL6JIU4gyHH3CeEnsj3s1z1End73tp9cVNyxHs3s3OL6c+g0naufgbEr/BIg== ARC-Authentication-Results: i=1; rspamd-79945fd77c-b4gsd; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|inbox@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Tasty-Supply: 373011f30bd686f3_1661203466835_2921339402 X-MC-Loop-Signature: 1661203466835:1981257489 X-MC-Ingress-Time: 1661203466835 Original-Received: from pdx1-sub0-mail-a291.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.112.55.195 (trex/6.7.1); Mon, 22 Aug 2022 21:24:26 +0000 Original-Received: from [10.12.0.110] (unknown [154.6.28.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: inbox@alphapapa.net) by pdx1-sub0-mail-a291.dreamhost.com (Postfix) with ESMTPSA id 4MBQNT5Qxnz2S; Mon, 22 Aug 2022 14:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1661203466; bh=aVSXIQKo6YxP+bTstNX7V9lqmKHyjKhlXD9u7O8h28Y=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=QA7gPlTfProRRmIAZnV3S3OnDGWT+aEvTnEMNwK/SDabFSz241OeAnKIzP6WOBEhT c2P9+9DqdyZ+Apl4VJHxKKmNtKuMn/yalRZSa8ZixZcVssgBLVeXH/FZXUNsHQsD6M gZzfElMNn9SdUyRPgZaEhv76yelzufsQAeS85ZQJ2ZOVU/96pywgcBl6WhP+AO3nna j2q7il6STfyyNjje16pVQ2+2iJyFJhA/pw+kJ4mKd1mT78ISvw6vCukO1vsGZp/q1y ly3Z5oOquAzFcUen71Sbeej3IXMqeJ828sOLGW4L2lSFh9j/KpNALLk/chCE5qyWoL tCvFicaNLWDWg== Content-Language: en-US In-Reply-To: <87ilmk4a8d.fsf@gnus.org> 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:240476 Archived-At: Hi Lars, Thanks for following up on this report. On 8/22/22 09:35, Lars Ingebrigtsen wrote: > Philipp writes: > >>> Unfortunately, I know of no other way to implement what ts.el does >>> without modifying the accessors, which requires accessing the internal >>> struct details after it is defined. >> >> I haven't checked the code in detail, but AIUI ts.el tries to initialize structure members lazily? Why not just use a wrapper function for that? >> >> (defun ts-hour (ts) >> (or (ts--hour ts) >> (setf (ts--hour ts) (string-to-number (format-time-string "%H" (ts-unix ts))))) >> >> Here ts--hour is the actual accessor, which is private and shouldn't be used outside of ts.el. > > Adam, does this suggestion work for you? That seems like a good idea to me. I guess if I define it as an inline function, it should have a similar optimization as the current code. And the implementation would be much simpler and future-proof as well. In hindsight, I should probably have tried that first. :) I'll see if I can implement this in ts.el soon and release a new version accordingly. In the meantime, I guess this bug report should be closed. Thanks to all for your help. Adam