From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:e8e3::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2LHdM0aOWGH0XwEAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 18:52:22 +0200 Received: from aspmx2.migadu.com ([2001:41d0:2:e8e3::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 7jFsL0aOWGHWMQAAB5/wlQ (envelope-from ) for ; Sat, 02 Oct 2021 16:52:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 63DCF53528 for ; Sat, 2 Oct 2021 16:52:22 +0000 (UTC) Received: from localhost ([::1]:53654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWiFJ-00082a-8H for larch@yhetil.org; Sat, 02 Oct 2021 12:52:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWiEt-00081C-SA for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 12:51:55 -0400 Received: from ciao.gmane.io ([116.202.254.214]:50870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWiEs-0005ik-6y for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 12:51:55 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mWiEq-0005fG-5H for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 18:51:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: [PATCH] Fix patching of single-page manuals Date: Sat, 2 Oct 2021 23:51:42 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B27C107D038567093D3D6B9D" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 X-Woof-Patch: [PATCH] Fix patching of single-page manuals In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633193542; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=O+cM+6pPGZgOBC5NRFCBYOUi3w2Q48nMlNbJxHKOI9A=; b=Jwm/UzsSlRc2ATwy+V4aCsXX9M7xDdAWqQUeIuRkZ/BkjuvoePD2OZwcIApSFeZ2ia+4+f gljmYDzrS/HF6d7I+AsjfdxStiPuJPoWHAvyZk6ChAFp2lbj0hP1MFo77BdQbDvHBb/SpE vWi2q6+ft7wF6mPdDtdtCgvcZBOwzqiBlfOtL7urcZgiWR/LYK7DRUeYCston36CGLF1qK o/sB46vCvoA0/tDzSjKAO4aFJywDkN7O9aINeVSU4KuBIbGVzg7gDZXiNSdYN3eEpgkGw3 OJR9roFmjMJHiw4FD+n5fvI8WAq405cxsYNhdnEMfdA04GLltPJ+WYjNOdG/Iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633193542; a=rsa-sha256; cv=none; b=E6CZ/NF/vgywGyMErifmOZaGntUSwc09bJlznHtWMczW7LQt6MP/AjXxIq6I6hqvWCHI0i 8+WBC6+NKYoVg36UNFnRpk8/173iPZMWla+jCU7LKNnQ1K6hL4MuKEwU4lcBVj/Ohx80BE A9bGW2CGCVXeLfydJjTSmXAcXF4Gwva/J6tKQm20cN4uw/HiPnm5+7+Bo2UcEHUnt6RR4A pqWTvuymnnnLDKVnpx/tNzXr2YZ7st0XdjIiuCyosMmuNxaz9RLpAjSjJaBZKpwY/mX8mD TRMpWZPpnkCky5Kwb2PFsJK10TrtBAlhmyRRNiPXSgvc4QaMjUdcrgMgy7C5EA== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.81 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 63DCF53528 X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1LWWHrU0hW1j This is a multi-part message in MIME format. --------------B27C107D038567093D3D6B9D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 27/11/2020 23:32, Maxim Nikulin wrote: > Unordered lists are styled a bit incorrectly in the single-page org > manual. Compare e.g. "Installation" section: > > https://orgmode.org/org.html#Installation > https://orgmode.org/manual/Installation.html#Installation > > For some reason whole text of single-page manual is a part of table of > contents (div.contents), so bold font and suppressed marker rules are > applied for regular ul elements. > > It is a minor issue. Maybe someone familiar with export settings for the > manual could have a look and decide either CSS should be tweaked of main > part of the manual should be pulled out of the TOC block. Currently the problem exists e.g. for "Plain Lists" section https://orgmode.org/manual/Plain-Lists.html - OK https://orgmode.org/org.html#Plain-Lists - bold items with no markers Output of makeinfo changed a bit, so a pattern in a helper script postprocessing HTML files is not suitable for currently generated files. CSS styles intended to tune table of contents are applied to all unordered lists. --------------B27C107D038567093D3D6B9D Content-Type: text/x-patch; charset=UTF-8; name="0001-manfull.pl-Adjust-pattern-for-current-makeinfo.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-manfull.pl-Adjust-pattern-for-current-makeinfo.patch" >From 6c2e0872df94c7c970aebabafc4b809be446485a Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Sat, 2 Oct 2021 23:36:49 +0700 Subject: [PATCH 1/2] manfull.pl: Adjust pattern for current makeinfo * mk/manfull.pl: During patching of single-page html manuals allow current form of table of contents headers. Older makeinfo did not add "contents-heading" class to "

" element. Helper script failed to properly modify HTML files generated by current version of makeinfo. With partially patched file, CSS stiles intended for table of contents were applied to all unordered lists, so e.g. in "Plain Lists" section items were bold and with missed markers. --- mk/manfull.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/manfull.pl b/mk/manfull.pl index 95ffa392c..307ce396e 100755 --- a/mk/manfull.pl +++ b/mk/manfull.pl @@ -13,7 +13,7 @@ while () { } elsif (/
/) { print OUT; print OUT '

This is the official manual for the latest Org mode release.

'; - } elsif (/

Table of Contents<\/h2>/) { + } elsif (/

Table of Contents<\/h2>|

/) { print OUT; print OUT 'https://orgmode.org
'; $toc = 1; -- 2.25.1 --------------B27C107D038567093D3D6B9D Content-Type: text/x-patch; charset=UTF-8; name="0002-manfull.pl-Avoid-silent-failures.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-manfull.pl-Avoid-silent-failures.patch" >From 78bc4d01e1cc2aeb8264166d734add7a2d5a1810 Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Sat, 2 Oct 2021 23:41:23 +0700 Subject: [PATCH 2/2] manfull.pl: Avoid silent failures * mk/manfull.pl: Report failures of patching of single-page HTML manuals. It should prevent silent generating of manual pages inconsistent with provided CSS files when output of makeinfo will change next time. --- mk/manfull.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mk/manfull.pl b/mk/manfull.pl index 307ce396e..39439bd4b 100755 --- a/mk/manfull.pl +++ b/mk/manfull.pl @@ -1,11 +1,14 @@ #!/usr/bin/perl +$failures = 0; while ($page = shift) { system "mv $page $page.orig"; open IN,"<$page.orig" or die "Cannot read from $page.orig\n"; open OUT,">$page" or die "Cannot write to $page\n"; +$toc = undef; + while () { if (//) { print OUT; @@ -25,4 +28,11 @@ while () { } } system "rm $page.orig"; + +if (!defined($toc) || $toc != 0) { + ++$failures; + print STDERR "Patching of $page failed\n"; } +} + +$failures == 0 or die "Patching of $failures files failed\n"; -- 2.25.1 --------------B27C107D038567093D3D6B9D--