public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Issue with mintty: title not updated when background process exists
@ 2020-04-01 11:07 Luc Henninger
  2020-04-01 12:20 ` Thomas Wolff
  0 siblings, 1 reply; 6+ messages in thread
From: Luc Henninger @ 2020-04-01 11:07 UTC (permalink / raw)
  To: cygwin

Hello,

I have defined the PS1 variable as follow
PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
so that the cur dir is set as title of the window.

This generally work for both mintty or cmd.
But after the sequence
   Luc@Mulan ~
   $ emacs &
   [1] 371
   Luc@Mulan ~
   $ cd bin
   Luc@Mulan ~/bin
   $
the title of the mintty widow remain to "~".

The same sequence with cmd window change the title to "~/bin"

The title is correctly updated only after I close emacs and push a 
return to the main window.

Any explanation? Thanks
Regards

-- 
Luc.Henninger@orange.fr    +33 6 32 96 32 27


-- 
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: Issue with mintty: title not updated when background process exists
  2020-04-01 11:07 Issue with mintty: title not updated when background process exists Luc Henninger
@ 2020-04-01 12:20 ` Thomas Wolff
  2020-04-01 12:24   ` Thomas Wolff
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Wolff @ 2020-04-01 12:20 UTC (permalink / raw)
  To: cygwin

Am 01.04.2020 um 13:07 schrieb Luc Henninger:
> Hello,
>
> I have defined the PS1 variable as follow
> PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
> so that the cur dir is set as title of the window.
>
> This generally work for both mintty or cmd.
> But after the sequence
>   Luc@Mulan ~
>   $ emacs &
>   [1] 371
>   Luc@Mulan ~
>   $ cd bin
>   Luc@Mulan ~/bin
>   $
> the title of the mintty widow remain to "~".
>
> The same sequence with cmd window change the title to "~/bin"
>
> The title is correctly updated only after I close emacs and push a 
> return to the main window.
>
> Any explanation? Thanks
Noted first, this is in any case not a mintty issue as mintty updates 
the title whenever it receives the respective escape sequence. The 
scenario sounds weird, however. Is the background process continuously 
sending title escape sequences? But 'emacs &' looks like you're starting 
a GUI instance of emacs, right? So why should it?
Thomas

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

* Re: Issue with mintty: title not updated when background process exists
  2020-04-01 12:20 ` Thomas Wolff
@ 2020-04-01 12:24   ` Thomas Wolff
  2020-04-01 19:44     ` Luc Henninger
  2020-04-01 20:21     ` Luc Henninger
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Wolff @ 2020-04-01 12:24 UTC (permalink / raw)
  To: cygwin

Am 01.04.2020 um 14:20 schrieb Thomas Wolff:
> Am 01.04.2020 um 13:07 schrieb Luc Henninger:
>> Hello,
>>
>> I have defined the PS1 variable as follow
>> PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
>> so that the cur dir is set as title of the window.
>>
>> This generally work for both mintty or cmd.
>> But after the sequence
>>   Luc@Mulan ~
>>   $ emacs &
>>   [1] 371
>>   Luc@Mulan ~
>>   $ cd bin
>>   Luc@Mulan ~/bin
>>   $
>> the title of the mintty widow remain to "~".
>>
>> The same sequence with cmd window change the title to "~/bin"
>>
>> The title is correctly updated only after I close emacs and push a 
>> return to the main window.
>>
>> Any explanation? Thanks
> Noted first, this is in any case not a mintty issue as mintty updates 
> the title whenever it receives the respective escape sequence. The 
> scenario sounds weird, however. Is the background process continuously 
> sending title escape sequences? But 'emacs &' looks like you're 
> starting a GUI instance of emacs, right? So why should it?
Try to isolate the background instance from the terminal:
emacs > /dev/null 2>&1 &

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

* Re: Re: Issue with mintty: title not updated when background process exists
  2020-04-01 12:24   ` Thomas Wolff
