On 07/04/2023 11:40, Samuel Wales wrote:
On 4/6/23, Max Nikulin 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.
An extension can not add 2 buttons. It may define context menu for right
click or it may open a popup with menu (implemented as an HTML page) on
simple (left) click.
Till it is not implemented you may use an org-protocol handler that
displays menu from e.g. a shell script:
printf 'Prose\nCode\n' |
zenity --list --title "Capture template" \
--text "Capture type" --column Template
or
zenity --question --title "Capture template" --text "Capture type" \
--ok-label Prose --cancel-label Code
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 am guessing you mean s/should not/should/ here?
If template is not passed then script can just append &template=x to the
URI, otherwise it may call e.g. sed to replace existing parameter.
%(insert (shell-command-to-string "xclip -t text/html -o | pandoc
-f html -t org -"))
i selected one line and it printed that line. i selected your above
lines and got Error: target text/html not available.
Select some text on a web page in Firefox (or similar application
supporting rich text copy, e.g. libreoffice writer) and try
xclip -t TARGETS -o
I have realized that `insert' should not be added to template, the code
above is more suitable for evaluation by M-:
Next revision (with escaped quote characters)
"* %:description
<%:link>
%(shell-command-to-string \"xclip -t text/html -o | pandoc -f html -t
org -\")
"