From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QLeLMQTi9V8/VQAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 16:15:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6BBSLQTi9V9XLgAAB5/wlQ (envelope-from ) for ; Wed, 06 Jan 2021 16:15:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 564AE9402D4 for ; Wed, 6 Jan 2021 16:15:00 +0000 (UTC) Received: from localhost ([::1]:36396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxBSd-000563-6Q for larch@yhetil.org; Wed, 06 Jan 2021 11:14:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxBSH-000540-22 for emacs-orgmode@gnu.org; Wed, 06 Jan 2021 11:14:37 -0500 Received: from ciao.gmane.io ([116.202.254.214]:59694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxBSF-0006IO-NG for emacs-orgmode@gnu.org; Wed, 06 Jan 2021 11:14:36 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kxBSD-0000Uq-Hb for emacs-orgmode@gnu.org; Wed, 06 Jan 2021 17:14:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: Possibility to copy text outside EMACS and send it to orgmode document Date: Wed, 6 Jan 2021 23:14:26 +0700 Message-ID: References: <87eekcfeyk.fsf@ucl.ac.uk> <87wny4oy0h.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.74 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 564AE9402D4 X-Spam-Score: -1.74 X-Migadu-Scanner: scn0.migadu.com X-TUID: DxpllrtoRciY On 06/01/2021 13:41, Gerardo Moro wrote: > Basically that: as I copy (Control-C) text from the browser (Chrome), I > would like those copied sentences to be sent to a ordered list in an > OrgMode document: > > - copied text 1 > - copied text 2 > - etc. > > Any ideas? This would be very useful. To add to emacs a key binding that runs a script calling pandoc, something like (untested, you are asking for ideas), and inserting new text from clipboard in_file=`mktemp --tmpdir convert.XXXXXX.html` out_file=`mktemp --tmpdir convert.XXXXXX.org` xclip -out -target text/html >"$in_file" pandoc --output="$out_file" "$in_file" xclip -in <"$out_file" No need to setup org-protocol. Maybe it is possible to avoid temporary files. TODO: - Temporary files should be removed - Unsure if pandoc is safe in respect to peculiar HTML formatting, maybe it has some special options for conversion of non-trusted files.