\x1b]8;; OSC character displayed on hyperlinks shown after calls to `guix describe` or `guix show` on mate-terminal 1.12.1 (Trisquel 8)

  • Done
  • quality assurance status badge
Details
4 participants
  • Calvin Heim
  • Jack Hill
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
Calvin Heim
Severity
normal

Debbugs page

C
C
Calvin Heim wrote on 4 Jan 2020 22:48
(address . bug-guix@gnu.org)
1578206891.2605.33.camel@gmail.com
Hi Guix developers,

When using mate-terminal version 1.12.1 (the default graphical terminal provided in Trisquel 8), Guix commands
that print hyperlinks to the terminal (such as `guix describe` and `guix show`)
print a mangled \x1b]8;; OSC character. I haven't tested the mate-terminal
package provided by Guix though, so this bug may only be visible to Trisquel users
of the Guix package manager relying on their host distribution's default terminal soon
after installing Guix.

On a related note, the procedure supports-hyperlinks in module (guix ui) checks the
environment variable INSIDE_EMACS to prevent hyperlink mangling when using Emacs.
Perhaps this procedure could be edited to solve this bug.

--
Calvin
Z
Z
zimoun wrote on 6 Jan 2020 10:37
Re: bug#38940: \x1b]8; ; OSC character displayed on hyperlinks shown after calls to `guix describe` or `guix show` on mate-terminal 1.12.1 (Trisquel 8)
(name . Calvin Heim)(address . frofroggy@gmail.com)(address . 38940@debbugs.gnu.org)
CAJ3okZ3Rso90gqLknkcZd3j=uyNFU5B_=vwuJ47eXfyTX-nr=A@mail.gmail.com
Hi,

Thank you for your report.


On Sun, 5 Jan 2020 at 07:49, Calvin Heim <frofroggy@gmail.com> wrote:

Toggle quote (7 lines)
> When using mate-terminal version 1.12.1 (the default graphical terminal provided in Trisquel 8), Guix commands
> that print hyperlinks to the terminal (such as `guix describe` and `guix show`)
> print a mangled \x1b]8;; OSC character. I haven't tested the mate-terminal
> package provided by Guix though, so this bug may only be visible to Trisquel users
> of the Guix package manager relying on their host distribution's default terminal soon
> after installing Guix.

I have tested with "guix environment --ad-hoc mater-terminal" on
foreign distro (Debian) and I do not see an issue.

So it probably comes from the Trisquel default configuration.


Toggle quote (4 lines)
> On a related note, the procedure supports-hyperlinks in module (guix ui) checks the
> environment variable INSIDE_EMACS to prevent hyperlink mangling when using Emacs.
> Perhaps this procedure could be edited to solve this bug.

Does "INSIDE_EMACS=1 guix describe" fix the issue?


All the best,
simon
C
C
Calvin Heim wrote on 6 Jan 2020 12:26
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 38940@debbugs.gnu.org)
1578342380.2215.13.camel@gmail.com
On Mon, 2020-01-06 at 19:37 +0100, zimoun wrote:
Toggle quote (19 lines)
> Hi,
>
> Thank you for your report.
>
>
> On Sun, 5 Jan 2020 at 07:49, Calvin Heim <frofroggy@gmail.com> wrote:
>
> >
> > When using mate-terminal version 1.12.1 (the default graphical terminal provided in Trisquel 8), Guix commands
> > that print hyperlinks to the terminal (such as `guix describe` and `guix show`)
> > print a mangled \x1b]8;; OSC character. I haven't tested the mate-terminal
> > package provided by Guix though, so this bug may only be visible to Trisquel users
> > of the Guix package manager relying on their host distribution's default terminal soon
> > after installing Guix.
> I have tested with "guix environment --ad-hoc mater-terminal" on
> foreign distro (Debian) and I do not see an issue.
>
> So it probably comes from the Trisquel default configuration.
>
I concur.
Toggle quote (8 lines)
>
> >
> > On a related note, the procedure supports-hyperlinks in module (guix ui) checks the
> > environment variable INSIDE_EMACS to prevent hyperlink mangling when using Emacs.
> > Perhaps this procedure could be edited to solve this bug.
> Does "INSIDE_EMACS=1 guix describe" fix the issue?
>

