public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* After cygwin upgrade, Emacs shell buffers with colors are corrupted
@ 2020-03-17 23:14 David Karr
  2020-03-18  1:03 ` Ken Brown
  0 siblings, 1 reply; 8+ messages in thread
From: David Karr @ 2020-03-17 23:14 UTC (permalink / raw)
  To: The Cygwin Mailing List

Yesterday I upgraded Cygwin, which I hadn't done in a while. I had recently
upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are correct).

My current Emacs version is 26.3, but I don't know what it was before the
upgrade.

If I create a shell buffer and execute a command that produces plain,
uncolored output, it appears to work fine.  However, output from "Maven"
has always been colorized for me, and it's always worked fine.  Today, I'm
seeing that the output is severely corrupted.  If I pipe the output into a
file and view that, which doesn't have colors, the contents are fine. I
also ran the same process in a mintty window, which is colorized in the
same way, and that is also working fine.

For instance, if this is what I see in a mintty buffer:
-----------------------
[WACDTL03DK068X:~/git/cartms] mvn package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=128m; sup
port was removed in 8.0
[INFO] Scanning for projects...
[WARNING]
...
-------------------------

What I see in the Emacs shell buffer is something like this:
-------------------------
[WACDTL03DK068X:~/git/cartms] mvn package
[WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
HotSpot(TM) 64-
Bit Server VM warning:ignoring option MaxPermSize=128m; support was removed
in
8.0
[INFO] Scanning for projects...[
[WARNING] l





....
---------------------------

The first thing I see is that it prints the shell prompt twice AFTER
pressing enter on the command line to run. That might possibly be an issue
with my Bash dot files, but this didn't happen before the Cygwin upgrade,
and it doesn't happen in the mintty window.

After that, it gets even worse.  The "Java HotSpot ..." line prints in
three lines, instead of a single line.  Then, the first "WARNING" line has
the "l" at the end of the line, and then numerous blank lines.  The rest of
the output is mangled in other ways.

Any ideas what might be wrong here?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-17 23:14 After cygwin upgrade, Emacs shell buffers with colors are corrupted David Karr
@ 2020-03-18  1:03 ` Ken Brown
  2020-03-18 13:44   ` David Karr
  0 siblings, 1 reply; 8+ messages in thread
From: Ken Brown @ 2020-03-18  1:03 UTC (permalink / raw)
  To: cygwin

On 3/17/2020 7:14 PM, David Karr via Cygwin wrote:
> Yesterday I upgraded Cygwin, which I hadn't done in a while. I had recently
> upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are correct).
> 
> My current Emacs version is 26.3, but I don't know what it was before the
> upgrade.
> 
> If I create a shell buffer and execute a command that produces plain,
> uncolored output, it appears to work fine.  However, output from "Maven"
> has always been colorized for me, and it's always worked fine.  Today, I'm
> seeing that the output is severely corrupted.  If I pipe the output into a
> file and view that, which doesn't have colors, the contents are fine. I
> also ran the same process in a mintty window, which is colorized in the
> same way, and that is also working fine.
> 
> For instance, if this is what I see in a mintty buffer:
> -----------------------
> [WACDTL03DK068X:~/git/cartms] mvn package
> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
> MaxPermSize=128m; sup
> port was removed in 8.0
> [INFO] Scanning for projects...
> [WARNING]
> ...
> -------------------------
> 
> What I see in the Emacs shell buffer is something like this:
> -------------------------
> [WACDTL03DK068X:~/git/cartms] mvn package
> [WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
> HotSpot(TM) 64-
> Bit Server VM warning:ignoring option MaxPermSize=128m; support was removed
> in
> 8.0
> [INFO] Scanning for projects...[
> [WARNING] l
> 
> 
> 
> 
> 
> ....
> ---------------------------
> 
> The first thing I see is that it prints the shell prompt twice AFTER
> pressing enter on the command line to run. That might possibly be an issue
> with my Bash dot files, but this didn't happen before the Cygwin upgrade,
> and it doesn't happen in the mintty window.
> 
> After that, it gets even worse.  The "Java HotSpot ..." line prints in
> three lines, instead of a single line.  Then, the first "WARNING" line has
> the "l" at the end of the line, and then numerous blank lines.  The rest of
> the output is mangled in other ways.
> 
> Any ideas what might be wrong here?

This is probably related to the new pty code.  Does it help if you start emacs 
like this?

   CYGWIN=disable_pcon emacs

If so, that confirms my guess and gives you a workaround.

Ken

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-18  1:03 ` Ken Brown
@ 2020-03-18 13:44   ` David Karr
  2020-03-18 15:22     ` Andrey Repin
  0 siblings, 1 reply; 8+ messages in thread
From: David Karr @ 2020-03-18 13:44 UTC (permalink / raw)
  To: Ken Brown; +Cc: The Cygwin Mailing List

