From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Tue, 09 May 2023 09:34:18 +0800 Message-ID: References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> Reply-To: Ruijie Yu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14745"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.3; emacs 30.0.50 Cc: 63337@debbugs.gnu.org, philipk@posteo.net, eliz@gnu.org To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 09 03:37:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pwCI0-0003ak-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 May 2023 03:37:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwCHo-0004UN-IE; Mon, 08 May 2023 21:37:04 -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 1pwCHm-0004Tl-Tm for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 21:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwCHm-0001QC-L2 for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 21:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwCHm-0007AK-A4 for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 21:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ruijie Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 01:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: 63337@debbugs.gnu.org, Philip Kaludercic , bug-gnu-emacs@gnu.org, Eli Zaretskii Original-Received: via spool by 63337-submit@debbugs.gnu.org id=B63337.168359619927488 (code B ref 63337); Tue, 09 May 2023 01:37:02 +0000 Original-Received: (at 63337) by debbugs.gnu.org; 9 May 2023 01:36:39 +0000 Original-Received: from localhost ([127.0.0.1]:42008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwCHP-00079H-HO for submit@debbugs.gnu.org; Mon, 08 May 2023 21:36:39 -0400 Original-Received: from netyu.xyz ([152.44.41.246]:52482 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwCHN-000797-S8 for 63337@debbugs.gnu.org; Mon, 08 May 2023 21:36:38 -0400 Original-Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 4db5fed8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 9 May 2023 01:36:36 +0000 (UTC) In-reply-to: <87y1lyhbfy.fsf@breatheoutbreathe.in> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261373 Archived-At: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > + (file-path (expand-file-name file (package-desc-dir pkg-desc))) > + (default-directory (expand-file-name (file-name-directory file-path))) > > (package-desc-dir pkg-desc) may return a relative path with or without a > directory, e.g. "doc/manual.org" or "manual.org". In the latter case, > (file-name-directory "manual.org") would return `nil' and > (expand-file-name nil) would signal an error. In this case, can't you do this instead: (expand-file-name (or (file-name-directory ...) ".")) ? -- Best, RY