@ 2020-04-01 19:44     ` Luc Henninger
  2020-04-01 20:21     ` Luc Henninger
  1 sibling, 0 replies; 6+ messages in thread
From: Luc Henninger @ 2020-04-01 19:44 UTC (permalink / raw)
  To: cygwin

Le 01/04/2020 à 14:24, Thomas Wolff a écrit :
> Am 01.04.2020 um 14:20 schrieb Thomas Wolff:
>> Am 01.04.2020 um 13:07 schrieb Luc Henninger:
>>> Hello,
>>>
>>> I have defined the PS1 variable as follow
>>> PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
>>> so that the cur dir is set as title of the window.
>>>
>>> This generally work for both mintty or cmd.
>>> But after the sequence
>>>   Luc@Mulan ~
>>>   $ emacs &
>>>   [1] 371
>>>   Luc@Mulan ~
>>>   $ cd bin
>>>   Luc@Mulan ~/bin
>>>   $
>>> the title of the mintty widow remain to "~".
>>>
>>> The same sequence with cmd window change the title to "~/bin"
>>>
>>> The title is correctly updated only after I close emacs and push a 
>>> return to the main window.
>>>
>>> Any explanation? Thanks
>> Noted first, this is in any case not a mintty issue as mintty updates 
>> the title whenever it receives the respective escape sequence. The 
>> scenario sounds weird, however. Is the background process 
>> continuously sending title escape sequences? But 'emacs &' looks like 
>> you're starting a GUI instance of emacs, right? So why should it?
> Try to isolate the background instance from the terminal:
> emacs > /dev/null 2>&1 &
>
Yes, Thomas, I use emacs for MS Window. Thanks, this solves the issue. 
This is so an issue for emacs for windows.

-- 
Luc.Henninger@orange.fr    +33 6 32 96 32 27


-- 
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: Re: Issue with mintty: title not updated when background process exists
  2020-04-01 12:24   ` Thomas Wolff
  2020-04-01 19:44     ` Luc Henninger
@ 2020-04-01 20:21     ` Luc Henninger
  2020-04-01 21:54       ` Thomas Wolff
  1 sibling, 1 reply; 6+ messages in thread
From: Luc Henninger @ 2020-04-01 20:21 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

Le 01/04/2020 à 14:24, Thomas Wolff a écrit :
> Am 01.04.2020 um 14:20 schrieb Thomas Wolff:
>> Am 01.04.2020 um 13:07 schrieb Luc Henninger:
>>> Hello,
>>>
>>> I have defined the PS1 variable as follow
>>> PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
>>> so that the cur dir is set as title of the window.
>>>
>>> This generally work for both mintty or cmd.
>>> But after the sequence
>>>   Luc@Mulan ~
>>>   $ emacs &
>>>   [1] 371
>>>   Luc@Mulan ~
>>>   $ cd bin
>>>   Luc@Mulan ~/bin
>>>   $
>>> the title of the mintty widow remain to "~".
>>>
>>> The same sequence with cmd window change the title to "~/bin"
>>>
>>> The title is correctly updated only after I close emacs and push a 
>>> return to the main window.
>>>
>>> Any explanation? Thanks
>> Noted first, this is in any case not a mintty issue as mintty updates 
>> the title whenever it receives the respective escape sequence. The 
>> scenario sounds weird, however. Is the background process 
>> continuously sending title escape sequences? But 'emacs &' looks like 
>> you're starting a GUI instance of emacs, right? So why should it?
> Try to isolate the background instance from the terminal:
> emacs > /dev/null 2>&1 &
>
Even if your proposal solve the issue, I have a question of what's 
append in the two different cases.

