Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp839707iol; Sat, 11 Jun 2022 21:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCl59rZFNez/NPEMrip07ZyHi0ltrUZjUsGHDkoNIklHTntEBsy0EzugbExlDgwF55X66Q X-Received: by 2002:a17:906:58cb:b0:70a:751c:91fc with SMTP id e11-20020a17090658cb00b0070a751c91fcmr45372787ejs.258.1655008561882; Sat, 11 Jun 2022 21:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655008561; cv=none; d=google.com; s=arc-20160816; b=rhxV5VTyVVl0Om/WKeApyZR6k9xkmk7x2uKkDJor4yTQ5lftq50T4fVs6FGec/jqgn tnB60IvKV/gu8PYOapZjvy+VbwgwOWu/Z45D8mFB7e9KMl4ZX34xfIX+IqAQmXshBR50 MwLis6e4h/Sw/yNXrZnLZ4o16hj9uDg6R1jzRNaEm1iXvLoxsAzB87fEFY4498pP5C7z NfqeJzDuhJAr+ghc38U07afHj+m4zBOJnsghtjVpSB9/UEIxpp8Ik5AGImPegZ2a4kNW aKR842axfxjH8OY+0olxdH6xM/oaAQt1VYM84Jir8VX9hLoJ5Rp9lBHdIV6cp0pH0yVH 8jfw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=VtcAcKLv23tyED/Ia+NCHwWa/BnEud9IC3T3St1RXe4=; b=E0RQ4Zfy6xpUPcHN47N26LrnDqhbfikjME0/UxSL+fRsFxwcVWDCOxJmp6zqs+lJAX T0UEJOCrmvCjkZ3MsebOp9yl5W8WAWrJ3I6idIaROtwHzxUTYCDtx5IL/4EmaxS/yJKM hoUhs3eirTrO58jLKSYyEPn1LZy6CnW6lfviTQ7M5KRdKm2//rXTFQdBTLaUtzvpg3og aUqf0rkdsxQ8fUGxpFP4GKEd1YvYXdQn+X0IpN8hmPF97yuCgvhLlwffjaw3JX5yh3Pq HpZD7aDhSMA0gB1eCNeABElRh1OqExa3YKIe85p6WeypllAoWc1zt63U0xiZX11ZpwjN gscA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5pcTGtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020aa7c487000000b0042bd134b727si3844651edq.129.2022.06.11.21.35.11; Sat, 11 Jun 2022 21:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5pcTGtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbiFKXZ2 (ORCPT + 99 others); Sat, 11 Jun 2022 19:25:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiFKXZ1 (ORCPT ); Sat, 11 Jun 2022 19:25:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4426C3E0E4; Sat, 11 Jun 2022 16:25:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C772EB80B4B; Sat, 11 Jun 2022 23:25:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEDD7C34116; Sat, 11 Jun 2022 23:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654989919; bh=kt58fye0OvkKlNPCoqcE//wrcrWCQBuwW6FUcECoqYQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n5pcTGtPOoY/+MPc9NA7wlmYfkABIUeLxO9fAUTmgHzNn/6qwtXZYptU7Whu0CJSk CZ496VssUPK+mU+VSQhuP8+00iLsHwTrL4rhZ7S4vJtD2Z65noLFuEk0EFAphqNq47 MtdaUMIZVNleZe+Y/2jtxN4eyTw2Nl+5JiAHD6mTFYdd/8CaUFHJa2IqV9/8QDL6HT 9NYlsKTTjeqyuymmbltcmxM4SVc6cX5EfjrCVScK0YrezpsNkXVCpx1BcCweIuA8dw ehCEJkfWbN8JpG588mXWZvyThKBlus5KklymJJhM+baA7ta73w4xq3KCwuKmdAocDx t1Q3y542zOI8Q== Date: Sun, 12 Jun 2022 00:25:12 +0100 From: Mauro Carvalho Chehab To: Akira Yokosawa Cc: Miguel Ojeda , Jani Nikula , Jonathan Corbet , Linux Doc Mailing List , "Maciej W. Rozycki" , Miguel Ojeda , linux-kernel Subject: Re: [RFC PATCH 3/5] docs/doc-guide: Update guidelines for title adornments Message-ID: <20220612002512.1150fc83@sal.lan> In-Reply-To: References: <732154bc-aa35-2326-2b64-87b6c4dd02e7@gmail.com> <871qvw2898.fsf@intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, 11 Jun 2022 12:15:54 +0900 Akira Yokosawa escreveu: > On Fri, 10 Jun 2022 18:08:43 +0200, > Miguel Ojeda wrote: > > On Fri, Jun 10, 2022 at 11:11 AM Jani Nikula > > wrote: > Thank Jani and Miguel for chiming in! > As this is a RFC patch, I'm glad to have nice comments from both of you. > > >> > >> When I wrote the original guidelines, it was my subjective decision to > >> steer towards using the same title adornment styles and ordering across > >> the kernel documentation. I intentionally left out all the > >> reStructuredText details about this, because the definitive > >> documentation is the reStructuredText documentation we can refer to. > >> > >> While the "Nth level title" is a more precise description, I'm not sure > >> it's actually helpful without describing how these levels should map to > >> kernel documentation structure. (Not saying the original did that > >> either, but then there wasn't much structure to speak of.) > I agree that we need to cover in doc-guide the way the kernel documentation > is organized and managed. Total lack of such documentation is kind of > surprising to me. > > > > > To give a bit of context: this patch followed from a question I asked > > to Jonathan and Akira privately. Currently it is hard to tell the > > "nesting level", and even worse, existing files are not consistent and > > checking is not automated. Therefore, an easy way to handle this is to > > request to follow the same pattern regardless of nesting across the > > tree. The thing is that there were *lots* of Kernel documents that were already following ReST syntax, some requiring minor adjustments. Yet, each one used its own way to indent the several levels. On most of those, the indentation was: First ===== Second ------ Having to rewrite all tags at the entire document with no real gain, while having a batch of thousands of documents left to be converted from .txt to .rst was simply a waste of resources. At the documents I converted myself, I just kept whatever level indentation it was already there. Going further, even now I would really prefer not needing to review patches that are just changing the tags for each indentation level. Again, this would be a waste of resources. I would very much like to receive more patches adding kernel-doc documentation and ReST changes to document the Kernel core APIs. Now, for *new* documents, I agree that it makes sense to use a standard way, at least up to level 3, like: ===== First ===== Second ====== Third ----- Which is quite intuitive to me. > > > >> Improving the documentation on documentation is great, but I think it's > >> a bad sign when length of the notes and warnings on something far exceed > >> the length of the thing being documented. The bulk of the text should be > >> helpful enough for people to DTRT, while leaving out exhaustive > >> descriptions of all the details that should just be references to > >> reStructuredText documentation. > > So, I was not aware of such a hidden rule on what should _not_ be in > doc-guide. :-) > In my opinion, RST documentation is not easy to follow especially for > new contributors, and putting some useful tips somewhere in doc-guide > would improve situation. > > I agree with you that those notes and warning don't belong to guidelines. > > Maybe add a section collecting RST tips and tricks mainly consisting > of pointers to RST and docutils documentation. > > > > > Perhaps we can move the rationale to the commit message, and keep only > > the current rules in the document. What about something like: > > > > """ > > Please stick to this relative order of adornments within each file > > (i.e. regardless of nesting level across the kernel tree): > > > > 1. ``=`` with overline. > > 2. ``=``. > > 3. ``-``. > > 4. ``~``. At least at the charset I use here, `~` is bigger than `-`. For me, it sounds counter-intuitive to use it there... Personally, i prefer `^` for the 4th level. Yet, the forth level (and the following ones) generally happen when someone needs to add something to an already-existing document. I doubt anyone that already works with ReST would ever look at the doc-guide if they need to add a 4th/5th/... level on an already existing documents. So, IMO, it is pointless to define or expect that all docs would use the same level markup after the third level. > > For instance:: > > > > ===== > > First > > ===== > > > > Second > > ====== > > > > Third > > ----- > > > > Fourth > > ~~~~~~ > > """ > > I'm more inclined to keep "level"s in the example. Agreed. Regards, Mauro