Yes.
Toggle quote (4 lines)
>  
>
> All the best,
> simon
Z
Z
zimoun wrote on 7 Jan 2020 03:58
(name . Calvin Heim)(address . frofroggy@gmail.com)(address . 38940@debbugs.gnu.org)
CAJ3okZ0xigUV3offJrTqVnXcgB_=1XevdL7f3wxz15=cwy_0+w@mail.gmail.com
Hi Calvin,

On Mon, 6 Jan 2020 at 21:26, Calvin Heim <frofroggy@gmail.com> wrote:

Toggle quote (15 lines)
> > On Sun, 5 Jan 2020 at 07:49, Calvin Heim <frofroggy@gmail.com> wrote:

> > > When using mate-terminal version 1.12.1 (the default graphical terminal provided in Trisquel 8), Guix commands
> > > that print hyperlinks to the terminal (such as `guix describe` and `guix show`)
> > > print a mangled \x1b]8;; OSC character. I haven't tested the mate-terminal
> > > package provided by Guix though, so this bug may only be visible to Trisquel users
> > > of the Guix package manager relying on their host distribution's default terminal soon
> > > after installing Guix.
> > I have tested with "guix environment --ad-hoc mater-terminal" on
> > foreign distro (Debian) and I do not see an issue.
> >
> > So it probably comes from the Trisquel default configuration.
> >
> I concur.

So, it is not a bug. ;-)


Toggle quote (6 lines)
> > > On a related note, the procedure supports-hyperlinks in module (guix ui) checks the
> > > environment variable INSIDE_EMACS to prevent hyperlink mangling when using Emacs.
> > > Perhaps this procedure could be edited to solve this bug.
> > Does "INSIDE_EMACS=1 guix describe" fix the issue?
> Yes.

Put in your configuration "export INSIDE_EMACS=1". :-)


Does the environment variable NO_OSC appears to you more meaningful
than INSIDE_EMACS?
Where do you think this should be documented? Which part of the manual?


All the best,
simon
C
C
Calvin Heim wrote on 8 Jan 2020 01:26
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 38940@debbugs.gnu.org)
1578475589.2665.55.camel@gmail.com
Hi Zimoun,

On Tue, 2020-01-07 at 12:58 +0100, zimoun wrote:
Toggle quote (3 lines)
> Does the environment variable NO_OSC appears to you more meaningful
> than INSIDE_EMACS?

It is more meaningful, but this terminal does interpret other operating system codes,
like OSC 12 for changing the cursor color. NO_OSC_8 would be specific to hyperlinks.

Toggle quote (1 lines)
> Where do you think this should be documented? Which part of the manual?
Installation > Application setup > Terminals
Toggle quote (10 lines)
> Some Guix commands print hyperlinks by sending non-printing control characters (\1b]8;;) 
> to the terminal display. In most cases, this works fine. But some older terminals will 
> misinterpret hyperlinks and print the control characters. 
> If that happens, define the NO_OSC_8 variable to disable hyperlinks:
>  
> $ export NO_OSC_8=1
> If you later upgrade to a terminal with hyperlink support, unset this variable to enable
> hyperlinks.

Sincerely,
Calvin
L
L
Ludovic Courtès wrote on 8 Jan 2020 13:28
(name . Calvin Heim)(address . frofroggy@gmail.com)
877e21eiy9.fsf@gnu.org
Hi,

Calvin Heim <frofroggy@gmail.com> skribis:

Toggle quote (7 lines)
> On Tue, 2020-01-07 at 12:58 +0100, zimoun wrote:
>> Does the environment variable NO_OSC appears to you more meaningful
>> than INSIDE_EMACS?
>
> It is more meaningful, but this terminal does interpret other operating system codes,
> like OSC 12 for changing the cursor color. NO_OSC_8 would be specific to hyperlinks.

The theory is that terminals should ignore OSC codes that they do not
support. Good’ol xterm, for instance, silently ignores those hyperlink
codes, whereas GNOME Terminal interprets them nicely.

So I would say that this is a bug in this version of mate-terminal, or
perhaps in the libvte version it’s using?

I’ve just tried mate-terminal 1.22.0 on vte 0.58.3 from Guix, and it
silently ignores those codes.

