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: [ELPA] :doc with "README.org" doesn't rename exported texi file correctly Date: Thu, 22 Sep 2022 13:06:34 -0400 Message-ID: References: <595ef82a-78fe-023b-75c4-8ccb30db1a8d@alphapapa.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="39577"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 22 20:48:02 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 1obREv-000A3f-9D for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 20:48:01 +0200 Original-Received: from localhost ([::1]:60448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obREu-0003UK-12 for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 14:48:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obPeu-000148-5e for emacs-devel@gnu.org; Thu, 22 Sep 2022 13:06:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obPep-0003E8-Kh for emacs-devel@gnu.org; Thu, 22 Sep 2022 13:06:41 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 26428100154; Thu, 22 Sep 2022 13:06:38 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 52CCC1000F8; Thu, 22 Sep 2022 13:06:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1663866396; bh=uQk3olc95I+e7CqFYw+WiXGzE1QSaoY9wpNEkuzsudw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hp7EGFAbSuorTB7ojIjv7+V1CnDK/+ifkWNrD/66oej37z1t2XRnnsjfuvJJ5zdJh sJhICydvRsTdQy/4+NN7KoptUQEhNz3ndoPZBPxXng4b1YfdGcnHSf11aZ8rMDkfMZ Nr5NyeK007RAttB131HELB1QXH3ptmcCDR20b5vuCRRwV8PhZGfA0uQxhK/WznRf77 MSBCNu2xymg05G4gVbyGUVvEH6JrmdXZTH7l1dG6DtxbIIa3ERi8I4k0mkgIn/jdrh O95m1hUmT+tYNwjzVWVsjafUu9/Hfg2X8VKqDajvewBJPNmZVvhC1+HbzYC5DqewF6 qzlTPFOu0K6Gw== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 349571204C0; Thu, 22 Sep 2022 13:06:36 -0400 (EDT) In-Reply-To: <595ef82a-78fe-023b-75c4-8ccb30db1a8d@alphapapa.net> (Adam Porter's message of "Thu, 22 Sep 2022 10:16:24 -0500") 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" Xref: news.gmane.io gmane.emacs.devel:295999 Archived-At: Adam Porter [2022-09-22 10:16:24] wrote: > I noticed that, even though the `ement' recipe in `elpa-packages' has the > same :doc setting as some other packages: > > ("ement" :url "https://github.com/alphapapa/ement.el.git" > :doc "README.org" > :auto-sync t) > > ...the Info manual generated from its readme is not available for viewing in > Emacs after the package is installed. To solve that, I had to add this > line to the readme (learning from other packages in ELPA): > > #+EXPORT_FILE_NAME: ement.texi Hmm... I must say that I don't know why that is nor do I know at which level it fails (whether it's in the .org => .texi or .texi => .info or in the generation of the `dir` file, or yet elsewhere). The fact that the above line seems to fix it suggests that the problem is in the generation of the `.texi`. `elpa-admin.el` uses the following code for that: (with-temp-buffer (elpaa--call-sandboxed t "emacs" "--batch" "-l" "ox-texinfo" ;; When building :core packages, don't follow the symlink, ;; otherwise Org will want to export into the Emacs tree! "--eval" "(setq vc-follow-symlinks nil)" docfile "--eval" "(setq org-babel-confirm-evaluate-answer-no t)" "--eval" "(message \"ELPATEXI=%s\" (org-texinfo-export-to-texinfo))") (message "%s" (buffer-string)) (goto-char (point-max)) (when (re-search-backward "ELPATEXI=\\(.*\\)\n?" nil t) (setq docfile (concat (file-name-directory docfile) (match-string 1))) (push docfile tmpfiles) (elpaa--temp-file docfile))) IOW the ELisp code doesn't know before hand which will be the name of the generated file and uses the `(message \"ELPATEXI=%s\"` trick to output to stdout the name of the file that Org chose for its output file. Which makes me think it would work without an explicit `EXPORT_FILE_NAME`, but my knowledge of Org is much too limited to actually know it to be the case. If someone wants to investigate, the following steps should be able to reproduce the build: git clone --single-branch git://git.sv.gnu.org/emacs/elpa.git cd elpa make make packages/org make build/org Where the last `make` is the one that matters to build the tarball that's placed in `archive-devel/org-.tar` (and if the file already exists, nothing is done). Stefan