GNU bug report logs - #59989
[PATCH] tests: Fix txinfo-include test for texinfo 7.x

Previous Next

Package: automake-patches;

Reported by: Frederic Berat <fberat <at> redhat.com>

Date: Mon, 12 Dec 2022 08:44:02 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59989 in the body.
You can then email your comments to 59989 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Mon, 12 Dec 2022 08:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frederic Berat <fberat <at> redhat.com>:
New bug report received and forwarded. Copy sent to automake-patches <at> gnu.org. (Mon, 12 Dec 2022 08:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Frederic Berat <fberat <at> redhat.com>
To: automake-patches <at> gnu.org
Cc: Frédéric Bérat <fberat <at> redhat.com>
Subject: [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Mon, 12 Dec 2022 07:28:38 +0100
From: Frédéric Bérat <fberat <at> redhat.com>

Texinfo modified its behavior regarding apostrophes, which are now
replaced by UTF-8 right single quotes by default.
It looks like this was supposed to be the default for few years already,
but this behavior was broken so far.

Use the @verb construct in order to ensure that the quotes are kept
has-is, so that we can easily grep for "GNU's Not Unix".
---
 t/txinfo-include.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh
index 8a15f01b0..40b61878f 100644
--- a/t/txinfo-include.sh
+++ b/t/txinfo-include.sh
@@ -62,7 +62,7 @@ END
 cat > three.texi << 'END'
 @node three
 @chapter Chapter two
-GNU's Not Unix.
+@verb{.GNU's Not Unix..}
 END
 
 mkdir sub
-- 
2.38.1





Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Mon, 12 Dec 2022 22:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 59989 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: fberat <at> redhat.com
Cc: 59989 <at> debbugs.gnu.org, 59989-done <at> debbugs.gnu.org
Subject: Re: [bug#59989] [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Mon, 12 Dec 2022 15:51:03 -0700
Hi Frederic,

    Texinfo modified its behavior regarding apostrophes, which are now
    replaced by UTF-8 right single quotes by default.

Sorry to hear it, but not surprised.

    -GNU's Not Unix.
    +@verb{.GNU's Not Unix..}

I don't think there's any guarantee that verb quotes will also be
"helpfully" changed in the future. One wouldn't think so, but ...

So instead, I changed the test document to avoid apostrophes. Pushed the
below. Hope it flies. --thanks, karl.

--- a/t/txinfo-include.sh
+++ b/t/txinfo-include.sh
@@ -28,6 +28,9 @@ main_TEXINFOS = one.texi two.texi three.texi
 sub_more_TEXINFOS = sub/desc.texi sub/hist.texi
 END
 
+# We avoid apostrophes in the test document since Texinfo
+# turns them into UTF-8, which is not easy to grep.
+#
 cat > main.texi << 'END'
 \input texinfo
 @setfilename main.info
@@ -61,8 +64,8 @@ END
 
 cat > three.texi << 'END'
 @node three
-@chapter Chapter two
-GNU's Not Unix.
+@chapter Chapter three
+Quux quux quux.
 END
 
 mkdir sub
@@ -106,7 +109,7 @@ check_info_contents ()
   srcdir=${1-.}
   $FGREP "Foo bar, baz."                        $srcdir/main.info
   $FGREP "Blah Blah Blah."                      $srcdir/main.info
-  $FGREP "GNU's Not Unix."                      $srcdir/main.info
+  $FGREP "Quux quux quux."                      $srcdir/main.info
   $FGREP 'It does something, really.'           $srcdir/sub/more.info
   $FGREP 'It was written somehow.'              $srcdir/sub/more.info
 }

compile finished at Mon Dec 12 14:48:33 2022




Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Mon, 12 Dec 2022 22:52:03 GMT) Full text and rfc822 format available.

Notification sent to Frederic Berat <fberat <at> redhat.com>:
bug acknowledged by developer. (Mon, 12 Dec 2022 22:52:03 GMT) Full text and rfc822 format available.

Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Tue, 13 Dec 2022 00:36:01 GMT) Full text and rfc822 format available.

Message #16 received at 59989 <at> debbugs.gnu.org (full text, mbox):

From: Jacob Bachmeyer <jcb62281 <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: fberat <at> redhat.com, 59989 <at> debbugs.gnu.org, 59989-done <at> debbugs.gnu.org
Subject: Re: [bug#59989] [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Mon, 12 Dec 2022 18:35:47 -0600
Karl Berry wrote:
> Hi Frederic,
>
>     Texinfo modified its behavior regarding apostrophes, which are now
>     replaced by UTF-8 right single quotes by default.
>
> Sorry to hear it, but not surprised.
>
>     -GNU's Not Unix.
>     +@verb{.GNU's Not Unix..}
>
> I don't think there's any guarantee that verb quotes will also be
> "helpfully" changed in the future. One wouldn't think so, but ...
>   

There has to be some way to get a straight quote, and verbatim is (as 
far as I can tell) intended for code examples and similar literal text.  
Note that TeX has long (always?) converted backtick and apostrophe to 
left and right quotes, building up double quotes from `` and '', so this 
change in Texinfo harmonizes Info output with what texinfo.tex has 
always produced.  (There have been a few places in the DejaGnu manual 
where I have converted ASCII double quotes to TeX style because regular 
double quotes look seriously out of place in the PDF version.)

> So instead, I changed the test document to avoid apostrophes. Pushed the
> below. Hope it flies. --thanks, karl.
>   

Since this is a test document, that should not be a problem.


-- Jacob





Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Tue, 13 Dec 2022 00:36:01 GMT) Full text and rfc822 format available.

Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Tue, 13 Dec 2022 08:03:04 GMT) Full text and rfc822 format available.

Message #22 received at 59989 <at> debbugs.gnu.org (full text, mbox):

From: Frederic Berat <fberat <at> redhat.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 59989 <at> debbugs.gnu.org, 59989-done <at> debbugs.gnu.org
Subject: Re: [bug#59989] [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Tue, 13 Dec 2022 07:15:30 +0100
[Message part 1 (text/plain, inline)]
Fine with me, thanks !

On Mon, Dec 12, 2022 at 11:52 PM Karl Berry <karl <at> freefriends.org> wrote:

> Hi Frederic,
>
>     Texinfo modified its behavior regarding apostrophes, which are now
>     replaced by UTF-8 right single quotes by default.
>
> Sorry to hear it, but not surprised.
>
>     -GNU's Not Unix.
>     +@verb{.GNU's Not Unix..}
>
> I don't think there's any guarantee that verb quotes will also be
> "helpfully" changed in the future. One wouldn't think so, but ...
>
> So instead, I changed the test document to avoid apostrophes. Pushed the
> below. Hope it flies. --thanks, karl.
>
> --- a/t/txinfo-include.sh
> +++ b/t/txinfo-include.sh
> @@ -28,6 +28,9 @@ main_TEXINFOS = one.texi two.texi three.texi
>  sub_more_TEXINFOS = sub/desc.texi sub/hist.texi
>  END
>
> +# We avoid apostrophes in the test document since Texinfo
> +# turns them into UTF-8, which is not easy to grep.
> +#
>  cat > main.texi << 'END'
>  \input texinfo
>  @setfilename main.info
> @@ -61,8 +64,8 @@ END
>
>  cat > three.texi << 'END'
>  @node three
> -@chapter Chapter two
> -GNU's Not Unix.
> +@chapter Chapter three
> +Quux quux quux.
>  END
>
>  mkdir sub
> @@ -106,7 +109,7 @@ check_info_contents ()
>    srcdir=${1-.}
>    $FGREP "Foo bar, baz."                        $srcdir/main.info
>    $FGREP "Blah Blah Blah."                      $srcdir/main.info
> -  $FGREP "GNU's Not Unix."                      $srcdir/main.info
> +  $FGREP "Quux quux quux."                      $srcdir/main.info
>    $FGREP 'It does something, really.'           $srcdir/sub/more.info
>    $FGREP 'It was written somehow.'              $srcdir/sub/more.info
>  }
>
> compile finished at Mon Dec 12 14:48:33 2022
>
>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Tue, 13 Dec 2022 08:03:05 GMT) Full text and rfc822 format available.

Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Wed, 14 Dec 2022 08:15:01 GMT) Full text and rfc822 format available.

Message #28 received at 59989 <at> debbugs.gnu.org (full text, mbox):

From: Gavin Smith <gavinsmith0123 <at> gmail.com>
To: Frederic Berat <fberat <at> redhat.com>
Cc: 59989 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
Subject: Re: [bug#59989] [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Wed, 14 Dec 2022 08:13:55 +0000
On Mon, Dec 12, 2022 at 07:28:38AM +0100, Frederic Berat wrote:
> From: Frédéric Bérat <fberat <at> redhat.com>
> 
> Texinfo modified its behavior regarding apostrophes, which are now
> replaced by UTF-8 right single quotes by default.
> It looks like this was supposed to be the default for few years already,
> but this behavior was broken so far.
> 
> Use the @verb construct in order to ensure that the quotes are kept
> has-is, so that we can easily grep for "GNU's Not Unix".

The change affected the output when a @documentencoding directive was
not present in the Texinfo file.  The curly quotes were used from
Texinfo 5.0 onwards I believe (the big Perl rewrite from 2013) if
"@documentencoding UTF-8" was specified.  Later (2019) UTF-8 was made the
default encoding for input files but the curly quotes were not used
in the output unless there was an explicit @documentencoding directive.
This was not documented well and users found it confusing, and in the latest
release, it makes no difference whether the directive is present.
These non-ASCII characters are on by default and turned off by passing
"-c ASCII_PUNCTUATION=0" on the texi2any command line.

I think using curly quotes by default was a mistake in the first place
for UTF-8 input; however, any changes to the defaults should be discussed
on bug-texinfo <at> gnu.org.  The main issue that I would foresee is that
in Emacs Info mode, there can be highlighting of text surrounded by
curly quotes, so we would have to check that this highlighting also
worked if ASCII apostrophes were used instead.

One option would be to carry on using ‘ and ’ for the output of @code etc.,
but not for where literal ` and ' appeared in the Texinfo source.  Likewise
for “ and ” and `` and ''.  This would mean you could easily search for
words like "Don't" in the Info browser.




Information forwarded to automake-patches <at> gnu.org:
bug#59989; Package automake-patches. (Wed, 14 Dec 2022 12:52:02 GMT) Full text and rfc822 format available.

Message #31 received at 59989 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gavin Smith <gavinsmith0123 <at> gmail.com>
Cc: fberat <at> redhat.com, 59989 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
Subject: Re: [bug#59989] [PATCH] tests: Fix txinfo-include test for texinfo 7.x
Date: Wed, 14 Dec 2022 14:51:02 +0200
> From: Gavin Smith <gavinsmith0123 <at> gmail.com>
> Date: Wed, 14 Dec 2022 08:13:55 +0000
> Cc: 59989 <at> debbugs.gnu.org, bug-texinfo <at> gnu.org
> 
> I think using curly quotes by default was a mistake in the first place
> for UTF-8 input; however, any changes to the defaults should be discussed
> on bug-texinfo <at> gnu.org.  The main issue that I would foresee is that
> in Emacs Info mode, there can be highlighting of text surrounded by
> curly quotes, so we would have to check that this highlighting also
> worked if ASCII apostrophes were used instead.

Emacs never highlighted symbols quoted `like this', before Texinfo
started producing Unicode quotes.  So people who want the latter style
of quoting are (or should be) already accustomed to not seeing such
symbols highlighted, and so if we now introduce an optional feature to
produce quoting `like this', there will be no complaints -- provided
that the default behavior will remain ‘like this’.  Making `this' be
the default now is not recommended, as I expect too many people to
complain.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Jan 2023 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.