Thanks,
Ludo’.
C
C
Calvin Heim wrote on 8 Jan 2020 14:54
(name . Ludovic Courtès)(address . ludo@gnu.org)
1578524047.4836.21.camel@gmail.com
On Wed, 2020-01-08 at 22:28 +0100, Ludovic Courtès wrote:
Toggle quote (15 lines)
> Hi,
>
> Calvin Heim <frofroggy@gmail.com> skribis:
>
> >
> > On Tue, 2020-01-07 at 12:58 +0100, zimoun wrote:
> > >
> > > Does the environment variable NO_OSC appears to you more meaningful
> > > than INSIDE_EMACS?
> > It is more meaningful, but this terminal does interpret other operating system codes,
> > like OSC 12 for changing the cursor color. NO_OSC_8 would be specific to hyperlinks.
> The theory is that terminals should ignore OSC codes that they do not
> support.  Good’ol xterm, for instance, silently ignores those hyperlink
> codes, whereas GNOME Terminal interprets them nicely.
>
I concur.

Toggle quote (2 lines)
> So I would say that this is a bug in this version of mate-terminal, or
> perhaps in the libvte version it’s using?
Yes, the bug is in libvte 0.28.2 as distributed with Trisquel 8's software updater. 
I misspoke earlier when I mentioned mate-terminal.

This bug will be resolved eventually by Trisquel following the upstream sources in 
Ubuntu, so barring objections I will close this issue.
Toggle quote (6 lines)
> I’ve just tried mate-terminal 1.22.0 on vte 0.58.3 from Guix, and it
> silently ignores those codes.
>
> Thanks,
> Ludo’.

Thanks,
Calvin
Z
Z
zimoun wrote on 9 Jan 2020 04:09
(name . Calvin Heim)(address . frofroggy@gmail.com)
CAJ3okZ216TJ4+_HyZL_V1=v_+y1Ggy+33BT__GQgTQ1TyMwtBg@mail.gmail.com
Hi Calvin.

On Wed, 8 Jan 2020 at 23:54, Calvin Heim <frofroggy@gmail.com> wrote:

Toggle quote (3 lines)
> This bug will be resolved eventually by Trisquel following the upstream sources in
> Ubuntu, so barring objections I will close this issue.

Please close by sending an email to 38940-done@debbugs.gnu.org with
some explanations when you judge it is resolved; even if it is *not* a
bug of Guix but a _bug of Trisquel_. ;-)


All the best,
simon
Z
Z
zimoun wrote on 9 Jan 2020 04:17
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ3okZ0VPZRL+ZXq5MssmyrZD2z-zqJZJc7_1A_vHSxjfzRWRQ@mail.gmail.com
Hi Ludo,


On Wed, 8 Jan 2020 at 22:28, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (4 lines)
> The theory is that terminals should ignore OSC codes that they do not
> support. Good’ol xterm, for instance, silently ignores those hyperlink
> codes, whereas GNOME Terminal interprets them nicely.

Héhé! It is what the comment you wrote in `supports-hyperlinks?' says. :-)

1. Instead of INSIDE_EMACS, the variable name NO_SUPPORT_HYPERLINK or
other seems more meaningful. Maybe?
2. The comment should go in the docstring.


What do you think?



All the best,
simon
L
L
Ludovic Courtès wrote on 9 Jan 2020 13:23
(name . zimoun)(address . zimon.toutoune@gmail.com)
87woa0tjbv.fsf@gnu.org
Hi!

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (11 lines)
> On Wed, 8 Jan 2020 at 22:28, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> The theory is that terminals should ignore OSC codes that they do not
>> support. Good’ol xterm, for instance, silently ignores those hyperlink
>> codes, whereas GNOME Terminal interprets them nicely.
>
> Héhé! It is what the comment you wrote in `supports-hyperlinks?' says. :-)
>
> 1. Instead of INSIDE_EMACS, the variable name NO_SUPPORT_HYPERLINK or
> other seems more meaningful. Maybe?

Actually the goal was to remove ‘INSIDE_EMACS’ from there once a
widespread-enough Emacs version supports it, which could be within a
year. And since other terminals are supposed to ignore it altogether, I
would rather not add a special environment variable.

