unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Console-window Emacs stops responding when pasting clipboard
@ 2004-02-25 18:30 Davor Cubranic
  2004-02-26  5:56 ` Eli Zaretskii
  2004-02-27  0:54 ` Juri Linkov
  0 siblings, 2 replies; 7+ messages in thread
From: Davor Cubranic @ 2004-02-25 18:30 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-02-19 on porky.devel.redhat.com
configured using `configure  --host=i386-redhat-linux --build=i386-redhat-linux --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc --with-pop --with-sound'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  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_CA.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I run Emacs in a Putty terminal window (xterm emulation), and when I
paste the contents of certain web pages I copied from Mozilla, Emacs
stops responding. For an example, select the entire 11th paragraph in
the body of the article at
http://www.guardian.co.uk/elsewhere/journalist/story/0,7792,1152570,00.html
(starting with "It all ran a bit out of control"). Paste it into Emacs
(shift-insert in putty). Emacs stops responding until I press C-g. It
looks like the dashes ("...were coming to see me -- everyone knows
everyone in this town -- and saying...") are the cause of the problem,
because pasting any other text in the paragraph is fine. This happens
regardless of the buffer's mode. It also happens in other terminal
emulators (SecureCRT 3.1 in Linux console emulation, for example), but
not in Windows Emacs (21.1.1, i386-msvc-nt5.1.2600), where the dashes
appear as regular hyphens ("-") in the pasted text.

For comparison, when inserting the same text, vim will also replace the
dashes with "-", and XEmacs will simply stop pasting the text when it
hits them, but not freeze.


Recent input:
ESC x r e p o r t TAB RET

Recent messages:
Loading image...done
Loading mh-identity...done
Loading mh-e...done
Loading /grads2/cubranic/.emacs.d/mh-e (source)...done
Loading /grads2/cubranic/.emacs.d/auctex (source)...done
Loading /grads2/cubranic/.emacs.d/init.el (source)...done
Loading /grads2/cubranic/.emacs.d/custom.el (source)...done
For information about the GNU Project and its goals, type M-x describe-project.
Loading cl-extra...done
Loading emacsbug...done

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-02-25 18:30 Console-window Emacs stops responding when pasting clipboard Davor Cubranic
@ 2004-02-26  5:56 ` Eli Zaretskii
  2004-02-26  6:54   ` era
                     ` (2 more replies)
  2004-02-27  0:54 ` Juri Linkov
  1 sibling, 3 replies; 7+ messages in thread
From: Eli Zaretskii @ 2004-02-26  5:56 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> Date: Wed, 25 Feb 2004 10:30:58 -0800
> From: Davor Cubranic <cubranic@cs.ubc.ca>
> 
> I run Emacs in a Putty terminal window (xterm emulation), and when I
> paste the contents of certain web pages I copied from Mozilla, Emacs
> stops responding. For an example, select the entire 11th paragraph in
> the body of the article at
> http://www.guardian.co.uk/elsewhere/journalist/story/0,7792,1152570,00.html
> (starting with "It all ran a bit out of control"). Paste it into Emacs
> (shift-insert in putty). Emacs stops responding until I press C-g.

Thanks for the report, but I cannot reproduce this.  I don't have
Mozilla on the Windows box where I tried this, so I used Explorer to
display the Web page you mentioned and Emacs 21.2 running on a
GNU/Linux system to which I logged using PuTTY.  I had no problems
pasting the paragraph you mentioned into Emacs.

So I think more digging on your part is required.  For example, is
Mozilla necessary to reproduce this problem, or any other Windows
application will do?

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-02-26  5:56 ` Eli Zaretskii
@ 2004-02-26  6:54   ` era
  2004-02-26 18:03   ` Davor Cubranic
  2004-03-10 17:36   ` Davor Cubranic
  2 siblings, 0 replies; 7+ messages in thread
From: era @ 2004-02-26  6:54 UTC (permalink / raw)


On 26 Feb 2004 07:56:21 +0200, Eli Zaretskii <eliz@elta.co.il> posted to
bug-gnu-emacs:
 > Thanks for the report, but I cannot reproduce this.  I don't have
 > Mozilla on the Windows box where I tried this, so I used Explorer to
 > display the Web page you mentioned and Emacs 21.2 running on a
 > GNU/Linux system to which I logged using PuTTY.  I had no problems
 > pasting the paragraph you mentioned into Emacs.
 > So I think more digging on your part is required.  For example, is
 > Mozilla necessary to reproduce this problem, or any other Windows
 > application will do?

It could even depend on the Mozilla version. V1.6 on a Linux box does
not display anything where the dashes are (apparently) supposed to be,
and of course cutting and pasting that part doesn't include the
missing dashes. I can't even see them in "view source". But here is
the pertinent part of the HTML sources:

 $ lynx -dump -source 'http://www.guardian.co.uk/elsewhere/journalist/story/0%2c7792%2c1152570%2c00.html' |
 > fold -w 72 |
 > fgrep -C "everyone knows everyone" |
 > od -c -t x1
 0000000   n   g       E   s   t   o   n   i   a   n   s   .   <   P   >
         6e 67 20 45 73 74 6f 6e 69 61 6e 73 2e 3c 50 3e
 0000020   "   I   t       a   l   l       r   a   n       a       b   i
         22 49 74 20 61 6c 6c 20 72 61 6e 20 61 20 62 69
 0000040   t       o   u   t       o   f       c   o   n   t   r   o   l
         74 20 6f 75 74 20 6f 66 20 63 6f 6e 74 72 6f 6c
 0000060       a   f   t   e   r       a       w   h   i   l   e   .    
         20 61 66 74 65 72 20 61 20 77 68 69 6c 65 2e 20
 0000100   M   y       p   a   r   t   n  \n   e   r       w   a   s    
         4d 79 20 70 61 72 74 6e 0a 65 72 20 77 61 73 20
 0000120   o   u   t       i   n       t   h   e       c   a   s   i   n
         6f 75 74 20 69 6e 20 74 68 65 20 63 61 73 69 6e
 0000140   o   s       e   v   e   r   y       n   i   g   h   t   .    
         6f 73 20 65 76 65 72 79 20 6e 69 67 68 74 2e 20
 0000160   I   t       g   o   t       t   o       t   h   e       p   o
         49 74 20 67 6f 74 20 74 6f 20 74 68 65 20 70 6f
 0000200   i   n   t       w   h   e   r   e       t   h   e       m   a
         69 6e 74 20 77 68 65 72 65 20 74 68 65 20 6d 61
 0000220   n  \n   a   g   e   r   s       w   e   r   e       c   o   m
         6e 0a 61 67 65 72 73 20 77 65 72 65 20 63 6f 6d
 0000240   i   n   g       t   o       s   e   e       m   e       ­    
         69 6e 67 20 74 6f 20 73 65 65 20 6d 65 20 ad 20
 0000260   e   v   e   r   y   o   n   e       k   n   o   w   s       e
         65 76 65 72 79 6f 6e 65 20 6b 6e 6f 77 73 20 65
 0000300   v   e   r   y   o   n   e       i   n       t   h   i   s    
         76 65 72 79 6f 6e 65 20 69 6e 20 74 68 69 73 20
 0000320   t   o   w   n       ­       a   n   d  \n       s   a   y   i
         74 6f 77 6e 20 ad 20 61 6e 64 0a 20 73 61 79 69
 0000340   n   g       h   e       i   s       l   o   s   i   n   g    
         6e 67 20 68 65 20 69 73 20 6c 6f 73 69 6e 67 20
 0000360   t   o   o       m   u   c   h   .       $   1   0   ,   0   0
         74 6f 6f 20 6d 75 63 68 2e 20 24 31 30 2c 30 30
 0000400   0       a       n   i   g   h   t   .       N   o   w       h
         30 20 61 20 6e 69 67 68 74 2e 20 4e 6f 77 20 68
 0000420   e       i   s       d   r   i   v   i   n   g       a       c
         65 20 69 73 20 64 72 69 76 69 6e 67 20 61 20 63
 0000440   a   b      \n   i   n       E   d   i   n   b   u   r   g   h
         61 62 20 0a 69 6e 20 45 64 69 6e 62 75 72 67 68
 0000460   ,   "       s   a   y   s       G   u   n   n   .   <   P   >
         2c 22 20 73 61 79 73 20 47 75 6e 6e 2e 3c 50 3e
 0000500   A   f   t   e   r       N   i   m   e   t   a       B   a   a
         41 66 74 65 72 20 4e 69 6d 65 74 61 20 42 61 61
 0000520   r   ,       G   u   n   n       a   n   d       h   i   s    
         72 2c 20 47 75 6e 6e 20 61 6e 64 20 68 69 73 20
 0000540   p   a   r   t   n   e   r       s   e   t      \n
         70 61 72 74 6e 65 72 20 73 65 74 20 0a
 0000555

It looks to me like the (possibly) offending character would be an
0xAD, i.e. the ISO-8859-1 soft hyphen. (Sheesh, somebody is using that
in lieu of an em dash? Astonishing.)

Interestingly, in Mozilla's "view source" I see the spaces on both
sides of the (suppressed) hyphens, but copying and pasting from there
into an emacs -nw inside an xterm canonicalizes those to a single
space each.

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-02-26  5:56 ` Eli Zaretskii
  2004-02-26  6:54   ` era
@ 2004-02-26 18:03   ` Davor Cubranic
  2004-03-10 17:36   ` Davor Cubranic
  2 siblings, 0 replies; 7+ messages in thread
From: Davor Cubranic @ 2004-02-26 18:03 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Eli Zaretskii <eliz@elta.co.il> wrote:

   > I run Emacs in a Putty terminal window (xterm emulation), and when I
   > paste the contents of certain web pages I copied from Mozilla, Emacs
   > stops responding. [...]

   Thanks for the report, but I cannot reproduce this.  I don't have
   Mozilla on the Windows box where I tried this, so I used Explorer to
   display the Web page you mentioned and Emacs 21.2 running on a
   GNU/Linux system to which I logged using PuTTY.  I had no problems
   pasting the paragraph you mentioned into Emacs.
   
   So I think more digging on your part is required.  For example, is
   Mozilla necessary to reproduce this problem, or any other Windows
   application will do?
   
Strange, I was just able to reproduce the bug from Explorer as well. I
also noticed that if I let Emacs sit for say a minute, and then press
C-g, all of the sudden part of the text I tried to paste appears --
exactly up to, but not including, the first dash ("...to see me").

I then tried to figure out exactly which character it is that's causing
so much trouble and tried to paste from the command line into a file
(using 'cat'), but there the dash showed up just as '-' again. Finally,
I downloaded the page using wget and looked at the source in emacs's
hexl mode. The character in question is 0xAD. (I think another character
that may have been causing the same problem was 0xB9, some kind of
mutant apostrophe.) I can open this file in Emacs, and the mutant dash
shows up as "angstrom-A" followed by a "-". (Putting the point at place
in the file messes up my status line and I have to redraw, by the way,
but I'm not sure if that's a putty or emacs problem.)

Let me know if I can provide any more details of my setup (there is
clearly some difference, if you can paste from Explorer) or if there is
a way to find out exactly what emacs thinks it's reading when I paste
the problem paragraph and it stops responding.

Davor

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-02-25 18:30 Console-window Emacs stops responding when pasting clipboard Davor Cubranic
  2004-02-26  5:56 ` Eli Zaretskii
