From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sDQ7EhWpL2T+WQAASxT56A (envelope-from ) for ; Fri, 07 Apr 2023 07:24:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OEg7EhWpL2RyCgEA9RJhRA (envelope-from ) for ; Fri, 07 Apr 2023 07:24:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0B4EF2CE72 for ; Fri, 7 Apr 2023 07:24:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkeZb-0007Tg-7V; Fri, 07 Apr 2023 01:23:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkeZZ-0007TQ-3a for emacs-orgmode@gnu.org; Fri, 07 Apr 2023 01:23:41 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkeZX-0004Ym-Gg for emacs-orgmode@gnu.org; Fri, 07 Apr 2023 01:23:40 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pkeZV-0006wB-Jl for emacs-orgmode@gnu.org; Fri, 07 Apr 2023 07:23:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: capturing and filling Date: Fri, 7 Apr 2023 12:23:31 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-2.224, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680845077; a=rsa-sha256; cv=none; b=ILKWDoGpaU2XlTgCyPEkE7uGo/M81lkVNaWLwcsgYGLXxcfSGqHippQb2shw0YsKVyGB06 gQLKvku5/YSqr26ZHr9iDDeFCoAflIYUjfHCd2GYdj4kI+bdUMkLpu+07+WiTkvVAbDbwZ SNxR7is33JuJ4DmttqxrDU3HtxOv49FFOcAbZjwm6+V3AuhMo3rR1p5FXbZsR92VwFWLVC jH4u/rXTBQ0WpZAmjDyZT2MkEUPtEegzrzi8y0fLysblzWq/yacFg3K1n7BQ/owPXsmWVp 4967hKl0RpZbZWpLRH0c9raEahnDgeXkx/Y1/HRRDUQjsCDYb4nTieRdBBJzjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680845077; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=19ouY6Rb9DN6pn1yRmw2UKfD0+fdU9siRguOBjyvgcw=; b=X1F7kKVi1E8e8yzxZTtmd0Di5sZ6xSBW73VUblFVkxAAK0KcVemBqSs4t+jKVK8vMyPJSr z5/8T5mKQatYW8hYEZU2yFNh0KE2MRJ4qv/yuie8z36ogAKjlrFBbrUqqiUCy9D9FojiDv VLbrTFX8R+4VjkOpiTHtgWVIWzVzGJb49WaIte1iIqiVPJL9XpWmYLwI4xRQ7WFg/wBLFO L45Oa5yonvMt5FIiBt9Hl8f16B+BHA5Fxr1w40+SEBsX5i4LJbJGnUQ3l5pd+B44d0mQFv 30sWbza3+L9dVTtm56X10ZKEkX5nhP/lt6mrtcNAb7D8qnn85xXsMxGolR3C2g== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -2.72 X-Spam-Score: -2.72 X-Migadu-Queue-Id: 0B4EF2CE72 X-TUID: yJwot3J1MeGO 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 -\") "