emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Possibility to copy text outside EMACS and send it to orgmode document
Date: Wed, 6 Jan 2021 23:14:26 +0700	[thread overview]
Message-ID: <rt4nl3$1b2$1@ciao.gmane.io> (raw)
In-Reply-To: <CAF4Fj9i1mtyf82fDuO_pJA7SOOun1baDtjr93XCaooB1CARZZg@mail.gmail.com>

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.




  parent reply	other threads:[~2021-01-06 16:15 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 16:59 Remembrance Agents Gerardo Moro
2020-11-28 17:08 ` George Mauer
2020-11-28 18:26 ` Jean Louis
2020-11-29 13:07   ` Gerardo Moro
2020-11-29 13:52     ` Eric S Fraga
2020-11-29 17:29       ` Jean Louis
2020-11-29 17:47         ` Eric S Fraga
2020-11-30 11:15           ` Jean Louis
2021-01-06  6:41             ` Possibility to copy text outside EMACS and send it to orgmode document Gerardo Moro
2021-01-06  6:48               ` Samuel Wales
2021-01-06  6:49               ` Tom Gillespie
2021-01-06  6:58                 ` Gerardo Moro
2021-01-07  5:14                   ` Ihor Radchenko
2021-01-07  5:36                     ` Gerardo Moro
2021-01-07  6:17                       ` Tom Gillespie
2021-01-07  6:29                         ` Gerardo Moro
2021-01-07  7:54                           ` Ihor Radchenko
2021-01-09 17:32                           ` TRS-80
2021-01-06 15:56               ` Tim Visher
2021-01-06 17:42                 ` Bob Newell
2021-01-06 20:46                 ` Gerardo Moro
2021-01-06 16:14               ` Maxim Nikulin [this message]
2021-01-06 16:31               ` Juan Manuel Macías
2020-11-30  6:48       ` Remembrance Agents Gerardo Moro
2020-11-30  9:31         ` Eric S Fraga
2020-11-30  9:37           ` Gerardo Moro
2020-11-30 10:09             ` Eric S Fraga
2020-11-30 10:35               ` Jean Louis
2020-11-30 10:18           ` Jean Louis
2020-11-30 10:16         ` Jean Louis
2020-11-30 11:16           ` Gerardo Moro
2020-11-30 11:25             ` Jean Louis
2020-11-29 17:15     ` Jean Louis

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.orgmode.org/

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

  git send-email \
    --in-reply-to='rt4nl3$1b2$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).