unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5198: 23.1; find-file tramp ipv6 not a wildcard
@ 2009-12-13  0:01 ` Kevin Ryde
       [not found]   ` <87d42drb0u.fsf@gmx.de>
  2010-01-13  0:51   ` bug#5255: marked as done (23.1.90; Wrong prompt in term) Emacs bug Tracking System
  0 siblings, 2 replies; 10+ messages in thread
From: Kevin Ryde @ 2009-12-13  0:01 UTC (permalink / raw)
  To: bug-gnu-emacs

find-file thinks a tramp ipv6 filename like /[::1]:/etc/passwd has a
wildcard and dispatches it to file-expand-wildcards.  Eg.

    M-: (debug-on-entry 'file-expand-wildcards)
    C-x C-f
    /[::1]:/etc/passwd

gives

    file-expand-wildcards("/scp:[::1]:/etc/passwd" t)

I believe it shouldn't do this, ie. should not look at the remote
identifier part when considering wildness.

I struck this nosing around some options and defadvice tramp has for
xemacs remote filename forms, but the ipv6 raw address form tickles it
too.  Tramp thread "defadvice file-expand-wildcards ad-do-it value" at
http://comments.gmane.org/gmane.emacs.tramp/6980


Not sure how bad this is.  It may depend how good file-expand-wildcards
is on remote filenames.  I seem to sometimes get max-specl-depth
exceeded by its recursion, but I don't have a good reproducing for that
yet, and in any case that would be a separate bug.



In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
 of 2009-09-14 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t






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

* bug#5198: 23.1; find-file tramp ipv6 not a wildcard
       [not found]     ` <87my1h5onf.fsf@blah.blah>
@ 2009-12-20 10:40       ` Michael Albinus
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2009-12-20 10:40 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 5198

Kevin Ryde <user42@zip.com.au> writes:

> Michael Albinus <michael.albinus@gmx.de> writes:
>>
>> I've added a check in `file-expand-wildcards' to handle this case.
>
> Would find-file-noselect look at
>
>     (file-remote-p filename 'localname)
>
> like file-expand-wildcards now too?

No necessarily. It calls itself recursively with the result of
file-expand-wildcards.

> And/or would there be merit in a function that checked if there's
> wildcards in a filename (ie. anything file-expand-wildcards could
> expand), rather than a string-match?  It might help if new wildness was
> added one day, like bash style {xx,yy,zz} alternations or something.

Maybe. OTOH, one could introduce it, when the need arises.

Best regards, Michael.






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

* bug#5255: marked as done (23.1.90; Wrong prompt in term)
  2009-12-21  2:44 ` bug#5255: 23.1.90; Wrong prompt in term Fabian Ezequiel Gallina
@ 2009-12-28 19:29   ` Emacs bug Tracking System
  0 siblings, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2009-12-28 19:29 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-bug-tracker

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

Your message dated Mon, 28 Dec 2009 11:28:21 -0800 (PST)
with message-id <200912281928.nBSJSLSU012776@godzilla.ics.uci.edu>
and subject line Re: bug#5255: 23.1.90; Wrong prompt in term
has caused the Emacs bug report #5255,
regarding 23.1.90; Wrong prompt in term
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
5255: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5255
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 6471 bytes --]

From: Fabian Ezequiel Gallina <galli.87@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.90; Wrong prompt in term
Date: Sun, 20 Dec 2009 23:44:21 -0300
Message-ID: <9de1a5ef0912201844r45f00f26s82560a57251524d0@mail.gmail.com>

In emacs 23.1 when I use M-x term the prompt is rendered correctly to
whatever is defined on the PS1 environment variable. But in 23.1.90.1 it
prompts whatever is defined in the PS1 but also before that, it prompts
0;<user>@<host>:<location>.

The steps to reproduce it are quite simple:

emacs -Q
M-x term

The prompt is rendered like this:

0;fgallina@cuca:~/Builds/emacs[fgallina@cuca emacs]$

Since my PS1 is set to

PS1='[\u@\h \W]\$ '

the expected result is:

[fgallina@cuca emacs]$

