unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: arash@gnu.org, emacs-devel@gnu.org
Subject: Re: emacs-29 889a550ca08: ; Fix Texinfo warnings
Date: Mon, 23 Oct 2023 17:27:05 +0300	[thread overview]
Message-ID: <838r7to1mu.fsf@gnu.org> (raw)
In-Reply-To: <87bkcp8oai.fsf@localhost> (message from Ihor Radchenko on Mon, 23 Oct 2023 13:24:21 +0000)

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: arash@gnu.org, emacs-devel@gnu.org
> Date: Mon, 23 Oct 2023 13:24:21 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> What we are getting in org.texi is
> >> org.texi:15975: warning: @anchor should not appear on @item line
> >> 
> >> May someone familiar with Texinfo explain what is the problem?
> >
> > What is unclear in the warning's text?  I think it speaks for itself.
> 
> According to Texinfo manual:
> 
>     An anchor is a position in your document, labelled so that
>     cross-references can refer to it, just as they can to nodes. You
>     create an anchor with the @anchor command, and give the label as a
>     normal brace-delimited argument. For example:
>     
>     This marks the @anchor{x-spot}spot.
>     ...
>     @xref{x-spot,,the spot}.
> 
>     ...
> 
>     It is best to put @anchor commands just before the position you wish
>     to refer to; that way, the reader’s eye is led on to the correct
>     text when they jump to the anchor. You can put the @anchor command
>     on a line by itself if that helps readability of the source.
>     Whitespace (including newlines) is ignored after @anchor.
> 
> I do not see any clear reason why one may not put @anchor at the same
> line with @item.

I don't understand what you are saying here.  Are you saying that the
warning is bogus and should not be emitted in this case?  Or that the
Texinfo manual should explain better why @anchor should not appear on
an @item line?  If so, please take this up with the Texinfo
maintainers, and ask them either to change the code or to fix the
manual.

Me, I would simply move the @anchor line before the @item, where it
belongs.  It will shut up the warning and also make the manual cleaner
from the Texinfo POV.  (Thet's what I did in other cases where this
warning was emitted by makeinfo 7.1.)  But that's me.

> In Org mode, we add @anchor at the same place where the corresponding
> Org markup (<<<radio target>>>) is placed.

That's a mistake, IMO.  @anchor is basically the same as @node.

> I guess we might try to put @anchor on a separate line just for the sake
> of avoiding this warning, but I am not confident that it is always safe
> and won't break Texinfo markup.

It won't, since that's how @anchor is supposed to be used.



  reply	other threads:[~2023-10-23 14:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169796650463.2984.6470791064475342706@vcs2.savannah.gnu.org>
     [not found] ` <20231022092145.0486AC09BDB@vcs2.savannah.gnu.org>
2023-10-22 10:30   ` emacs-29 889a550ca08: ; Fix Texinfo warnings Arash Esbati
2023-10-22 11:03     ` Eli Zaretskii
2023-10-23 10:36       ` Arash Esbati
2023-10-23 12:35       ` Ihor Radchenko
2023-10-23 12:44         ` Eli Zaretskii
2023-10-23 13:24           ` Ihor Radchenko
2023-10-23 14:27             ` Eli Zaretskii [this message]
2023-10-24  9:11               ` Ihor Radchenko
2023-10-24 11:48                 ` Eli Zaretskii
2023-11-05 11:30                   ` @anchor on @item line (was: emacs-29 889a550ca08: ; Fix Texinfo warnings) Ihor Radchenko
2023-11-06 19:29                     ` Gavin Smith
2023-11-07 10:29                       ` Patrice Dumas
2023-11-12 19:23                         ` @anchor on @item line Gavin Smith
2023-11-14 21:58                           ` Gavin Smith
2023-11-15  3:30                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838r7to1mu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=arash@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).