From patchwork Tue Apr 1 19:32:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 41140 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AB58A27BBEC; Tue, 1 Apr 2025 20:33:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A394627BBE9 for ; Tue, 1 Apr 2025 20:33:47 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzhMG-00079L-Cm; Tue, 01 Apr 2025 15:33:12 -0400 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 1tzhMD-00078i-PF for guix-patches@gnu.org; Tue, 01 Apr 2025 15:33:10 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzhMD-0000xr-EG; Tue, 01 Apr 2025 15:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9N5M1Capkss/5bpF6QdtNcZTD5SLCSMNQoltOh7SGcI=; b=O2qh6t/A7PJT41YEpJfhCctT9ADSTZWRJtebPPLqXMdrzGM/nhL8cb0XIzVyWf+hXKn2e9x0rWTEudUjKztUojgYSOGshWdkrae6QhNnQqBGpv7gKZJVyanQLJOQ0pUBluHarkZMgBpI3yqhEiktw/ixXLr9OcpcvV5HVo6SIlClmbu4uHJs54zAxybUBGYxgVMAssVNQKyDq6ehWYDrYBvg647AjB+3EZjVlHWuQOpdrfWLDuJpr3OryNpK6XGUtBr88EoicjO6vPxAiL/vvRehmOZ2kM+8qONBn+5szp8AQtQJIKnvPAPUXIMWWvruY8KZfmZ64ViOnznIM5mueQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzhM6-0003TB-Tx; Tue, 01 Apr 2025 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77387] [PATCH v1 2/2] man-db: Support mdoc-formatted man pages. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: sarg@sarg.org.ru, ludo@gnu.org, guix@cbaines.net, dev@jpoiret.xyz, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 01 Apr 2025 19:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77387@debbugs.gnu.org Cc: Sergey Trofimov , Sergey Trofimov , Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Sergey Trofimov , Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77387-submit@debbugs.gnu.org id=B77387.174353594813082 (code B ref 77387); Tue, 01 Apr 2025 19:33:02 +0000 Received: (at 77387) by debbugs.gnu.org; 1 Apr 2025 19:32:28 +0000 Received: from localhost ([127.0.0.1]:51389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzhLX-0003Oq-Sn for submit@debbugs.gnu.org; Tue, 01 Apr 2025 15:32:28 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:60621) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tzhLV-0003Nc-Fb for 77387@debbugs.gnu.org; Tue, 01 Apr 2025 15:32:25 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-ac28e66c0e1so892010866b.0 for <77387@debbugs.gnu.org>; Tue, 01 Apr 2025 12:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1743535939; x=1744140739; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9N5M1Capkss/5bpF6QdtNcZTD5SLCSMNQoltOh7SGcI=; b=KnyyEi+jeqvMoJ0fzcLHgXFOqEaIKHnwzkVObyn4S7Wt1RmsbEAdiuDMAhF21rXcXG W16cCO5X8DGevXQPafAhx+MC4bUcVmrshaKB+Dz//q3E17jBiqUJxwVfDz65Nxow3MKN sK+MIjmIcg2DhMKUdzC8FEAg0855oJlOAhouYfXeypnk001x8jPhwZcwgK9Ma1FO4qOA +Bm+ORO3uTSsZQLYfmMGvu5dvlOw+yMS7q9wgwKzdjtaJIAffs1VmSecSzofn6bfXzYX xE/D3mUSrOItdj5obFQGgL9WrJAM3YOoJeygC6N5ywlSEmay9k3+sgFesQ44OydujCRQ 8xlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743535939; x=1744140739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9N5M1Capkss/5bpF6QdtNcZTD5SLCSMNQoltOh7SGcI=; b=h/ohToiMigkW0FNJ0TBiRpSYMT490sKkWmz8qFr5zCQDWL0SFhJyForZdIP6bCH+D3 ASKI18G3sv1GS8FsOgHOEuwMgTLuNe8WB9wt0TRwqsu1h7XNqq9IlNpFeySiFZeGMpOh s3O9p9a8V+fH2rKZR+mMDJfrTzz81D1il0LMJ2zLGn08mf/pl56WAwbiqrG5EhfBJq80 +lmbZV/aFZHHzYW27JMmyDIgmj7Ap33TPKcVr+ycrVAWupii1acXaAaKztUiFVM24IWB U6dWJLGpX+AvKcpRM3msxxTeEWVg0oexTovUEUrzcwDiIOq/p7zPIpBbZVEySDydwszy i+rg== X-Gm-Message-State: AOJu0YwO1tuTpHGzlUr2NFcTGdKxhF+tH30JRNKnUQEC3bgZpkNezTFQ C7bFlLVRLh7qeYv2eO6x2m8T6RY9MEPOUNksUmr4tFJivpxJeeqYAVtLsHIHxfLJGsXYENGfhtO KirY= X-Gm-Gg: ASbGnctfFS0KCAyzFnNsa90mLHxc8fa+Mt4a+iYe185US4tOH9DtOoruLKTRLLO5kAH 6Gi5tyiwaajew9be3p/ZaYINhc12bDKv43oY+iq74W6c7yIZqBIShhse0CRbrpzC/YTfwUaQD6Z t+f4sPrYXZm+PxXBwfRgH3+ev34hPaH3l5QabEPaiP8Kwq+FjhiOKGIZPbht2eYex+C53HpduF6 LiWOqai0y7r5VqV+hoc5diwuJcqva9iSF9R5TGb8xmPCv13NGgj2t5nk3rH18a9GkbDU7Zx4dpT gG2KiZS1xDENCZSBeAQipmLE6M3iPdu1WhrqMH1Pdw== X-Google-Smtp-Source: AGHT+IFAn7WfTVeqFMdZ0c3YRrFl+WXuGg+SHOGfIkMD5hI+a76Pxx8NZzUkc/bU5BSmCC0PKM3B2A== X-Received: by 2002:a17:907:97c9:b0:ac6:e42b:7556 with SMTP id a640c23a62f3a-ac7389e6743mr1398638466b.11.1743535938917; Tue, 01 Apr 2025 12:32:18 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac71922c0c5sm805005666b.9.2025.04.01.12.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 12:32:18 -0700 (PDT) Date: Tue, 1 Apr 2025 21:32:00 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: <109f10a155f45adf26420b11787153cf96bbdc8b.1743535900.git.sarg@sarg.org.ru> References: <109f10a155f45adf26420b11787153cf96bbdc8b.1743535900.git.sarg@sarg.org.ru> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sergey Trofimov X-ACL-Warn: , Sergey Trofimov via Guix-patches X-Patchwork-Original-From: Sergey Trofimov via Guix-patches via From: Sergey Trofimov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/man-db.scm (man-page->entry): Extract man name and section from .Dt macro. Change-Id: I02dc99d73dceecdb077315805025efad9a650e91 --- guix/man-db.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/man-db.scm b/guix/man-db.scm index 94231264f0..7601580c40 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -228,10 +228,13 @@ (define* (man-page->entry file #:optional (resolve identity)) ;; man 7 groff groff_mdoc groff_man ;; look for metadata in macro invocations (lines starting with .) (match (and (string-prefix? "." line) (man-macro-tokenize line)) - ((".TH" name (= string->number section) _ ...) + ;; "Title Header" or "Document title" + (((or ".TH" ".Dt") name (= string->number section) _ ...) (loop name section synopsis kind)) + ;; "Section Header" ((".SH" (or "NAME" "\"NAME\"")) (loop name section (read-synopsis port) kind)) + ;; include source ((".so" link) (match (and=> (resolve link) (cut man-page->entry <> resolve))