Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1591800pxb; Thu, 4 Feb 2021 17:54:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLjdiRoorkso9vmYqLfJ7/SWIiyi8hxUT0Om+eZtojVGN9hoqS84yUp2Zkgu59pMFNVxbQ X-Received: by 2002:a17:906:384c:: with SMTP id w12mr1902014ejc.140.1612490048389; Thu, 04 Feb 2021 17:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612490048; cv=none; d=google.com; s=arc-20160816; b=quMdFHLbg1sjub11Rtc9yE2zhDDacniFWJxlOAjnuPU+SG5aoAWpdfkr7h6+MM3qfN +n8TZx8ais1Xv5Sb3Z5hDpNDWnUHa7NxQqyNCKcecQ/ARqaAFpke280k4rVkPYn7aTLn 5zDCB+w7Vjev8C0OR0qVMwmN+1YLi1iGwp9OmkbYwxF7hLiWNydq0R1mdhm8Dc0023m2 ZETQeLElV5dBw/4+Ln7nIoy8/NGbk25P5CWtEFuuWz0DzGSggSPDVNMrG5j94+E0udqM HCDaWnlRZrE+MPMXMvoJycBLBu77wGq70YX8iJ6X31f/N5KYENSLupd9gWF8KEdUPffp Whow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature:dkim-filter; bh=DQfQbIVMmZvbCrfAXHodKr+ICylkwNupB+PhosX7jjg=; b=HYrLuOoRpt5TZR53IfR2zu51azGTwZXlLwiAZ3eC6SH2GZf68EoseU73ampcJBgWQI xCr2V+DnnIGZ+Kcvma99o3S/527OOmGtmMR4+x8ngaLDzBlSJVxKTHLFFQjfefgLar+G B5Z54QpaLRVV2G0NMpxUeG92n7wBeUARWnhxqPvtgvHQ+vxHTnu70Az9EIGf6RyksIEQ QfHmaUAPPnUfeh00CMUzWp0sfMNY+uEe2bgghe3aLDQzrISq7X6T6JNkAgiuvLaIW06e VhdioocBYWaXFMZ+FlfRrkWk1Rjcjk6Re4WNMq1Y+HCclOHyfuNEklm8nnUQVUVc8nhr eApA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=qiJ4hzNe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si4161126ejr.334.2021.02.04.17.53.44; Thu, 04 Feb 2021 17:54:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=qiJ4hzNe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbhBDX3B (ORCPT + 99 others); Thu, 4 Feb 2021 18:29:01 -0500 Received: from ms.lwn.net ([45.79.88.28]:32946 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhBDX26 (ORCPT ); Thu, 4 Feb 2021 18:28:58 -0500 Received: from localhost (unknown [IPv6:2601:281:8300:104d::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id A6C146166; Thu, 4 Feb 2021 23:28:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net A6C146166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1612481294; bh=DQfQbIVMmZvbCrfAXHodKr+ICylkwNupB+PhosX7jjg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qiJ4hzNexBf3mOowT61yg20xcsa9V0xarP+XA4nvB3xEqQVJqtL2eOypbX+xWlXTr W2jXd0BLI3+BFs5H6xU8o8u6zjULpIsfgrYtbPHuMC8vH+kCa0zvQu9X/fhb41bNuG og6I97VL/UZXAPiyMRAe17i+7CmNR/ldSgsx7xIRezHrr8IqzexR8T1umuiyfEHvBd 5WUTr//Ii+qKVmSxRKoatgEOVEOtC9c2OiMaMJs459xX4dRI/xpmpqp2evgKQ8tra+ JwvVDKqln9pU0WjRHRfEHFzof9l7ckVPwTN0FoV1Ewil+DXIZppf9C8gyXIkhTPItb ev/WFVfr3JYig== From: Jonathan Corbet To: =?utf-8?Q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Cc: Randy Dunlap , Mauro Carvalho Chehab , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Miguel Ojeda , Andrew Klychkov , lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com Subject: Re: [PATCH 0/2] docs: Add support for relative paths in automarkup In-Reply-To: <20210128010028.58541-1-nfraprado@protonmail.com> References: <20210128010028.58541-1-nfraprado@protonmail.com> Date: Thu, 04 Feb 2021 16:28:14 -0700 Message-ID: <87o8gzxvjl.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org N=C3=ADcolas F. R. A. Prado writes: > As Jon previously noted [1], it would be nice if automarkup supported rel= ative > paths as well when cross-referencing to other documents. This adds the su= pport > for it, and documents it. > > Jon, after applying this, 43bc3ed73639 ("docs: dt: Use full path to enable > cross-reference") could be reverted without the link stopping to work. > > [1] https://lore.kernel.org/linux-doc/20201130142404.6ef6689e@lwn.net/ > > N=C3=ADcolas F. R. A. Prado (2): > docs: Enable usage of relative paths to docs on automarkup > docs: Document cross-referencing using relative path > > Documentation/doc-guide/sphinx.rst | 30 ++++++++++++++++++++---------- > Documentation/sphinx/automarkup.py | 7 +++++-- > 2 files changed, 25 insertions(+), 12 deletions(-) So I finally got around to playing with this set. One thing I found is that some of the references that were being caught before were not now... after far too much time, I figured out that the problem was references to .txt files, of which we have quite a few in the docs. admin-guide/kernel-parameters.txt in particular is quite popular. Before this change, those were being turned into xrefs, afterward not. To address that, I applied this little tweak: -RE_doc =3D re.compile(r'(\bDocumentation/)?((\.\./)*[\w\-/]+)\.rst') +RE_doc =3D re.compile(r'(\bDocumentation/)?((\.\./)*[\w\-/]+)\.(rst|txt)') That seems to make things work properly again. While tracking this down I put in a print for failing cross references, and noted that we have quite a few; it's a useful way to see where the stale references are. Maybe I'll try to hack together something to make those stand out so we can fix them. Thanks, jon