I use the same sequence (1/ cd ztry 2/ launch emacs ("emacs &" or "emacs 
 > /dev/null 2>&1 &" 3/ cd .. 4/ exit emacs 5/ newline 6/ ^D) with 
mintty configure for logs.

The log for the first case (mintty1459.log) is strongly longer that the 
second one (mintty1470.log). It look like the wall window content is 
rewritten each time a line is added.

I would appreciate if someone can give me some explanation. It look like 
that I have the same kind of behavior with other program (i.e. scala 
repl or sbt)

Thanks

-- 
Luc.Henninger@orange.fr    +33 6 32 96 32 27



-- 
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[-- Attachment #2: mintty1459.log --]
[-- Type: application/octet-stream, Size: 1467 bytes --]

[-- Attachment #3: mintty1470.log --]
[-- Type: application/octet-stream, Size: 371 bytes --]

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

* Re: Issue with mintty: title not updated when background process exists
  2020-04-01 20:21     ` Luc Henninger
@ 2020-04-01 21:54       ` Thomas Wolff
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Wolff @ 2020-04-01 21:54 UTC (permalink / raw)
  To: cygwin, Takashi Yano

Am 01.04.2020 um 22:21 schrieb Luc Henninger:
> Le 01/04/2020 à 14:24, Thomas Wolff a écrit :
>> Am 01.04.2020 um 14:20 schrieb Thomas Wolff:
>>> Am 01.04.2020 um 13:07 schrieb Luc Henninger:
>>>> Hello,
>>>>
>>>> I have defined the PS1 variable as follow
>>>> PS1='\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[35m\]\w\[\e[0m\]\n\$ '
>>>> so that the cur dir is set as title of the window.
>>>>
>>>> This generally work for both mintty or cmd.
>>>> But after the sequence
>>>>   Luc@Mulan ~
>>>>   $ emacs &
>>>>   [1] 371
>>>>   Luc@Mulan ~
>>>>   $ cd bin
>>>>   Luc@Mulan ~/bin
>>>>   $
>>>> the title of the mintty widow remain to "~".
>>>>
>>>> The same sequence with cmd window change the title to "~/bin"
>>>>
>>>> The title is correctly updated only after I close emacs and push a 
>>>> return to the main window.
>>>>
>>>> Any explanation? Thanks
>>> Noted first, this is in any case not a mintty issue as mintty 
>>> updates the title whenever it receives the respective escape 
>>> sequence. The scenario sounds weird, however. Is the background 
>>> process continuously sending title escape sequences? But 'emacs &' 
>>> looks like you're starting a GUI instance of emacs, right? So why 
>>> should it?
>> Try to isolate the background instance from the terminal:
>> emacs > /dev/null 2>&1 &
>>
> Even if your proposal solve the issue, I have a question of what's 
> append in the two different cases.
>
> I use the same sequence (1/ cd ztry 2/ launch emacs ("emacs &" or 
> "emacs > /dev/null 2>&1 &" 3/ cd .. 4/ exit emacs 5/ newline 6/ ^D) 
> with mintty configure for logs.
>
> The log for the first case (mintty1459.log) is strongly longer that 
> the second one (mintty1470.log). It look like the wall window content 
> is rewritten each time a line is added.
>
> I would appreciate if someone can give me some explanation. It look 
> like that I have the same kind of behavior with other program (i.e. 
> scala repl or sbt)
It seems to be the magic of the ConPTY handling (either on cygwin side 
or on Windows side) to replay the title escape sequence after the 
program has been sent to the background. Your log does not yet reveal 
the whole story, though:
Is it repeatedly only initially (as seen two lines below "emacs &") or 
more often as might be assumed by your symptom description?

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

end of thread, other threads:[~2020-04-01 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 11:07 Issue with mintty: title not updated when background process exists Luc Henninger
2020-04-01 12:20 ` Thomas Wolff
2020-04-01 12:24   ` Thomas Wolff
2020-04-01 19:44     ` Luc Henninger
2020-04-01 20:21     ` Luc Henninger
2020-04-01 21:54       ` Thomas Wolff

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