From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MKZkKaZbW2CcFwAA0tVLHw (envelope-from ) for ; Wed, 24 Mar 2021 15:32:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eCcnJaZbW2C7ewAAbx9fmQ (envelope-from ) for ; Wed, 24 Mar 2021 15:32:54 +0000 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 0DF758489 for ; Wed, 24 Mar 2021 16:32:54 +0100 (CET) Received: from localhost ([::1]:58670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP5V7-00021R-3e for larch@yhetil.org; Wed, 24 Mar 2021 11:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP5TU-000125-Fg for emacs-orgmode@gnu.org; Wed, 24 Mar 2021 11:31:12 -0400 Received: from ciao.gmane.io ([116.202.254.214]:32896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP5TR-000105-VW for emacs-orgmode@gnu.org; Wed, 24 Mar 2021 11:31:11 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lP5TO-0002nU-EF for emacs-orgmode@gnu.org; Wed, 24 Mar 2021 16:31:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: =?UTF-8?B?UmU6IEJ1ZzogT3JnIG1hbnVhbCwgMTYuMTUuMiBUaGUg4oCYY2FwdHVy?= =?UTF-8?B?ZeKAmSBwcm90b2NvbCwgcG9zc2libGUgZXJyb3IgWzkuNC40IChyZWxlYXNlXzku?= =?UTF-8?Q?4=2e4_=40_/home/admin/Programming/Software/emacs/lisp/org/=29=5d?= Date: Wed, 24 Mar 2021 22:31:00 +0700 Message-ID: References: <868s6hvvfs.fsf@protected.rcdrun.com> 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:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: <868s6hvvfs.fsf@protected.rcdrun.com> Content-Language: en-US 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: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 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.249, NICE_REPLY_A=-0.001, 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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616599974; 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=+/n1xDbS1GJUMTw46BIIs6uZPrz284w9JtnLVfSRmYs=; b=fCgVXDzOuJE3dcUk3DUpv8jgDKO0RrhrHzoZWCLdIGl3jUZF0oGgLaYNeR6aD49j8PZVqg aL3SK7TRTrl3fZBEKRTBykmNMIShNNq3vXWhJPaaaJGC/7qZeAho19mkisqWqCdHani55F lEqGLgjLuxFa2JRUSgw9g/Ia9PB+7NkFGedYOoM73ojziSWzVqcCMsSEqqg7lgoSLxVUaS M/+8hv4XNBaxAS/D1P+19KifOa27PY0bDAfFJcqHLIQgNa8Qq5Cly0EfrowksQ1vu+Z7TZ BHs3V6JnXEm45LjuGq3pM6vnNLc2prCn6Dwjwrik/l36UK+Su45nT6+6u9GwnQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616599974; a=rsa-sha256; cv=none; b=IcmsGqbLUUQxovwp4coqY86b18pg/7dsQ6qRorppHAJRe7ypMyFQ/dmZPU5ep8lX0pJlCd DGHmYOnqiB+5663lJQ3CzpWY3kW/3yaGI+pkscrq4O6Lv6n8sLRBYFz4kOLGwXb3Ng1fN6 NkM3PzNooyWMR3tR17s9dUEdkUuEiQbybVHa2ItIx3ck2HawQrpjTH5mv2HHomiBSUkbYj q4UZWwr05ajB3QaNooXAjiqjjGnlDYcXqnzA80IUoXf46nSNfvqU7ILWiudXaSXS0dk5cV t97RBxsJ+GIjCYziwsGMqngF5L026si4T6vwnCMnWBK39OwPS59m65dR/Xq1JA== 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.82 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0DF758489 X-Spam-Score: -1.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: ryPMiOzzIfw5 On 21/03/2021 14:04, Jean Louis wrote: > > emacsclient org-protocol://capture?template=X?url=URL?title=TITLE?body=BODY Certainly extra question marks should be replaced by "&". > emacsclient 'org-protocol://capture?template=X&url=URL&title=TITLE&body=BODY' However I am in doubts if such form with double slash should be recommended if org-protocol scheme is registered in desktop settings. Subprotocol "capture" could be parsed as host name before passing to handler. With old syntax and colon after subprotocol the problem was more severe: https://github.com/sprig/org-capture-extension/issues/16 Colon in some desktop environments may be dropped since port number after it is not specified. It seems with new syntax a similar problem could happen as well: https://code.orgmode.org/bzg/org-mode/commit/928e67df These complications are irrelevant if org-protocol URI is passed directly to emacsclient bypassing desktop handlers. Is any problem expected with single slash after the scheme? org-protocol:/capture?template=X&url=URL&title=TITLE&body=BODY Alternatively 3 slashes could be used in examples: org-protocol:///capture?template=X&url=URL&title=TITLE&body=BODY I hope, "capture" in both variants is parsed as part of path, so it is safer. On the other hand I could not test on Mac and Windows. Even some linux distribution could be some specific. Such change could be committed in optimistic way if nobody will object, not requiring to confirm that it works on every OS. A have a couple more questions. Is it intended decision that no leading slash is not allowed? org-protocol:capture?template=T&... In my opinion it is similar to mailto: scheme, so subprotocol should not be considered as hostname. Is there any reason that space can not be encoded as "+"? It is allowed in query URL part and it prevents direct usage of modern API available in JavaScript: String(new URLSearchParams({template: "X", url: "https://orgmode.org/", title: "Org mode"})) "template=X&url=https%3A%2F%2Forgmode.org%2F&title=Org+mode" I guess that decoding of "+" just was not necessary in old syntax since all parameters were encoded as path components. Could anything bad happen due to update of decode function to allow "+"?