all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp <p.stephani2@gmail.com>
Cc: Adam Porter <adam@alphapapa.net>, 50214@debbugs.gnu.org
Subject: bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild
Date: Mon, 22 Aug 2022 16:35:30 +0200	[thread overview]
Message-ID: <87ilmk4a8d.fsf@gnus.org> (raw)
In-Reply-To: <24A8FD47-339C-4E1D-9F32-BFE97C60C0B6@gmail.com> (Philipp's message of "Sat, 4 Sep 2021 19:37:18 +0200")

Philipp <p.stephani2@gmail.com> 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?





  reply	other threads:[~2022-08-22 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 16:47 bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild Adam Porter
2021-08-26 17:50 ` Arthur Miller
2021-08-26 19:37 ` Lars Ingebrigtsen
2021-08-26 20:52   ` Adam Porter
2021-09-04 17:37     ` Philipp
2022-08-22 14:35       ` Lars Ingebrigtsen [this message]
2022-08-22 21:24         ` Adam Porter
2022-08-23 10:08           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilmk4a8d.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=50214@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.