Re: 2.3.2.1 & copy/paste
Re: 2.3.2.1 & copy/paste
- Subject: Re: 2.3.2.1 & copy/paste
- From: Michael Parson <email@hidden>
- Date: Mon, 30 Mar 2009 09:48:55 -0500 (CDT)
On Fri, 27 Mar 2009, Nathan wrote:
On Fri, Mar 27, 2009 at 4:45 PM, Nathan <email@hidden> wrote:
On Fri, Mar 27, 2009 at 4:44 PM, Nathan <email@hidden> wrote:
On Fri, Mar 27, 2009 at 4:37 PM, Marco S Hyman <email@hidden> wrote:
On Mar 27, 2009, at 3:21 PM, Nathan wrote:
Now if only Terminal.app wouldn't discard random chunks of text when
you paste large amounts into it, the _entire_ OS X clipboard
experience would be stellar! ;-)
Random? I though it just didn't like tab characters.
Cut "foo bar" (there is a ^I in there) and paste it
into a terminal.
// marc
I finally went out and officially filed this one. I thought I had
filed it a long time ago (weird). Here's the text of my bug. Go
ahead and try it out yourself. You'll get different results every
time you paste--that's the "random" part. It looks like it's just
buffering clipboard data enroute to Terminal.app and discarding any
data that overflows the buffer if the buffer isn't getting emptied
quickly enough--but that's just my speculation.
[snip]
Oh, and for those coming in on the middle of the thread, I hasten to
point out that this is strictly a Terminal.app bug -- it doesn't
relate to X11 at all. I just mentioned it because X11 has made such
strides in clipboard improvements that I got jealous... :-)
As a couple users kindly pointed out in private emails, the other
editors in terminal don't exhibit the same problem. Fascinating!
Looks like I'll need to adjust my bug report... Maybe it's
emacs+terminal ... It's not _just_ emacs, because if I run my
custom-compiled emacs in aqua mode, pasting always works fine, but if
I run that same custom-compiled emacs in terminal mode, it has the
same problem as the system's /usr/bin/emacs. Weird.
I've seen this problem for years, under other operating systems, using
editors other than emacs, terminals other than Mac OS's Terminal.app.
I just figured it was a problem with the buffering of the editor.
My work-around was to use the 'cat' command to create the file, then
close it out, open in the editor of choice to edit:
$ cat >newfile.txt
<paste>
^D
$ vi newfile.txt
Note that the text might look garbled on the screen, depending on how
well your terminal updates, but the contents of the file should be just
fine.
Since I tend to be doing my work on remote systems, the local OS doesn't
tend to matter, but there tend to be a lot of layers involved:
o whatever the local terminal is (xterm, putty, terminal.app, etc)
o the overhead of my ssh session
o screen running on the remote OS
o potentially running another ssh from inside screen to a 3rd host
o whatever buffering the editor on the other end might be doing
Plus all the networking hardware inbetween my local terminal and where
ever the remote system is. The method I outlined above seems to work
regardless of what's in the middle.
Also fascinating: it took about 5 seconds to paste the 100,000 lines
to vim, while it took about 3 MINUTES to paste the same into "nano."
(I never liked nano anyway.) In emacs aqua mode the paste had no
noticeable delay. I imagine gvim would be similarly quick.
I imaging it has to do with how the editors update the screen when the
text scrolls. IIRC, nano (and pico) tend to jump by half-screens, vi
and vim tend to scroll a line at a time. Remnents from what kinds of
terminals (and line speeds) the authors were using when they wrote the
original versions.
--
Michael Parson
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden