emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: capturing and filling


From: Samuel Wales
Subject: Re: capturing and filling
Date: Thu, 6 Apr 2023 21:40:02 -0700

hi max,

more below.

On 4/6/23, Max Nikulin <manikulin@gmail.com> wrote:
> Samuel, in your case, it is your requirement to have non-distracting
> single-click capture.

... but one icon for prose/filling and one for lines/nonfilling would
be great for me.  or even the existing single icon for whichever one i
use most, with a right-click menu for other options.   maybe other
templates.

> A workaround is to define 2 capture template: for prose text and for
> code. Browser extension should not add template=x query parameter to

i was thinking that would be a great solution.  however, i cannot
implement it.  i was thinking elisp workaround might be more
straightforward.

i am guessing you mean s/should not/should/ here?

> org-protocol URI.
>
> Extension may determine if the captured text pre-formatting, however
> there are some complications. Besides <pre> and <code> tags, there may
> be <div> and <span> elements with white-space: pre-wrap CSS property and
> similar. Selection may consist of several regions, each one with mix of
> regular and pre-formatted text.

i was thinking figuring it out from the selection and the html  would
be horrendously complex and brittle and error prone.  but i could be
wrong.

>
> Actually it is possible to convert selected text to Org markup. use
>
>      %(insert (shell-command-to-string "xclip -t text/html -o | pandoc
> -f html -t org -"))
>
> in your capture template. Possible caveats: headers, especially <h1> may
> give undesired effect.

i selected one line and it printed that line.  i selected your above
lines and got Error: target text/html not available.

>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]