In GNU Emacs 23.1.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.5)
 of 2009-12-20 on cuca
Windowing system distributor `The X.Org Foundation', version 11.0.10703901
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: es_AR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> M-x t e r m <return>
<return> l s <return> M-c <backspace> M-x <backspace>
C-c b <return> M-x r e m p o <backspace> <backspace>
<backspace> p o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view term
disp-table ehelp electric ring tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)



[-- Attachment #3: Type: message/rfc822, Size: 3866 bytes --]

From: Dan Nicolaescu <dann@ics.uci.edu>
To: Fabian Ezequiel Gallina <galli.87@gmail.com>
Cc: 5255-done@debbugs.gnu.org
Subject: Re: bug#5255: 23.1.90; Wrong prompt in term
Date: Mon, 28 Dec 2009 11:28:21 -0800 (PST)
Message-ID: <200912281928.nBSJSLSU012776@godzilla.ics.uci.edu>

Fabian Ezequiel Gallina <galli.87@gmail.com> writes:

  > 2009/12/22 Dan Nicolaescu <dann@ics.uci.edu>:
  > >
  > > This is an xterm specific escape sequence, most likely due to a bad
  > > setup, you'll get the same problem if you use a vt100 terminal for
  > > example.
  > > So this is not a term.el problem.
  > >
  > 
  > Thanks for the explanation, I just added this to my .bashrc and
  > everything started to work fine again:

I am closing this bug, it's not a bug in term.el

  > if [[ $TERM =~ ^xterm ]];
  > then
  > 	TERM=xterm-256color

Changing the value of TERM is a bad idea, unless you know exactly what
you are doing.

  > 	PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'

Using PROMPT_COMMAND is not a good idea, the same thing can be done with
just setting the prompt.


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

* bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session
@ 2010-01-07 19:07 ` Scott Bell
  2010-01-07 21:37   ` Dan Nicolaescu
  2010-01-13  0:51   ` bug#5334: marked as done (23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session) Emacs bug Tracking System
  0 siblings, 2 replies; 10+ messages in thread
From: Scott Bell @ 2010-01-07 19:07 UTC (permalink / raw)
  To: emacs-pretest-bug

Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
prints the following prompt during an interactive SSH
session ('ssh host'):

0;user@host:~(host:~)$ 

when PS1 is set to '(\h:\W)\$ ' on the remote host. 

The string '0;user@host:~' is not displayed when using
another terminal emulator.	






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

* bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session
  2010-01-07 19:07 ` bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session Scott Bell
@ 2010-01-07 21:37   ` Dan Nicolaescu
  2010-01-08 17:03     ` Scott Bell
  2010-01-13  0:51   ` bug#5334: marked as done (23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session) Emacs bug Tracking System
  1 sibling, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2010-01-07 21:37 UTC (permalink / raw)
  To: Scott Bell; +Cc: 5334

Scott Bell <sctb@me.com> writes:

  > Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
  > NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
  > prints the following prompt during an interactive SSH
  > session ('ssh host'):
  > 
  > 0;user@host:~(host:~)$ 
  > 
  > when PS1 is set to '(\h:\W)\$ ' on the remote host. 
  > 
  > The string '0;user@host:~' is not displayed when using
  > another terminal emulator.	

You probably set  PROMPT_COMMAND to something that term.el does not
understand.






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

* bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session
  2010-01-07 21:37   ` Dan Nicolaescu
@ 2010-01-08 17:03     ` Scott Bell
  2010-01-08 19:13       ` Dan Nicolaescu
  0 siblings, 1 reply; 10+ messages in thread
From: Scott Bell @ 2010-01-08 17:03 UTC (permalink / raw)
  To: 5334

On 2010-01-07, at 2:37 PM, Dan Nicolaescu wrote:

> Scott Bell <sctb@me.com> writes:
> 
>> Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
>> NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
>> prints the following prompt during an interactive SSH
>> session ('ssh host'):
>> 
>> 0;user@host:~(host:~)$ 
>> 
>> when PS1 is set to '(\h:\W)\$ ' on the remote host. 
>> 
>> The string '0;user@host:~' is not displayed when using
>> another terminal emulator.	
> 
> You probably set  PROMPT_COMMAND to something that term.el does not
> understand.

That's correct. It looks like PROMPT_COMMAND on the 
remote machine is trying to set the title string.

Should term.el support this escape sequence? If not,
should it recognize it but take no action (and also
not print undesired output)? This seems like a fairly
common feature, but I could be wrong.






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

* bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session
  2010-01-08 17:03     ` Scott Bell