@ 2004-02-27  0:54 ` Juri Linkov
  1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2004-02-27  0:54 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Davor Cubranic <cubranic@cs.ubc.ca> writes:
> I run Emacs in a Putty terminal window (xterm emulation), and when I
> paste the contents of certain web pages I copied from Mozilla, Emacs
> stops responding. For an example, select the entire 11th paragraph in
> the body of the article at
> http://www.guardian.co.uk/elsewhere/journalist/story/0,7792,1152570,00.html
> (starting with "It all ran a bit out of control"). Paste it into Emacs
> (shift-insert in putty). Emacs stops responding until I press C-g. It
> looks like the dashes ("...were coming to see me -- everyone knows
> everyone in this town -- and saying...") are the cause of the problem,

I don't use Windows, but on GNU/Linux I can observe a similar anomaly,
and I think that it could explain this behavior too.

When a single 0xAD character is pasted into Emacs invoked with a -nw
inside an xterm, then after 1 sec Emacs displays "M---" in the echo area.
This means it interprets 0xAD as a meta character with the highest bit
set in the - (0x2D) character.

This explains why the text " - everyone knows everyone in this town - "
is pasted as " everyone knows everyone in this town " into GNU/Linux xterm.
It eats dashes with the following space because it interprets "-" as
a negative integer argument and insert the next character with -1 argument,
i.e. inserts nothing.  And it may also explain its behavior in a Windows
terminal window with Emacs in xterm, where perhaps it stops waiting
for a negative numeric prefix argument.

(BTW, since the phrase "everyone knows everyone in this town" from the
article was mentioned several times on this thread, I can confirm,
just for your information, how true this statement is!  It is even
often named as "glass city" where "everyone sees everyone", all this
due to the specific population distribution.)

-- 
http://www.jurta.org/emacs/

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-02-26  5:56 ` Eli Zaretskii
  2004-02-26  6:54   ` era
  2004-02-26 18:03   ` Davor Cubranic