Thanks, that worked.  For now, I guess I have to figure out how to set that
property permanently, or until this pty bug is fixed.. I start Emacs from a
shortcut, executing "emacs.xml".  I see the file appears to have some
syntax for setting the environment, but I've never inspected that file
before.

On Tue, Mar 17, 2020 at 6:04 PM Ken Brown via Cygwin <cygwin@cygwin.com>
wrote:

> On 3/17/2020 7:14 PM, David Karr via Cygwin wrote:
> > Yesterday I upgraded Cygwin, which I hadn't done in a while. I had
> recently
> > upgraded my Windows 10 OS from build 1709 to 1809 (yes, those are
> correct).
> >
> > My current Emacs version is 26.3, but I don't know what it was before the
> > upgrade.
> >
> > If I create a shell buffer and execute a command that produces plain,
> > uncolored output, it appears to work fine.  However, output from "Maven"
> > has always been colorized for me, and it's always worked fine.  Today,
> I'm
> > seeing that the output is severely corrupted.  If I pipe the output into
> a
> > file and view that, which doesn't have colors, the contents are fine. I
> > also ran the same process in a mintty window, which is colorized in the
> > same way, and that is also working fine.
> >
> > For instance, if this is what I see in a mintty buffer:
> > -----------------------
> > [WACDTL03DK068X:~/git/cartms] mvn package
> > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
> > MaxPermSize=128m; sup
> > port was removed in 8.0
> > [INFO] Scanning for projects...
> > [WARNING]
> > ...
> > -------------------------
> >
> > What I see in the Emacs shell buffer is something like this:
> > -------------------------
> > [WACDTL03DK068X:~/git/cartms] mvn package
> > [WACDTL03DK068X:~/git/cartms] [WACDTL03DK068X:~/git/cartms] Java
> > HotSpot(TM) 64-
> > Bit Server VM warning:ignoring option MaxPermSize=128m; support was
> removed
> > in
> > 8.0
> > [INFO] Scanning for projects...[
> > [WARNING] l
> >
> >
> >
> >
> >
> > ....
> > ---------------------------
> >
> > The first thing I see is that it prints the shell prompt twice AFTER
> > pressing enter on the command line to run. That might possibly be an
> issue
> > with my Bash dot files, but this didn't happen before the Cygwin upgrade,
> > and it doesn't happen in the mintty window.
> >
> > After that, it gets even worse.  The "Java HotSpot ..." line prints in
> > three lines, instead of a single line.  Then, the first "WARNING" line
> has
> > the "l" at the end of the line, and then numerous blank lines.  The rest
> of
> > the output is mangled in other ways.
> >
> > Any ideas what might be wrong here?
>
> This is probably related to the new pty code.  Does it help if you start
> emacs
> like this?
>
>    CYGWIN=disable_pcon emacs
>
> If so, that confirms my guess and gives you a workaround.
>
> Ken
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-18 13:44   ` David Karr
@ 2020-03-18 15:22     ` Andrey Repin
  2020-03-18 16:35       ` Ken Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Repin @ 2020-03-18 15:22 UTC (permalink / raw)
  To: David Karr, cygwin

Greetings, David Karr!

> Thanks, that worked.  For now, I guess I have to figure out how to set that
> property permanently, or until this pty bug is fixed.. I start Emacs from a
> shortcut, executing "emacs.xml".  I see the file appears to have some
> syntax for setting the environment, but I've never inspected that file
> before.

You set it in Windows.

$ setx CYGWIN "${CYGWIN:+$CYGWIN }disable_pcon"

then relog.

(Yes, this is for Cygwin terminal, although the tool is windows native. It's
just more elegant here.)

P.S.
No top posting in the list, please.
Raw email quoting in message body is also frowned upon. Don't feed the spambots, please.


-- 
With best regards,
Andrey Repin
Wednesday, March 18, 2020 18:14:51

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-18 15:22     ` Andrey Repin
@ 2020-03-18 16:35       ` Ken Brown
  2020-03-18 21:17         ` David Karr
  0 siblings, 1 reply; 8+ messages in thread
From: Ken Brown @ 2020-03-18 16:35 UTC (permalink / raw)
  To: cygwin

On 3/18/2020 11:22 AM, Andrey Repin wrote:
> Greetings, David Karr!
> 
>> Thanks, that worked.  For now, I guess I have to figure out how to set that
>> property permanently, or until this pty bug is fixed.. I start Emacs from a
>> shortcut, executing "emacs.xml".  I see the file appears to have some
>> syntax for setting the environment, but I've never inspected that file
>> before.
> 
> You set it in Windows.

Not necessarily.  He might just want to set it for emacs.  Editing emacs.xml is 
a fine way to do it.

Ken

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-18 16:35       ` Ken Brown
@ 2020-03-18 21:17         ` David Karr
  2020-03-19 19:50           ` David Karr
  0 siblings, 1 reply; 8+ messages in thread
From: David Karr @ 2020-03-18 21:17 UTC (permalink / raw)
  To: Ken Brown; +Cc: The Cygwin Mailing List

On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:

> On 3/18/2020 11:22 AM, Andrey Repin wrote:
> > Greetings, David Karr!
> >
> >> Thanks, that worked.  For now, I guess I have to figure out how to set
> that
> >> property permanently, or until this pty bug is fixed.. I start Emacs
> from a
> >> shortcut, executing "emacs.xml".  I see the file appears to have some
> >> syntax for setting the environment, but I've never inspected that file
> >> before.
> >
> > You set it in Windows.
>
> Not necessarily.  He might just want to set it for emacs.  Editing
> emacs.xml is
> a fine way to do it.
>

I have no idea whether I would want to do it only for Emacs, as I don't
know what the issue is.

However, if I wanted to, could you point me to the documentation for
changing that file?  The README doesn't say anything about this.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-18 21:17         ` David Karr
@ 2020-03-19 19:50           ` David Karr
  2020-03-19 19:59             ` William M. (Mike) Miller
  0 siblings, 1 reply; 8+ messages in thread
From: David Karr @ 2020-03-19 19:50 UTC (permalink / raw)
  To: Ken Brown; +Cc: The Cygwin Mailing List

On Wed, Mar 18, 2020 at 2:17 PM David Karr <> wrote:

> On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:
>
>> On 3/18/2020 11:22 AM, Andrey Repin wrote:
>> > Greetings, David Karr!
>> >
>> >> Thanks, that worked.  For now, I guess I have to figure out how to set
>> that
>> >> property permanently, or until this pty bug is fixed.. I start Emacs
>> from a
>> >> shortcut, executing "emacs.xml".  I see the file appears to have some
>> >> syntax for setting the environment, but I've never inspected that file
>> >> before.
>> >
>> > You set it in Windows.
>>
>> Not necessarily.  He might just want to set it for emacs.  Editing
>> emacs.xml is
>> a fine way to do it.
>>
>
> I have no idea whether I would want to do it only for Emacs, as I don't
> know what the issue is.
>
> However, if I wanted to, could you point me to the documentation for
> changing that file?  The README doesn't say anything about this.
>
>
Just so it's clear, Ken Brown directly sent me some information of what he
knew about the emacs.xml documentation, but it didn't appear to work.

I've verified that setting the CYGWIN variable globally to "disable_pcon"
has resolved the problem.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: After cygwin upgrade, Emacs shell buffers with colors are corrupted
  2020-03-19 19:50           ` David Karr
@ 2020-03-19 19:59             ` William M. (Mike) Miller
  0 siblings, 0 replies; 8+ messages in thread
From: William M. (Mike) Miller @ 2020-03-19 19:59 UTC (permalink / raw)
  To: David Karr; +Cc: Ken Brown, The Cygwin Mailing List

On Thu, Mar 19, 2020 at 3:51 PM David Karr via Cygwin <cygwin@cygwin.com>
wrote:

> On Wed, Mar 18, 2020 at 2:17 PM David Karr <> wrote:
>
> > On Wed, Mar 18, 2020 at 9:38 AM Ken Brown via Cygwin <> wrote:
> >
> >> On 3/18/2020 11:22 AM, Andrey Repin wrote:
> >> > Greetings, David Karr!
> >> >
> >> >> Thanks, that worked.  For now, I guess I have to figure out how to
> set
> >> that
> >> >> property permanently, or until this pty bug is fixed.. I start Emacs
> >> from a
> >> >> shortcut, executing "emacs.xml".  I see the file appears to have some
> >> >> syntax for setting the environment, but I've never inspected that
> file
> >> >> before.
> >> >
> >> > You set it in Windows.
> >>
> >> Not necessarily.  He might just want to set it for emacs.  Editing
> >> emacs.xml is
> >> a fine way to do it.
> >>
> >
> > I have no idea whether I would want to do it only for Emacs, as I don't
> > know what the issue is.
> >
> > However, if I wanted to, could you point me to the documentation for
> > changing that file?  The README doesn't say anything about this.
> >
> >
> Just so it's clear, Ken Brown directly sent me some information of what he
> knew about the emacs.xml documentation, but it didn't appear to work.
>
> I've verified that setting the CYGWIN variable globally to "disable_pcon"
> has resolved the problem.
>

This is what I did as well to address the problem of M-x gdb not working in
emacs in a new Cygwin installation. I don't know what I might be losing in
other functionality by setting the CYGWIN environment variable globally to
"disable_pcon", but it did address my gdb issue effectively.

-- 
William M. (Mike) Miller | Edison Design Group
william.m.miller@gmail.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-19 20:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 23:14 After cygwin upgrade, Emacs shell buffers with colors are corrupted David Karr
2020-03-18  1:03 ` Ken Brown
2020-03-18 13:44   ` David Karr
2020-03-18 15:22     ` Andrey Repin
2020-03-18 16:35       ` Ken Brown
2020-03-18 21:17         ` David Karr
2020-03-19 19:50           ` David Karr
2020-03-19 19:59             ` William M. (Mike) Miller

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).