@ 2010-01-08 19:13       ` Dan Nicolaescu
  2010-01-08 19:25         ` Scott Bell
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2010-01-08 19:13 UTC (permalink / raw)
  To: Scott Bell; +Cc: 5334

Scott Bell <sctb@me.com> writes:

  > On 2010-01-07, at 2:37 PM, Dan Nicolaescu wrote:
  > 
  > > Scott Bell <sctb@me.com> writes:
  > > 
  > >> Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
  > >> NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
  > >> prints the following prompt during an interactive SSH
  > >> session ('ssh host'):
  > >> 
  > >> 0;user@host:~(host:~)$ 
  > >> 
  > >> when PS1 is set to '(\h:\W)\$ ' on the remote host. 
  > >> 
  > >> The string '0;user@host:~' is not displayed when using
  > >> another terminal emulator.	
  > > 
  > > You probably set  PROMPT_COMMAND to something that term.el does not
  > > understand.
  > 
  > That's correct. It looks like PROMPT_COMMAND on the 
  > remote machine is trying to set the title string.

Does the PROMPT_COMMAND setting come from your .bashrc?
If yes, then:
1. never use it it's overkill, set PS1 to do the same thing instead.
2. when setting it, you need to set it conditionally, only when TERM==xterm

  > Should term.el support this escape sequence? If not,
  > should it recognize it but take no action (and also
  > not print undesired output)? This seems like a fairly
  > common feature, but I could be wrong.

That sequence should only be used for xterm.
It's been reported that this used to work in term.el in emacs-23.1, no
idea why it does not work now. I don't have any plans to figure out why
it does not work anymore, or to do anything about it.






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

* bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session
  2010-01-08 19:13       ` Dan Nicolaescu
@ 2010-01-08 19:25         ` Scott Bell
  0 siblings, 0 replies; 10+ messages in thread
From: Scott Bell @ 2010-01-08 19:25 UTC (permalink / raw)
  To: 5334

On 2010-01-08, at 12:13 PM, Dan Nicolaescu wrote:

> Scott Bell <sctb@me.com> writes:
> 
>> On 2010-01-07, at 2:37 PM, Dan Nicolaescu wrote:
>> 
>>> Scott Bell <sctb@me.com> writes:
>>> 
>>>> Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
>>>> NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
>>>> prints the following prompt during an interactive SSH
>>>> session ('ssh host'):
>>>> 
>>>> 0;user@host:~(host:~)$ 
>>>> 
>>>> when PS1 is set to '(\h:\W)\$ ' on the remote host. 
>>>> 
>>>> The string '0;user@host:~' is not displayed when using
>>>> another terminal emulator.	
>>> 
>>> You probably set  PROMPT_COMMAND to something that term.el does not
>>> understand.
>> 
>> That's correct. It looks like PROMPT_COMMAND on the 
>> remote machine is trying to set the title string.
> 
> Does the PROMPT_COMMAND setting come from your .bashrc?
> If yes, then:
> 1. never use it it's overkill, set PS1 to do the same thing instead.
> 2. when setting it, you need to set it conditionally, only when TERM==xterm

It comes from the system bash initialization, I've now 
added PROMPT_COMMAND='' in my .bashrc on the remote 
machine.

>> Should term.el support this escape sequence? If not,
>> should it recognize it but take no action (and also
>> not print undesired output)? This seems like a fairly
>> common feature, but I could be wrong.
> 
> That sequence should only be used for xterm.
> It's been reported that this used to work in term.el in emacs-23.1, no
> idea why it does not work now. I don't have any plans to figure out why
> it does not work anymore, or to do anything about it.

That's certainly fine by me.







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

