From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EIPjJOz/OWSp8wAASxT56A (envelope-from ) for ; Sat, 15 Apr 2023 03:37:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id jUXjI+z/OWRLcAEAG6o9tA (envelope-from ) for ; Sat, 15 Apr 2023 03:37:48 +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 2AF47CFE5 for ; Sat, 15 Apr 2023 03:37:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnUqJ-0006CI-Kp; Fri, 14 Apr 2023 21:36: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 1pnUqF-0006C6-WE for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 21:36:40 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnUqC-0000aJ-SX for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 21:36:39 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4ec8143400aso190788e87.0 for ; Fri, 14 Apr 2023 18:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681522594; x=1684114594; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1eU0I98qwFGUs16nzCkEYkJHLRH9pcxelsM0/cFkZas=; b=MgtdQhsb+DonW+0xTXyA0zql++gcR2OkEwieP+ACw9aTGmkOv52OIVblCPmdfSlp/i KzC+m+oRP1Ay6GPII+2n4aiBVxlg4c6xkovrKSMGZcC/jHdjs0ek0WF6mJJ8H+J15hvm k4sjRMD4AigkCI67UzmhEZHII2ZVlY25lxHJEaLqnrD3/sj7Hy3vj9hLPLtlXxsz06vV lpWVvVoAd0QUyoouZirNkgNEHcOQibIyBKi+v3QAZsO0PGE6geiIg6ERKu8yIqt8/aX/ WN+ewH0UH/suppBaIGwg+89Nw4NNGK726tR13W3Tj57NLRm3ZQohcf2QTZli1aGHwRib lkuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681522594; x=1684114594; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1eU0I98qwFGUs16nzCkEYkJHLRH9pcxelsM0/cFkZas=; b=dRukyjHckB/94oj/plm1nMqy/KkVAtXZcF6n2sO47WX1WY6Vu5wfIlEwVyVg4/uZW7 DeYJDT2IiuvfMrRZXfGIMbOGZmmxWDKSGdMY7yISpRRPrCbW+eULepRwHLEMeBo2U9Ig aL2yh4i+X/RhZareFkjHeHqeEVSG4/lmkBE4x5LqK3Xb9qfYIlreXeJ1tipJy7n0CNec Lbnod0ZxE+8QfvcC5YNB8Hqw5EkMlZwhtfM65RdoV9JFq2b/j9hrhC/dJf03L5YgTk7x jY3jWJwZQfil/RZIwzDL1Rk6Gf7ZE2SsEiPPffsoVepOPCBym0pHwQfG1A2nHPUTt51Q W18w== X-Gm-Message-State: AAQBX9f0raNrE5VhUXmiHgyqKSYP2FcZDfeTj4wjlRozFHrO1z6RBl0h 3tLCpNEzo5K1bsxskFCOmEmybfjRQRGKZyeeBfo= X-Google-Smtp-Source: AKy350artLoN06oidnhmu/j0Rdni6EtqTXbf6UdOAtoKCnpgKW3I9mLQAr0O8F1itdncSFtMPBUQdIE5tPXwunGEOHo= X-Received: by 2002:ac2:532c:0:b0:4e8:6101:bcef with SMTP id f12-20020ac2532c000000b004e86101bcefmr237600lfh.1.1681522594259; Fri, 14 Apr 2023 18:36:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:1807:b0:25c:eedb:12ff with HTTP; Fri, 14 Apr 2023 18:36:33 -0700 (PDT) In-Reply-To: References: From: Samuel Wales Date: Fri, 14 Apr 2023 18:36:33 -0700 Message-ID: Subject: Re: capturing and filling To: Max Nikulin Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=samologist@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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=1681522668; a=rsa-sha256; cv=none; b=nVU36Rd9hdzkqjuvoKpjiTgxtTclWL4yslwz8pD4eZtpAzz42UMvzckZEhXlVEgBut5wqI NrSOXsDld/Rx5Yewm6YL5fFzovgQnWfjSfXGPlNisPva/3hUvHyC2DUwl0uXrvqLWg/hjo 4TZWc27wKy6RYP9SofaN+XWU+ElrgjEGexwKdyryagqz9jDbtFpG2K8zDrLblHXT+TUrX2 fGeoqnyNYs91+0Fi0KYCMXLBw9DN9KQjdq5J9N+i5rcLiITIXaXjDE4AGFbkmewUGxZBdD 9vqt/3r//ZNAXafRfx5Sef8PeUm8Ne3kwsIveE87YTSzVkp8exMe5S7L1ili4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=MgtdQhsb; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681522668; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1eU0I98qwFGUs16nzCkEYkJHLRH9pcxelsM0/cFkZas=; b=LlsFNW4cc7xC5YSvjio0CMKB4oByqMrn+sMPXbsdCR3xXyDuV9tqZf+7Y9Hkch1IMZf+r7 U5HNIcEaGzNXPDfRa0VN2gBevScjkfyPJK5ZY202iFGmqLJyMQqTdWXJPpbUQboOdVE822 M+R8lSpHQ03xM0b6o5kIusddhKRRWBC0qO5VG0656BjJxUH6wkxV0W2mFwIfHsilFZ5OVd +xZKJuMRVet144otEz0fzxo0cgeXRxKEmHzfIDGiOHhHeqQurR4Fag132DCUS6oaVbvOe3 hxGG6K2HArR0888cksUNSvzbQ7P7xvWpHwnOabMKtaRsb9VZF6u/lad4IzrJIA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.45 X-Spam-Score: -6.45 X-Migadu-Queue-Id: 2AF47CFE5 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=MgtdQhsb; 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"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: O6utgo3S/TgS 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 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