From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yC0JEBEZBGLUkQAAgWs5BA (envelope-from ) for ; Wed, 09 Feb 2022 20:42:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SC5PDREZBGIcGwAA9RJhRA (envelope-from ) for ; Wed, 09 Feb 2022 20:42:09 +0100 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 CB2BB37097 for ; Wed, 9 Feb 2022 20:42:08 +0100 (CET) Received: from localhost ([::1]:42856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHsqt-0003cK-LI for larch@yhetil.org; Wed, 09 Feb 2022 14:42:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHsYI-0001KY-Ik for emacs-orgmode@gnu.org; Wed, 09 Feb 2022 14:22:54 -0500 Received: from [2607:f8b0:4864:20::632] (port=33534 helo=mail-pl1-x632.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHsYE-00043y-Kt for emacs-orgmode@gnu.org; Wed, 09 Feb 2022 14:22:52 -0500 Received: by mail-pl1-x632.google.com with SMTP id k17so3130430plk.0 for ; Wed, 09 Feb 2022 11:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=0BjMowpshgMHZs0cz4pOyMhzZgePx5nBCgz2jADDpb8=; b=VsbsEuKl9NS0q0t8tHibjd3TIRhpnoBl05dHZAMQQEChuMBZQ97Akt1YU3GaHcjI1r OYoN8DQ6ikMaGTuw+QRjZzycU/N0GcV80Arm2KQgLc3b/OU5uo1lhBZSobw0MANgJBM+ PY4eeafQK2GwA9gyTnl1hYCbRuSVtFtkLNGf4yrgHe8y1x38QDBzkkEvCKw9obEZohWS wd+dQbh71BPNjP07j5Kebe4UGvkzLF4ES53hfdRjZlFY+oBwm5o2+XY17OIIsZeEB0By zezpkpebRHBqdbTqux386cTickj6q+Y+V5LN8JP6uzSYacNZAQHHfxTU+4VohNA6iqgd wx9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0BjMowpshgMHZs0cz4pOyMhzZgePx5nBCgz2jADDpb8=; b=qxPY91qqZlG5iRj0mRZvryTOt00KzEQ2YidfI5xgwSb0C1sHndhEN4fR/e0XStfJZK TBOFFgiKJ8/567MDeA8SaSr9/tTThjg61alXzrNQA/vFq5Dai9rpATQqQELq/S1p694N KeOnUmI46fSJvgykXKZh9ExvGbU/LXxyLvnh+Xnq2ECjPE1jufQUfMw08wjDvx7NDSAE 7xkjMu0+lVfEUtLl7vcrX+B6uJkgCzpllKVkHRRIg7cs9V9BZixI/QnSLBSu0Y/JFcxT 8QPFfLI1d5Xn901a0h0yjoLG6ntQ07xCwFQUFDr92/Ulbirf4MIKRPbdDFBFjvBKWxzV 4mAQ== X-Gm-Message-State: AOAM531pw+FRDGaKw27qVza7ND+krLmDqAu5t4rbsLAveDI8syGiWES0 o3r5X7TfPqEi9J0I1b2HGEAub9QG58Hl2g== X-Google-Smtp-Source: ABdhPJyZD/Qic4s3aHkkZVznEYlle99qfxYNMHsVAg0HkENcjzwgr27FdqpDGkOPV8mf69zD6I98rA== X-Received: by 2002:a17:902:c652:: with SMTP id s18mr3991056pls.104.1644434568916; Wed, 09 Feb 2022 11:22:48 -0800 (PST) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id j2sm20754499pfc.209.2022.02.09.11.22.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Feb 2022 11:22:48 -0800 (PST) Subject: Re: Lazy load of org-protocol To: emacs-orgmode@gnu.org References: <9b140f0a-c75e-cf00-0f83-67e5a660935c@gmail.com> <62519b3f-d1fa-4497-e32f-2a0960c4d1fe@gmail.com> <450a25ba-e1f5-16db-c953-92fef0bfdc1a@gmail.com> From: Jim Porter Message-ID: <1dd55e54-7677-2764-1b6d-eda0a278bc3f@gmail.com> Date: Wed, 9 Feb 2022 11:22:47 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::632 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644435728; 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:dkim-signature; bh=0BjMowpshgMHZs0cz4pOyMhzZgePx5nBCgz2jADDpb8=; b=s2V5pGKt45Xm623oCTu0suxLxgYwehgcs/WUNHnhVy3PFKLI0xHMUdVlgA2SM4oT/I964H jDizIz8r0qQpgoPUKflYuLOS0nfnxu6+YH/fPkrIlTauxXTStvpax2wx3bxZk9uQoIJpgv rl8uUdjqKa+7OYlprw/Z9ZLte0ToXLDKSk5yHhxopIQYzQnTOz4aRy/NJKrgNYn0UVNpsD ixgGRELGmWl+81uKzPqWsfGViZLMEm3bOEBNq9tSFoMn8FrFEkVV68wEqO85aEHuDXnvkE 94kVE8q2J0LNrHmKKjat30rminpSV0p3DwNNoe1v3uXXQAQh7S7lgukZZ245+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644435728; a=rsa-sha256; cv=none; b=bphKKfpppLOPXOrWN55YGrQ1waz45SeTnCcHBS4w9+nTzIBOnLIFbecf1x9ZrWAMkYUMWs ocmChID6/QBwcCngW3FzMCksw7rkVos+hRdEhRiT8GXZXZEpNJD24bD25NFdM/RJ1J13Lr Q4KVRYJKOk1YjkvpbkQ6Yf1C1b/MH+bytVjuVAKNxCCLYlRxlZCBvBlxFmj3KbhItYX7zl VA9v7ShKXuMCLaLpugklxHh9kITlj0KsrtUPfB998XUhUraDWWVIFJzj6z4N3hg/aLvc1y rJuez7Y7t7fA+eyHRiq7AxbufxdfdnCCn/PljZO3e7QRWqglUnZxDVE8S1mgCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VsbsEuKl; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -9.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VsbsEuKl; dmarc=pass (policy=none) header.from=gmail.com; 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-Queue-Id: CB2BB37097 X-Spam-Score: -9.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: SAsooRT1CjVa On 2/9/2022 8:46 AM, Max Nikulin wrote: > It is not a problem to implement --apply in addition to --arg. [snip] For the purposes of this issue, I think either solution would probably work. It probably depends on what people think on emacs-devel. >> On a related note, there is still an issue with `--eval' in some >> cases. It fails to work with emacsclient when invoking an alternate >> editor: >> >>    emacsclient --alternate-editor emacs --eval '(message "hi")' >> >> If Emacs isn't already running, that will open a new buffer named >> '(message "hi")'. I think that's just a bug in how emacsclient handles >> `--eval', though fixing it would make org-protocol links work more >> reliably (if they used `--eval' as proposed, that is). > >     emacsclient --alternate-editor '' --eval '(message "hi")' > > But it makes it harder to use it during debugging when -Q -L > ~/src/org-mode/lisp options are required. Right, invoking the main Emacs instance as a daemon (i.e. when --alternate-editor is the empty string) works pretty differently from invoking the main Emacs instance directly (i.e. when --alternate-editor is "emacs" or somesuch). In the former case, emacsclient starts "emacs --daemon" and then tries to reconnect to the daemon; in the latter, it just takes the arguments passed to emacsclient and forwards them (well, some of them) to emacs. The end result is that it runs "emacs '(message "hi")'", which isn't correct. It'd be nice to fix the behavior of "--alternate-editor emacs" so it passes the --eval flag along too. This might be tricky though, since the semantics of --eval aren't quite the same for emacs and emacsclient. For emacs, --eval means that just the next argument is Lisp code; for emacsclient, --eval means that *all* subsequent (positional) arguments are Lisp code. In practice though, I don't think fixing this is actually *required* to fix the issue of how org-protocol is handled. It only causes issues for the subset of people who use "--alternate-editor emacs" or something similar. - Jim