WDYT?

Toggle quote (2 lines)
> 2. The comment should go in the docstring.

I tend to write “implementation details” as comments, while keeping pure
descriptions of the interface as docstrings; I think it’s OK. :-)

Ludo’.
L
L
Ludovic Courtès wrote on 9 Jan 2020 13:24
(name . Calvin Heim)(address . frofroggy@gmail.com)
87sgkotjaj.fsf@gnu.org
Hi Calvin,

Calvin Heim <frofroggy@gmail.com> skribis:

Toggle quote (6 lines)
> Yes, the bug is in libvte 0.28.2 as distributed with Trisquel 8's software updater. 
> I misspoke earlier when I mentioned mate-terminal.
>
> This bug will be resolved eventually by Trisquel following the upstream sources in 
> Ubuntu, so barring objections I will close this issue.

Sure, closing!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 9 Jan 2020 13:24
control message for bug #38940
(address . control@debbugs.gnu.org)
87r208tja9.fsf@gnu.org
tags 38940 notabug
close 38940
quit
Z
Z
zimoun wrote on 9 Jan 2020 13:31
Re: bug#38940: \x1b]8; ; OSC character displayed on hyperlinks shown after calls to `guix describe` or `guix show` on mate-terminal 1.12.1 (Trisquel 8)
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ3okZ1C6RN2OOXde1ta=qpDkYRmyrga2drXgEqOqaLi=Vdf=g@mail.gmail.com
Hi Ludo,

On Thu, 9 Jan 2020 at 22:23, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (8 lines)
> > 1. Instead of INSIDE_EMACS, the variable name NO_SUPPORT_HYPERLINK or
> > other seems more meaningful. Maybe?
>
> Actually the goal was to remove ‘INSIDE_EMACS’ from there once a
> widespread-enough Emacs version supports it, which could be within a
> year. And since other terminals are supposed to ignore it altogether, I
> would rather not add a special environment variable.

Sound reasonable. :-)


Toggle quote (5 lines)
> > 2. The comment should go in the docstring.
>
> I tend to write “implementation details” as comments, while keeping pure
> descriptions of the interface as docstrings; I think it’s OK. :-)

I fully trust your experience. ;-)


Cheers,
simon
J
J
Jack Hill wrote on 9 Jan 2020 19:16
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38940@debbugs.gnu.org)
alpine.DEB.2.20.2001092214040.11560@marsh.hcoop.net
Hi Ludo'

On Thu, 9 Jan 2020, Ludovic Courtès wrote:

Toggle quote (8 lines)
>> 1. Instead of INSIDE_EMACS, the variable name NO_SUPPORT_HYPERLINK or
>> other seems more meaningful. Maybe?
>
> Actually the goal was to remove ‘INSIDE_EMACS’ from there once a
> widespread-enough Emacs version supports it, which could be within a
> year. And since other terminals are supposed to ignore it altogether, I
> would rather not add a special environment variable.

Which Emacs version support it? I'm using Emacs 26.3 from master, and see
the escape sequences in eshell. They seem to be correctly ignored in M-x
shell.

Thanks,
Jack
L
L
Ludovic Courtès wrote on 10 Jan 2020 05:51
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 38940@debbugs.gnu.org)
87tv53xvw9.fsf@gnu.org
Hi,

Jack Hill <jackhill@jackhill.us> skribis:

Toggle quote (15 lines)
> On Thu, 9 Jan 2020, Ludovic Courtès wrote:
>
>>> 1. Instead of INSIDE_EMACS, the variable name NO_SUPPORT_HYPERLINK or
>>> other seems more meaningful. Maybe?
>>
>> Actually the goal was to remove ‘INSIDE_EMACS’ from there once a
>> widespread-enough Emacs version supports it, which could be within a
>> year. And since other terminals are supposed to ignore it altogether, I
>> would rather not add a special environment variable.
>
> Which Emacs version support it? I'm using Emacs 26.3 from master, and
> see the escape sequences in eshell. They seem to be correctly ignored
> in M-x
> shell.

Emacs 26.3 does not support it; all I know is that there’s a patch by
José Marchesi floating around.

Ludo’.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 38940@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 38940
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch