thanks for all the work! i'm really glad to see that you're continuing to work
on this, as it's an important area that's been neglected for a long time.
it'll
be really cool, e.g., when xemacs has its own "wysiwyg word-processing" mode
[are you interested in writing this? it's a very important addition and should
not be hard, now that you've got rtf converters] and can communicate with other
word processors using rtf selections, or when we can cut and paste images back
and forth, e.g. for people who use vm or gnus to write mail. [e.g. you hit
alt-prtsc to get an image of a window and then paste it into a message, provided
we add support to convert jpeg etc. images out as well as in]
a few comments --
- the int-bin functions are probably useful, but need to be able to handle
vectors of numbers; also, the preferred format for 32-bit numbers should be
floats, not conses [but you can still accept conses as well as floats]. also,
you need proper type-checking on the values; you can't do XINT until you've done
CHECK_INT. also, to deal with type-size issues, [1] use int, not long, for 32
bits, [2] use the SIZEOF_* macros defined in config.h to check things properly.
also, i would suggest names like `encode-binary-string' and
`decode-binary-string'.
- i still don't see how you plan to pass the data size [8/16/32] into
own-selection-internal once you use only strings, not vectors, for data.
- i don't think things like select-convert-from-filename should call
select-convert-to-filename. the filename is supposed to come externally [if the
selection is owned by xemacs itself, we should already have called
select-convert-to-filename automatically], and if the external owner can't
provide a filename string, we signal an error, not substitute our own filename.
"Alastair J. Houghton" wrote:
OK. I left out an XINT on line 281... here's a fixed version
; please could those having problems check whether *this* fixes them.
Thanks,
Alastair.
lisp/ChangeLog:
2000-07-14 Alastair J. Houghton <ajhoughton(a)lineone.net>
New converter functions for X.
* select.el (select-convert-from-text): New.
* select.el (select-convert-from-length): New.
* select.el (select-convert-from-integer): New.
* select.el (select-convert-from-identity): New.
* select.el (selection-converter-in-alist): Use them.
src/ChangeLog:
2000-07-14 Alastair J. Houghton <ajhoughton(a)lineone.net>
* select.c (clean_local_selection_data): Removed. This was
a disgusting function, and previously should have been in
select-x.c in any case. The functionality is now provided
in select-convert-from-integer (select.el).
* select.h: Changed parameters for get_local_selection.
* select.c (get_local_selection): Bug fixes. New parameters.
* select.c (select-internal-int-bin): New.
* select.c (select-internal-bin-int): New.
New functions to read & write binary integer values into
strings.
* select.c (available-selection-types): Fixed stupidity where
INTEGER and ATOM got added twice.
* select.c (get-selection-internal): Removed symbol stripping. Use
new parameters for get_local_selection.
* select.c (syms_of_select): Added new functions.
* select-x.c (motif_clipboard_cb): Use get_local_selection - for now.
* select-x.c (x_handle_selection_request): Use new parameters for
get_local_selection.
* select-msw.c (mswindows_get_foreign_selection):
Use TO_INTERNAL_FORMAT rather than hacking.
--
____________________________________________________________
Alastair Houghton ajhoughton(a)lineone.net
--------------------------------------------------------------------------------
Name: select.2.diff
select.2.diff Type: unspecified type (application/octet-stream)
Encoding: quoted-printable
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/