@ 2004-03-10 17:36   ` Davor Cubranic
  2004-03-12 10:10     ` Andreas Schwab
  2 siblings, 1 reply; 7+ messages in thread
From: Davor Cubranic @ 2004-03-10 17:36 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Eli Zaretskii <eliz@elta.co.il> wrote:

   > Date: Wed, 25 Feb 2004 10:30:58 -0800
   > From: Davor Cubranic <cubranic@cs.ubc.ca>
   > 
   > I run Emacs in a Putty terminal window (xterm emulation), and when
   > I paste the contents of certain web pages I copied from Mozilla,
   > Emacs stops responding. For an example, select the entire 11th
   > paragraph in the body of the article at
   > http://www.guardian.co.uk/elsewhere/journalist/story/0,7792,1152570,00.html
   > (starting with "It all ran a bit out of control"). Paste it into
   > Emacs (shift-insert in putty). Emacs stops responding until I press
   > C-g.

Someone said on this list that this problem was caused by 8-bit
characters being pasted. Is there any way to tell Emacs to ignore the
high bit? My terminal is configured to send control keys as ESC
combinations anyways, and I have a US-ASCII keyboard.

Davor

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

* Re: Console-window Emacs stops responding when pasting clipboard
  2004-03-10 17:36   ` Davor Cubranic
@ 2004-03-12 10:10     ` Andreas Schwab
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2004-03-12 10:10 UTC (permalink / raw)
  Cc: Eli Zaretskii, bug-gnu-emacs

Davor Cubranic <cubranic@cs.ubc.ca> writes:

> Someone said on this list that this problem was caused by 8-bit
> characters being pasted. Is there any way to tell Emacs to ignore the
> high bit? My terminal is configured to send control keys as ESC
> combinations anyways, and I have a US-ASCII keyboard.

See set-input-mode.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2004-03-12 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25 18:30 Console-window Emacs stops responding when pasting clipboard Davor Cubranic
2004-02-26  5:56 ` Eli Zaretskii
2004-02-26  6:54   ` era
2004-02-26 18:03   ` Davor Cubranic
2004-03-10 17:36   ` Davor Cubranic
2004-03-12 10:10     ` Andreas Schwab
2004-02-27  0:54 ` Juri Linkov

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