From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: feature/package-vc has been merged Date: Tue, 08 Nov 2022 16:35:15 -0500 Message-ID: References: <164484721900.31751.1453162457552427931@vcs2.savannah.gnu.org> <83k0492u5i.fsf@gnu.org> <87fsew8g18.fsf@posteo.net> <83mt941cyd.fsf@gnu.org> <87fsewp0ec.fsf@posteo.net> <837d0814c9.fsf@gnu.org> <878rkooz1o.fsf@posteo.net> <831qqg1306.fsf@gnu.org> <874jvcowzm.fsf@posteo.net> <83y1soypvx.fsf@gnu.org> <87y1song5x.fsf@posteo.net> <83v8nsyof7.fsf@gnu.org> <87leoond7l.fsf@posteo.net> <83r0yfzz01.fsf@gnu.org> <87bkpjyx3p.fsf@posteo.net> <83bkpjynmj.fsf@gnu.org> <87iljqya44.fsf@posteo.net> <8335auzo9s.fsf@gnu.org> <87zgd2ws8z.fsf@posteo.net> <831qqezkxj.fsf@gnu.org> <87y1slgq3m.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40300"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org, Lars Ingebrigtsen To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 08 22:36:27 2022 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 1osWGf-000AHk-Ap for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Nov 2022 22:36:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osWG0-0006Ht-Sp; Tue, 08 Nov 2022 16:35:44 -0500 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 1osWFz-0006G2-2J for emacs-devel@gnu.org; Tue, 08 Nov 2022 16:35:43 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osWFl-0004ql-KK; Tue, 08 Nov 2022 16:35:42 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A1D3510011A; Tue, 8 Nov 2022 16:35:26 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 86445100006; Tue, 8 Nov 2022 16:35:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1667943324; bh=4xASihIFhZFomGRJKyghpQHDZMyOrE4V2HQBOLobyP0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KoDfrqlB2IftM5vA69tXxLsvCGqSOSQgD9X8QB1t0O6tdrY0UPWYJL5jSzJQBixIp bLrqoRJMKf1kJOg6pfntEGk4dSvVv/XtvsYg+/ZtwHdK5xuuxO3IVnYfDoHER2iwmg SSY0zI1Sl4N/+upu9VQI8oSf5/ru5aQUgzXmLOaPBBldqIuWDV0uXNWPJnoDbxoeUs j/BImPE3vVrfmEBISQxOiLvo7TiLJlm1eOij9uYwfeqoQI/6lpNvLJLeRvD8ehOLdS S6VAToVg1vPh6Sx4nHE0EwaKCbjqG8NhhezyL1wDEXn+s8d1Zm8cdYUlfD+V5i0hQ4 W+b8MmMICffmA== Original-Received: from pastel (unknown [104.247.241.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2121A120689; Tue, 8 Nov 2022 16:35:24 -0500 (EST) In-Reply-To: <87y1slgq3m.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 08 Nov 2022 20:15:25 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:299369 Archived-At: > (loaddefs-generate > - pkg-dir output-file > - nil > - "(add-to-list 'load-path (directory-file-name > - (or (file-name-directory #$) (car load-path))))") > + (file-name-concat pkg-dir lisp-dir) > + output-file nil > + (prin1-to-string > + `(add-to-list 'load-path > + (directory-file-name > + ,(file-name-concat pkg-dir lisp-dir))))) > (let ((buf (find-buffer-visiting output-file))) > (when buf (kill-buffer buf))) > auto-name)) > --8<---------------cut here---------------end--------------->8--- > > Git tells me that Lars was wrote the "(or (file-name-directory #$) (car > load-path))" bit, so I've added him to the CC's: Can you explain what > the intention was here, and if my suggested replacement would break > anything? I suspect he just copy/pasted the code from elsewhere. The point is to make the file work regardless of where it is whereas your replacement makes it work only in the location we used to generate it. You can/should replace #$ with `load-file-name`, which will make it behave better w.r.t byte-compilation. Stefan