From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id liOoAAJtJmHJbAAAgWs5BA (envelope-from ) for ; Wed, 25 Aug 2021 18:17:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KARHNwFtJmGTJAAAB5/wlQ (envelope-from ) for ; Wed, 25 Aug 2021 16:17:05 +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 BC9915013 for ; Wed, 25 Aug 2021 18:17:04 +0200 (CEST) Received: from localhost ([::1]:36704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIvaJ-0000mF-OA for larch@yhetil.org; Wed, 25 Aug 2021 12:17:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIvZp-0000m4-LN for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 12:16:33 -0400 Received: from ciao.gmane.io ([116.202.254.214]:59030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIvZo-0005ET-5Q for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 12:16:33 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mIvZk-0006zC-AB for emacs-orgmode@gnu.org; Wed, 25 Aug 2021 18:16:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: org-capture config broken (org-protocol URI syntax) Date: Wed, 25 Aug 2021 23:16:19 +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:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: 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: 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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-2.24, 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=1629908225; 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=zZTiHNOBZcDoTw96Zc01fmPMXWTePrQWmSORpQ/+7Z0=; b=XXpFg5DcT+1GjYSvpeHP6RX4slKmAcOHk7GkYAYIHDRcHiMrnRXNJTOq8DKU2KeAn4q7MY bONUP1l/93Gs/n+c5YLhVwRJXTDwrmZf+daAE1AUMzh0K9YE3v65prQK4BnupJDDsR184M UrvSQ47xcIlwwazWdACfBdVHkH1D52bh78n0ANllRfIVw5y4LN/tbMGroA+Pr9V6gkvNUm o0bYzN/zgS5CPkOk8Y8tTMv8n7U8VnP6boEM+Xm4N5glHlGBYRxstVoZ1vCxgdhv5hpCD0 F9i8SFw+E0FLZhyQ71FbL/HuQ6k8fA2RKdNygE3a0UkDGy0I6uDcMzGU/OYfXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629908225; a=rsa-sha256; cv=none; b=Y0Wbv2xx1Y2wNWAYtSgvF0vkmDdMWsLQJjjugu6zdbTfFZuoyisKKkK/3sd2WJ0/+ZBhEU u52b/QvuCx9VbT56lf3vFPy3kAHkBdZr936nlyTVPehYpk0A5vmVTpbAAw6s+Jp0tI4P2S Y+pAQgNRz5tcDjfHAOQtZRMLHuwi9dByh5pHveAIjRD9LLYOxyZX8A79pg2jB0vNOuAzfR Tf//wrznjv3VCEfURrpdmUvPD+FU7NY/4OGhq0MLjlvKRMANVf5ra4GpqCCWxjaJr9/5du 87LvjeTRrPgvArj0wjV9SsL5gLGSkraYml1dQIFIg6WeRebgXNWlC2t8KMPlGQ== 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: -0.32 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: BC9915013 X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: muXPbX8rn072 On 25/08/2021 19:05, Orm Finnendahl wrote: > > I use a custom script (dating back to a post from 2013) to capture my > mutt Emails using org-capture. It worked flawlessly but stopped > working some time ago (I don't exactly know, when, probably last > year). Unfortunately you did not specify version of Org you are currently using. > I assume the code has changed and doesn't accept the syntax of the > org-protocol line any more. > > emacsclient org-protocol:/capture:/m/mutt:YSYuf6sKfSbwtIeB@example.com/mail/%20%20Subject%3A%20test%0A%20%20%20%20From%3A%20Unknown%20%3Cdummy%40example.com%3E This the old style of Org protocol URI. See https://orgmode.org/manual/The-capture-protocol.html for an example of modern variant (it has typos fixed in master branch, some "?" should be "&"). I am unsure concerning order of parameters in old-style URLs. Older syntax should still be supported (a warning requesting update may be issued however), unfortunately there were some issues, see e.g. https://orgmode.org/list/s4cjck$156g$2@ciao.gmane.io Some details: https://orgmode.org/Changes_old.html#org3da1425 (news for version 9.0) > The emacsclient commmand above is generated with a perl script using > uri_escape for everything after /mail/. The single slashes in the > protocol line of the emacsclient command seem strange, but I couldn't > find any hint in the internet how the syntax is supposed to be for a > certain org-capture-template. I suggest you to update perl script to generate URI with key-value parameters in query part. Concerning number of slashes, I suppose, the following should minimize issues with desktop integration and intermediate bugs in various versions of Org org-protocol:/capture?template=X?url=URL&title=TITLE&body=BODY namely no double slash after org-protocol otherwise in some cases slash might be inserted before question mark or second colon might be dropped in old-style URI. With double slash subprotocol might be interpreted as host name causing further normalization as dropping colon that is not followed by port number or adding path "/" before query part. Such considerations however are not applied for direct invocation of emacsclient. Emacsclient considers org-protocol URI as relative path, so it prepends argument with current working directory and squashes multiple slashes into single ones. That is why it does not matter how much consequent slashes are used in emacsclient command, however desktop-wide handlers may modify URI depending on number of slashes. Latest releases should tolerate URIs with slash before question mark like org-protocol://capture/?template=X?url=URL&title=TITLE&body=BODY