This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: XWinClip and Emacs
- To: Harold Hunt <huntharo at msu dot edu>, cygx <cygwin-xfree at cygwin dot com>
- Subject: RE: XWinClip and Emacs
- From: Brian Genisio <briangenisio at yahoo dot com>
- Date: Tue, 23 Oct 2001 04:42:57 -0700 (PDT)
Thanks for the update Harold... It works great :) I was planning on writing
the DOStoUNIX function on my own. I did not realize it was already done for me
:) As for the third issue, it has to do with the fact that when you select
something in the X server, your selection instantly is removed.
There could be many programs that wait for a mouse release event to handle the
selection. If this happens, and the app asks for it, it will fail. The
attached example is an expectk script that I ran from linux (expectk
myscript.exp) to the Cygwin X server.
Is there any way to keep the selection selected after the xwinclip has grabbed
it? I still plan to look into it, so no hurry :) (been busy lately)
Brian
######################################################################
# Global current server var
set server "not set"
# create a label on top of the list box
label .serverLabel -text "Servers"
pack .serverLabel
# create a listbox to put a list of servers
listbox .servers -relief raised -borderwidth 2 -height 3
pack .servers
# populate the servers list
.servers insert end "192.168.40.1"
.servers insert end "192.168.40.2"
.servers insert end "192.168.40.3"
# Bind a function to the .servers list box when the button releases
bind .servers <ButtonRelease-1> {
global server
# get the number of the current selection
set selectnum [.servers curselection ]
# get the value of the current selection
set server [.servers get $selectnum]
# Tell the user what they selected
tk_messageBox -message "Server Selected : $server"
}
--- Harold Hunt <huntharo@msu.edu> wrote:
> Brian,
>
> I believe xwinclip Test02, http://xfree86.cygwin.com/devel/xwinclip/, takes
> care of issues 1 and 2. However, I have not yet been able to duplicate
> issue 3; an easy to duplicate test case for 3 would be appreciated.
>
> Harold
>
> > -----Original Message-----
> > From: cygwin-xfree-owner@sources.redhat.com
> > [mailto:cygwin-xfree-owner@sources.redhat.com]On Behalf Of Brian Genisio
> > Sent: Wednesday, October 10, 2001 1:57 PM
> > To: Brian Genisio; cygwin-xfree@sources.redhat.com
> > Subject: Re: XWinClip and Emacs
> >
> >
> > Ok, I looked at these issues more... I havent figured out the
> > reason for #3
> > yet, but I have figured out #1 and #2.
> >
> > #1 : Windows puts a \r\n at the end of each new line. XWinclip
> > should strip
> > the \r characters after it receives it from the Windows
> > clipboard, but before
> > it sends it to the X server.
> >
> > #2 : When Xwinclip calls XChangeProperty, to set the string, it sends
> > pszGlobalData, with a length of strlen(pszGlobalData) + 1. The +
> > 1 adds the
> > null terminator. I do not think this is necessary. If it is
> > included this
> > way, the null terminator is added to the PASTE operation in X. Emacs, for
> > instance, will display this as \@.
> >
> > I will fix these issues sometime soon, if no one else gets to
> > them, and send
> > them to the group. Issue #3, I have not really looked at yet.
> >
> > Thanks,
> > Brian
> >
> >
> > --- Brian Genisio <briangenisio@yahoo.com> wrote:
> > > Harold (and the rest of y'all),
> > >
> > > XWinClip is a great thing!!! Many praises for the development
> > of it. I know
> > > it is still in development, but I thouhgt I would bring up a
> > few issues to
> > > add
> > > to the bug-tracking of the project :
> > >
> > > 1. In Emacs (linux and solaris tested), if you paste from
> > Windows, you get
> > > the
> > > ^M character appended at the end of each line.
> > >
> > > 2. In Emacs (linux and solaris tested), if you do any pasting,
> > whatsoever,
> > > the
> > > ^@ character is appended to the end of each selection.
> > >
> > > 3. When a selection is made, the visibility of the selection is
> > immediately
> > > taken away. Functionaly, this seems OK, but I did find a place
> > where this
> > > caused an issue... I am sure there are more... : I found a
> > TCL/TK GUI that
> > > has
> > > a listbox in it. On a mouse click, the code gets the current
> > selection, and
> > > chooses what to do with it. Since the selection is no longer
> > highlighted,
> > > the
> > > TK GUI no longer knows what has been selected.
> > >
> > > Please note, I am not complaining. This tool is a great time
> > saver!!! I
> > > just
> > > wanted to make a note of some more known issues. If I get a
> > moment, I will
> > > take a look into fixing these issues.
> > >
> > > Thanks,
> > > Brian
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make a great connection at Yahoo! Personals.
> > > http://personals.yahoo.com
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com