* bug#5334: marked as done (23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session)
  2010-01-07 19:07 ` bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session Scott Bell
  2010-01-07 21:37   ` Dan Nicolaescu
@ 2010-01-13  0:51   ` Emacs bug Tracking System
  1 sibling, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2010-01-13  0:51 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-bug-tracker

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

Your message dated Tue, 12 Jan 2010 19:50:02 -0500
with message-id <9utyuqomkl.fsf@fencepost.gnu.org>
and subject line Re: Bug#5255
has caused the Emacs bug report #5255,
regarding 23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
5255: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5255
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 3517 bytes --]

From: Scott Bell <sctb@me.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session
Date: Thu, 07 Jan 2010 12:07:57 -0700
Message-ID: <1D8FD52B-3B56-49A2-9818-75E7BAC8832D@me.com>

Under GNU Emacs 23.1.91.1 (x86_64-apple-darwin10.2.0, 
NS apple-appkit-1038.25), Mac OS X 10.6.2, Term mode
prints the following prompt during an interactive SSH
session ('ssh host'):

0;user@host:~(host:~)$ 

when PS1 is set to '(\h:\W)\$ ' on the remote host. 

The string '0;user@host:~' is not displayed when using
another terminal emulator.	



[-- Attachment #3: Type: message/rfc822, Size: 3441 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 5255-done@debbugs.gnu.org
Subject: Re: Bug#5255
Date: Tue, 12 Jan 2010 19:50:02 -0500
Message-ID: <9utyuqomkl.fsf@fencepost.gnu.org>


This bug was closed recently, but unfortunately the close message was
lost from the Emacs bug database. I am therefore resending the close
message. Sorry for the duplicate mail. The original close message was

http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-12/msg00689.html

    From: Dan Nicolaescu <dann@ics.uci.edu>
    Subject: Re: bug#5255: 23.1.90; Wrong prompt in term
    To: Fabian Ezequiel Gallina <galli.87@gmail.com>
    Cc: 5255-done@debbugs.gnu.org
    Date: Mon, 28 Dec 2009 11:28:21 -0800 (PST)
    
    Fabian Ezequiel Gallina <galli.87@gmail.com> writes:
    
      > 2009/12/22 Dan Nicolaescu <dann@ics.uci.edu>:
      > >
      > > This is an xterm specific escape sequence, most likely due to a bad
      > > setup, you'll get the same problem if you use a vt100 terminal for
      > > example.
      > > So this is not a term.el problem.
      > >
      > 
      > Thanks for the explanation, I just added this to my .bashrc and
      > everything started to work fine again:
    
    I am closing this bug, it's not a bug in term.el
    
      > if [[ $TERM =~ ^xterm ]];
      > then
      > 	TERM=xterm-256color
    
    Changing the value of TERM is a bad idea, unless you know exactly what
    you are doing.
    
      > 	PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    
    Using PROMPT_COMMAND is not a good idea, the same thing can be done with
    just setting the prompt.
    ----------
    


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

* bug#5255: marked as done (23.1.90; Wrong prompt in term)
  2009-12-13  0:01 ` bug#5198: 23.1; find-file tramp ipv6 not a wildcard Kevin Ryde
       [not found]   ` <87d42drb0u.fsf@gmx.de>
@ 2010-01-13  0:51   ` Emacs bug Tracking System
  1 sibling, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2010-01-13  0:51 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-bug-tracker

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

Your message dated Tue, 12 Jan 2010 19:50:02 -0500
with message-id <9utyuqomkl.fsf@fencepost.gnu.org>
and subject line Re: Bug#5255
has caused the Emacs bug report #5255,
regarding 23.1.90; Wrong prompt in term
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
5255: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5255
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 8333 bytes --]

From: Fabian Ezequiel Gallina <galli.87@gmail.com>
To: emacs-pretest-bug@gnu.org
Cc: 
Subject: bug#5255: 23.1.90; Wrong prompt in term
Date: Sun, 20 Dec 2009 23:44:21 -0300
Message-ID: <9de1a5ef0912201844r45f00f26s82560a57251524d0@mail.gmail.com>

In emacs 23.1 when I use M-x term the prompt is rendered correctly to
whatever is defined on the PS1 environment variable. But in 23.1.90.1 it
prompts whatever is defined in the PS1 but also before that, it prompts
0;<user>@<host>:<location>.

The steps to reproduce it are quite simple:

emacs -Q
M-x term

The prompt is rendered like this:

0;fgallina@cuca:~/Builds/emacs[fgallina@cuca emacs]$

Since my PS1 is set to

PS1='[\u@\h \W]\$ '

the expected result is:

[fgallina@cuca emacs]$

In GNU Emacs 23.1.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.5)
 of 2009-12-20 on cuca
Windowing system distributor `The X.Org Foundation', version 11.0.10703901
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: es_AR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> M-x t e r m <return>
<return> l s <return> M-c <backspace> M-x <backspace>
C-c b <return> M-x r e m p o <backspace> <backspace>
<backspace> p o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view term
disp-table ehelp electric ring tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)


[-- Attachment #3: Type: message/rfc822, Size: 3441 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 5255-done@debbugs.gnu.org
Subject: Re: Bug#5255
Date: Tue, 12 Jan 2010 19:50:02 -0500
Message-ID: <9utyuqomkl.fsf@fencepost.gnu.org>


This bug was closed recently, but unfortunately the close message was
lost from the Emacs bug database. I am therefore resending the close
message. Sorry for the duplicate mail. The original close message was

http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-12/msg00689.html

    From: Dan Nicolaescu <dann@ics.uci.edu>
    Subject: Re: bug#5255: 23.1.90; Wrong prompt in term
    To: Fabian Ezequiel Gallina <galli.87@gmail.com>
    Cc: 5255-done@debbugs.gnu.org
    Date: Mon, 28 Dec 2009 11:28:21 -0800 (PST)
    
    Fabian Ezequiel Gallina <galli.87@gmail.com> writes:
    
      > 2009/12/22 Dan Nicolaescu <dann@ics.uci.edu>:
      > >
      > > This is an xterm specific escape sequence, most likely due to a bad
      > > setup, you'll get the same problem if you use a vt100 terminal for
      > > example.
      > > So this is not a term.el problem.
      > >
      > 
      > Thanks for the explanation, I just added this to my .bashrc and
      > everything started to work fine again:
    
    I am closing this bug, it's not a bug in term.el
    
      > if [[ $TERM =~ ^xterm ]];
      > then
      > 	TERM=xterm-256color
    
    Changing the value of TERM is a bad idea, unless you know exactly what
    you are doing.
    
      > 	PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    
    Using PROMPT_COMMAND is not a good idea, the same thing can be done with
    just setting the prompt.
    ----------
    


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

end of thread, other threads:[~2010-01-13  0:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <9utyuqomkl.fsf@fencepost.gnu.org>
2009-12-13  0:01 ` bug#5198: 23.1; find-file tramp ipv6 not a wildcard Kevin Ryde
     [not found]   ` <87d42drb0u.fsf@gmx.de>
     [not found]     ` <87my1h5onf.fsf@blah.blah>
2009-12-20 10:40       ` Michael Albinus
2010-01-13  0:51   ` bug#5255: marked as done (23.1.90; Wrong prompt in term) Emacs bug Tracking System
2010-01-07 19:07 ` bug#5334: 23.1.91; Term mode prints "0; user@host:~" before each prompt of an interactive SSH session Scott Bell
2010-01-07 21:37   ` Dan Nicolaescu
2010-01-08 17:03     ` Scott Bell
2010-01-08 19:13       ` Dan Nicolaescu
2010-01-08 19:25         ` Scott Bell
2010-01-13  0:51   ` bug#5334: marked as done (23.1.91; Term mode prints "0;user@host:~" before each prompt of an interactive SSH session) Emacs bug Tracking System
     [not found] <200912281928.nBSJSLSU012776@godzilla.ics.uci.edu>
2009-12-21  2:44 ` bug#5255: 23.1.90; Wrong prompt in term Fabian Ezequiel Gallina
2009-12-28 19:29   ` bug#5255: marked as done (23.1.90; Wrong prompt in term) Emacs bug Tracking System

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