URL:
  <https://savannah.gnu.org/patch/?10508>

                 Summary: on-demand clipboard format
                   Group: GNU TeXmacs
               Submitter: pjoyez
               Submitted: Mon 17 Mar 2025 09:52:39 AM CET
                Category: None
                  Action: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
                 Release:
           Fixed Release:
                  Stable:


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 17 Mar 2025 09:52:39 AM CET By: Philippe Joyez <pjoyez>
With this patch, when copying a selection to the clipboard in the "default"
format, texmacs only advertises the MimeTypes it can produce, but does not
generate the corresponding data until a client app actually asks for it.

With this patch, when I ctrl-C a chunk of a document, I can paste it
indifferently in Inkscape (as svg) in Thunderbird (as html/mathml -- formulas
can be copy-pasted in emails!), in a text editor (as verbatim) or in another
texmacs instance, without having to bother about using the appropriate "copy
to XX" command. The "copy to XX" command is not modified and still works as
before, placing (only) the appropriate format on the clipboard beforehand.

I have also cleaned up some parts of the code that were no longer used, or
unclear.

The patch works nicely for me as is, but I find it useful to comment the
got_focus at line 603 of Edit/Interface/edit_interface.cpp to lower the cpu
usage when texmacs is backgrounded (when I switch to another application for
pasting).






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Name: [email protected]  Size: 21KiB
<https://file.savannah.gnu.org/file/on-demand_clipboard_format_%40r14694.patch?file_id=57031>

    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-430a936471d74ee9bc5f14aee48dd84cbd3cbce0.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10508>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Texmacs-patch mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-patch

Reply via email to