From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: question regarding my emacs package Date: Tue, 13 Jun 2023 09:31:16 +0530 (IST) Message-ID: <20230613.093116.2248504087148072667.enometh@meer.net> References: 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="8051"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: acorallo@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 13 06:05:09 2023 Return-path: Envelope-to: ged-emacs-devel@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 1q8vHJ-0001sB-48 for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Jun 2023 06:05:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8vGc-0002C2-Pi; Tue, 13 Jun 2023 00:04:26 -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 1q8vGb-0002Bh-U4 for emacs-devel@gnu.org; Tue, 13 Jun 2023 00:04:25 -0400 Original-Received: from smtp3.ctinetworks.com ([205.166.61.187]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8vGa-0007FK-7b; Tue, 13 Jun 2023 00:04:25 -0400 Original-Received: from smtp5.ctinetworks.com (smtp5.ctinetworks.com [205.166.61.198]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.ctinetworks.com (Postfix) with ESMTPS id D2A1C306F040; Tue, 13 Jun 2023 00:02:32 -0400 (EDT) Original-Received: from localhost (unknown [117.193.0.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp5.ctinetworks.com (Postfix) with ESMTPSA id 44B7E165D59; Tue, 13 Jun 2023 00:03:08 -0400 (EDT) In-Reply-To: X-Mailer: Mew version 6.9 on Emacs 30.0.50 X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: D2A1C306F040.AD1B2 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Watermark: 1687492956.33226@CQp48Oju56ucePsO/3WhLA Received-SPF: pass client-ip=205.166.61.187; envelope-from=enometh@meer.net; helo=smtp3.ctinetworks.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306761 Archived-At: * Andrea Corallo Wrote on Mon, 12 Jun 2023 12:40:55 -0400 > Madhu writes: >> >> So with my emacs-30 nativecomp this just doesnt work. the >> buffer-file-name slot of the cl-defstruct has to be changed to >> buffer-file-name-1 (and the corresponding accessors to >> breadcrumbs--breadcrumb-buffer-file-name-1) throughout the file. > > Does it works on the same Emacs codebase without native compilation? Yes, it looks like native-comp wont let you use buffer-file-name as a cl-defstruct slot name if you also have an initializer (SDEFAULT) form. it gets confused and tries to use the elisp function definition. The following works on non-native comp but fails on native-comp. ``` (require 'cl-lib) (defun xyz ()) (cl-defstruct barf (buffer-file-name (xyz))) (defun barf-foo () (let ((barf (make-barf))))) ```