Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rmk16 remove tedit special stuff from CLIPBOARD, move it to TEDIT-COMMAND. #1676

Merged
merged 2 commits into from Apr 30, 2024

Conversation

rmkaplan
Copy link
Contributor

This also tries to put out a useful representation of image objects rather than just causing an error because an object is not a character code that can be printed to the clipboard stream. It applies the object's preprintfn, if there is one, otherwise prints the name of the getfn.

This isolates the issue in one place, as a first approximation. In the long run it might be possible to shadow the system clipboard with a local tmp file, and separately run the object's PUTFN to that file. Then copy/paste could move objects (with binary data) as well as characters from one place in Medley to another--or from one Medley image to another. We would need some way of keeping the clipboard and its shadow in sync as other applications or other Medleys make use of the clipboard.

If other consumers of the system clipboard respect some sort of convention for ignoring byte-runs, we could just put our additional information there and not deal with synchronization. Unlikely.

This also implements a different way of dealing with image objects in the selection.  Instead of causing an error (since an imageobject can't be printed to the clipboard stream), it tries to put out a useful representation of the object.  If the object has a preprint function, it applies that.  Otherwise, it prints out the name of the getfn.  Other objects can be explored.
@nbriggs
Copy link
Contributor

nbriggs commented Apr 21, 2024

Looks as though rmk15 and rmk16 have a conflict over changes to TEDIT-COMMAND ? I can't merge rmk16 into a test branch after I've merged rmk15.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Apr 21, 2024 via email

@nbriggs
Copy link
Contributor

nbriggs commented Apr 21, 2024

Ah, I see the problem - the PR was closed but the branch wasn't deleted, you have to do that explicitly on the https://github.com/Interlisp/medley/branches page. I've deleted the rmk15... branch.

Copy link
Member

@masinter masinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's lots more to be done with CLUPBOARD but this is fine.

@masinter masinter merged commit e40d331 into master Apr 30, 2024
@masinter masinter deleted the rmk16--Remove-TEDIT-special-stuff-from--CLIPBOARD branch April 30, 2024 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants