[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: |
Fri, 14 Apr 2023 18:36:33 -0700 |
i am very sorry, i got myself in over my head. i do not undestrand
what you are suggesting. if a change on the ff side i cannot do it,
bu perhaps you are suggesting making emac pop up an x seector that
chooses the filing option.
for yers i have used an unsophisticated heursitic in the template
simiilar to your teplate suggestion.
but now the problem is htat this essential ff extension is completely
broen for me. i upgraded firefox, and now it is popping up a window
asking [unselectable text paraphrasing] whether i want emacsclient
oprning protocol iink.
i affirm but no capture occurs.
so no capture at all, never mind a choice of filling.
On 4/6/23, Max Nikulin <manikulin@gmail.com> wrote:
> 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 -\")
> "
>
>
>
>
>
--
The Kafka Pandemic
A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com
Re: capturing and filling, Max Nikulin, 2023/04/10