unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Gottfried <gottfried@posteo.de>
To: Platon Pronko <platon7pronko@gmail.com>, Ruijie Yu <ruijie@netyu.xyz>
Cc: help-gnu-emacs@gnu.org
Subject: Re: get text from LibreOffice Calc to Emacs Org-Mode
Date: Mon, 24 Apr 2023 08:24:31 +0000	[thread overview]
Message-ID: <454d36a3-5200-7e47-d0d1-12fcd9fc9f27@posteo.de> (raw)
In-Reply-To: <bad5d1e5-29df-8e40-9124-c02586981fbb@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2055 bytes --]

Hi,

thanks for help.

I tried with "quote".

It gets the same result, as if I simply copy the text from LibreOffice 
calc to Emacs.org-mode

May be there is no other solution.
-----------------------------------------------------------------------
> 1. Use some external script to transfer clipboard contents from Calc format into Org-table format. So you C-c in Calc to copy the table, invoke external script to transform the clipboard, then paste the contents into Emacs. Personally I'd prefer Python, but you can use whatever you are comfortable with; 

this seems to be too difficult for me.
--------------------------------------------------------------------

> 2. Get clipboard contents and perform transformation directly in Emacs. So you C-c in Calc, then call M-x paste-from-libreoffice-calc in Emacs. The code will be something like this:
> 
> (defun paste-from-libreoffice-calc ()
>   (interactive)
>   (let* ((selection (gui-get-selection 'CLIPBOARD (intern "application/x-libreoffice-tsvc")))
>          (tsvc ...) ;; decode from UTF-16
>          (result ...)) ;; parse tsvc, format it into an Org-table
>     (insert result))) 

I don’t know if that possibility would make a difference to simply copy 
the text.
Is sees to me also difficult to use, because I don’t know emacs so much 
yet. I am learning.
AFAIU I would have to copy this part into my init.el file
--------------------------------------------------------------------------------
Kind regards

Gottfried



Am 24.04.23 um 09:35 schrieb Platon Pronko:
>> Why not just use quote? :)
> 
> Wasn't immediately sure that would work :) But obviously that's better, 
> thank you!
> 
>> Alternatively, you may find `org-table-import' useful.  I believe Calc
>> can export to simple formats like CSV or TSV, and you may be able to use
>> this function to convert into a table.
> 
> I tested it - it is unable to process multiline cells correctly.
> And I suspect that was one of the main problems Gottfried was facing.
> 

-- 

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2023-04-24  8:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22 10:11 get text from LibreOffice Calc to Emacs Org-Mode Gottfried
2023-04-22 10:23 ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-04-23 12:44   ` Gottfried
2023-04-23 12:55     ` Platon Pronko
2023-04-23 13:22       ` Gottfried
2023-04-24  5:46         ` Platon Pronko
2023-04-24  6:53           ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-04-24  7:35             ` Platon Pronko
2023-04-24  7:45               ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-04-24  8:24                 ` Platon Pronko
2023-04-24  8:38                   ` Gottfried
2023-04-24  8:24               ` Gottfried [this message]
2023-04-24  8:45                 ` Platon Pronko
2023-04-25 10:07   ` Uwe Brauer
  -- strict thread matches above, loose matches on Subject: below --
2023-04-28 15:57 Gottfried
2023-04-28 19:14 ` Uwe Brauer
2023-04-30 11:33   ` Gottfried
2023-04-30 13:05     ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=454d36a3-5200-7e47-d0d1-12fcd9fc9f27@posteo.de \
    --to=gottfried@posteo.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=platon7pronko@gmail.com \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).