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: Wed, 09 Nov 2022 12:49:20 -0500 Message-ID: References: <164484721900.31751.1453162457552427931@vcs2.savannah.gnu.org> <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> <87bkpgfsqv.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="36222"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) 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 Wed Nov 09 18:50:04 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 1ospD8-0009Dt-SE for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Nov 2022 18:50:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ospCg-0007RF-8L; Wed, 09 Nov 2022 12:49:34 -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 1ospCd-0007R3-Ud for emacs-devel@gnu.org; Wed, 09 Nov 2022 12:49:32 -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 1ospCY-0003Ci-KK; Wed, 09 Nov 2022 12:49:31 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 706EA80258; Wed, 9 Nov 2022 12:49:24 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 66ED080223; Wed, 9 Nov 2022 12:49:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668016162; bh=KQWNl5arzfaUYHuvMcGKaMawdigWQVVkrliKa97WN08=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=irSxUFH4pliyI+YRSP/7qrztXSz+ANJ0gC1coFzgQRkQ5RgHR5qGYcfefuPocLViS 4RrZcIBLlBjVBanwd9uBFy2cvfUiTSUcf8ABThwr0lTs+rjqxrdJS0w+FMNMqo0K+4 3Pod4Szn45/GmM8itYgmsIMW7qxQw54nA19bFOAD0+e7dPEQeDovZrkLy56A8Db0qn z9U+35jTm4IoxhttLvTiWhwyC91lFBZBJfTxCx4RY224hcPDs1MXXIyuC33mSsUve0 YnuoYIKYvJTa6Tm8nCvDy/Auqu5GR5fosDZEHMNlBrF11P9FqmHcS6JMYg87/xEUW/ IW3u63vo0podA== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 52DA612018D; Wed, 9 Nov 2022 12:49:22 -0500 (EST) In-Reply-To: <87bkpgfsqv.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 09 Nov 2022 08:15:52 +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: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:299420 Archived-At: > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 0881626e92..67ce30a93c 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -1103,8 +1103,17 @@ package-generate-autoloads > (package-lisp-dir pkg-desc) > output-file nil > (prin1-to-string > - `(add-to-list 'load-path > - ,(package-lisp-dir pkg-desc)))) > + `(add-to-list > + 'load-path > + (file-name-concat > + ;; Add the directory that will contain the autoload file to > + ;; the load path. We don't hard-code `pkg-dir', to avoid > + ;; issues if the package directory is moved around. > + (or (and load-file-name (file-name-directory load-file-name)) > + (car load-path)) > + ;; In case the package specification indicates that the lisp > + ;; files are found in a subdirectory, append that path. > + ,(alist-get :lisp-dir (package-desc-extras pkg-desc)))))) > (let ((buf (find-buffer-visiting output-file))) > (when buf (kill-buffer buf))) > auto-name)) I don't understand why we have code relating to `package-vc` in `package.el`. Please be careful to try to correctly preserve the *exact* name added to `load-path` (most importantly whether it ends in a slash or not), because some other code relies on it (e.g. to try and avoid having both `/foo/bar` and `/foo/bar/` or to remove entries). Stefan