From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gavin Smith Newsgroups: gmane.comp.tex.texinfo.general,gmane.emacs.devel Subject: Re: @anchor on @item line (was: emacs-29 889a550ca08: ; Fix Texinfo warnings) Date: Mon, 6 Nov 2023 19:29:50 +0000 Message-ID: References: <20231022092145.0486AC09BDB@vcs2.savannah.gnu.org> <83mswaq5q6.fsf@gnu.org> <87fs218qk6.fsf@localhost> <83lebto6e5.fsf@gnu.org> <87bkcp8oai.fsf@localhost> <838r7to1mu.fsf@gnu.org> <87v8aw75cj.fsf@localhost> <834jigmeb3.fsf@gnu.org> <87msvs5tel.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24811"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , help-texinfo@gnu.org, arash@gnu.org, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: help-texinfo-bounces+gnu-help-texinfo2=m.gmane-mx.org@gnu.org Mon Nov 06 20:30:27 2023 Return-path: Envelope-to: gnu-help-texinfo2@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 1r05Io-0006Er-8m for gnu-help-texinfo2@m.gmane-mx.org; Mon, 06 Nov 2023 20:30:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r05IN-0002EF-1i; Mon, 06 Nov 2023 14:29:59 -0500 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 1r05IL-0002Bj-Dz; Mon, 06 Nov 2023 14:29:57 -0500 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r05IJ-0000Qb-OH; Mon, 06 Nov 2023 14:29:57 -0500 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4083f613272so42334345e9.1; Mon, 06 Nov 2023 11:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699298992; x=1699903792; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=T7eu6y82L2pEK1jGU3rbf7sz9U+KkggDPkhW3mka4fk=; b=cv9zto7f4LPeIXCSpXULjK9xVu3t5S7mgSMh+vqJ5bIQo4DU6Q+hBeklWKTIS9+fnC 2wSaVbE7+ih8g+Iqn4mDsL9A2F0CF/x7ZMaZZby6pRPX2AB3pHlT4eJeFBpwahXBUPSO fHVMVKI/CnZHvl6urBkZKsqUTC+HFbc7OWQhktPE7oGE9F4h/7+UQHo34f95rzrO9snW QdE3oBuF++dt84Lx8iGwFze+Or9PH9hBGeB6eHDd1yH4lH6I7tViyKKKyzXRXrqmdQo6 MGpI1dAYT+QzUmwztGqyaY/uqs1AqrcFTpSw2wlnU8KSCXyxRXuTNz4Gwgmzd0xdwe9m ZmBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699298992; x=1699903792; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=T7eu6y82L2pEK1jGU3rbf7sz9U+KkggDPkhW3mka4fk=; b=xO5i+ONPu61/YjpS5w6pvcuyZT7zFCKtXJKhoUwyDyXm/MdSy6EhYrGQwIAD+D3W6c zljwEkCM2/uv9Q58KYKK5mrr7qve1em0IKCBrpSDN1p5TkgNYzXGY5tafLNhV1oQhJBf Aqs39Y7cKHwrDxJlvmDGfuMXBb5NebUI7VfAqh1pqfxiRSMLQ/WtIJvk3pUlGGAdmOe8 7tGQHjyteY0qJmCrixIvwG4qazKuB+yp4RRFvmnV18vfcFgYevJOaJqXDsH/tCtYAGeD Rz47vi14t+jIWmSOq+Ph4tRc7i4GfbdNMDL87pxixBAbbDCovwwHExjM9N7o5yQk8myQ N5tg== X-Gm-Message-State: AOJu0YwJS4wcaMLOKE8iwfMbtJEram5kHNNxnV1sjWuWJYBOg4CMM8nE 8bFZirVMzr+lbUvcJxb3kEMQYVJNSPg= X-Google-Smtp-Source: AGHT+IEI3amv3NOsQ5uIzHOHq/XcpsuD2cwNvdOl8yPRya6CRur6qCuvduY59eH8uJahwrUUU1WMPQ== X-Received: by 2002:a05:600c:1d19:b0:409:5a92:470e with SMTP id l25-20020a05600c1d1900b004095a92470emr552969wms.28.1699298992344; Mon, 06 Nov 2023 11:29:52 -0800 (PST) Original-Received: from localhost ([2a02:c7f:c29:b00:73b:797b:fdad:783a]) by smtp.gmail.com with ESMTPSA id f16-20020a7bc8d0000000b0040684abb623sm12799499wml.24.2023.11.06.11.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 11:29:51 -0800 (PST) X-Google-Original-From: Gavin Smith Content-Disposition: inline In-Reply-To: <87msvs5tel.fsf@localhost> Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=gavinsmith0123@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-texinfo@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the Texinfo documentation system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-texinfo-bounces+gnu-help-texinfo2=m.gmane-mx.org@gnu.org Original-Sender: help-texinfo-bounces+gnu-help-texinfo2=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.tex.texinfo.general:3346 gmane.emacs.devel:312276 Archived-At: On Sun, Nov 05, 2023 at 11:30:42AM +0000, Ihor Radchenko wrote: > However, there is a warning being produced when @anchor is found on the > same line with an item: > > org.texi:15975: warning: @anchor should not appear on @item line > > The problematic .texi source is > > @table @asis > @item @samp{OrgOdtStyles.xml} @anchor{x-orgodtstyles-xml} > This file contributes to the @samp{styles.xml} file of the final ODT > document. This file gets modified for the following purposes: > > Here, the @anchor is referring to OrgOdtStyles.xml file and is not > necessarily linked to the @item itself. > > May someone please explain the correct usage of @anchor in the above > example and why the warning is being thrown? I don't think there's really much wrong with it. We added more warnings for nested commands, trying to define which commands should occur in certain contexts. We have given the @item command a class of "contain_basic_inline", which excludes anchor commands, as well as the cross-reference commands. I don't remember, or never knew to start with, what the justification was for giving @item this class. It was the case for Texinfo 7.0 too, as seen in tp/Texinfo/XS/parsetexi/command_data.txt in that release: item_LINE line,close_paragraph,contain_simple_text LINE_line ("contain_simple_text" has now been renamed "contain_basic_inline"). However, for whatever reason, this use of @anchor on an @item line didn't trigger the warning in earlier releases. It would be easy, I expect, to remove this warning: diff --git a/tp/Texinfo/command_data.txt b/tp/Texinfo/command_data.txt index 7d07b8bd54..df63c6ccd7 100644 --- a/tp/Texinfo/command_data.txt +++ b/tp/Texinfo/command_data.txt @@ -254,8 +254,8 @@ printindex line,formattable_line,close_paragraph,global,contain_pla listoffloats line,formattable_line,close_paragraph,global,contain_basic_inline LINE_line exdent line,formatted_line,close_paragraph LINE_line # or nobrace skipspace, depending on the context -item_LINE line,formatted_line,close_paragraph,contain_basic_inline LINE_line -itemx line,formatted_line,close_paragraph,contain_basic_inline LINE_line +item_LINE line,formatted_line,close_paragraph LINE_line +itemx line,formatted_line,close_paragraph LINE_line nodedescription line,close_paragraph LINE_line # in index entries subentry line,in_index,contain_basic_inline LINE_line 0$ However, I would like to wait to see if anybody else has any comments first.