From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: capturing and filling
Date: Fri, 7 Apr 2023 12:23:31 +0700 [thread overview]
Message-ID: <u0o9ck$pm2$1@ciao.gmane.io> (raw)
In-Reply-To: <CAJcAo8uxu8YFvu0tu_cK9VKJjbBugkCPwQojd84Q5-2Q25M7FQ@mail.gmail.com>
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 -\")
"
next prev parent reply other threads:[~2023-04-07 5:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 3:29 capturing and filling Samuel Wales
2023-04-07 4:12 ` Max Nikulin
2023-04-07 4:40 ` Samuel Wales
2023-04-07 5:23 ` Max Nikulin [this message]
2023-04-15 1:36 ` Samuel Wales
2023-04-15 3:37 ` Max Nikulin
2023-04-17 7:00 ` Max Nikulin
2023-04-10 4:39 ` Max Nikulin
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='u0o9ck$pm2$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).