From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OBpfMLbREWQFgwAASxT56A (envelope-from ) for ; Wed, 15 Mar 2023 15:09:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yOY5MLbREWSdPQAAauVa8A (envelope-from ) for ; Wed, 15 Mar 2023 15:09:58 +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 7F7332051 for ; Wed, 15 Mar 2023 15:09:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcRoV-0004QR-F4; Wed, 15 Mar 2023 10:09:11 -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 1pcRoU-0004Q6-2V for emacs-orgmode@gnu.org; Wed, 15 Mar 2023 10:09:10 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcRoS-0002P8-4o for emacs-orgmode@gnu.org; Wed, 15 Mar 2023 10:09:09 -0400 Received: by mail-lj1-x234.google.com with SMTP id l22so1493435ljc.11 for ; Wed, 15 Mar 2023 07:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678889345; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=H6s1KPEsHT8DsE4+njFwWKGwY545/YxaokMqJzLwOtg=; b=YNCWwIZACY5qtikfb/1FKgDw3G7KS83gZCyw81secXsr66tQytJ9721Yd0F3XF7zoE FdCeEzY3s3UAfCYHCAXCyRHQ95DombK1PKW7wL7KexxLi5zkWgS3BcuW26eGrK0Rmca+ ULAQSFO8z1N7U0pvjjxpgYFW6yPBqShEMbRka0D+Y3AM+OJNHJqwFgZyh/dPeOoDujf+ 3LYzqb5LZmrnIdJz9YYYp6o1X39Qg+RS/H2y+BSqLW/aJF9apwVDTd488jAdSdYnI85a aFnBERLByJeR6T9TLqcCwZlL+RypiXfiRUOTYIhvu07a1TCtfYDnzwKlwpDJDyDTz2NZ aszw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678889345; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=H6s1KPEsHT8DsE4+njFwWKGwY545/YxaokMqJzLwOtg=; b=RVPcGJPafhQ54lBnILXZImxTxPMIpYTHGVBdCDiy9Bh0M894mb/mW+Azwyz3U/krnN JAeQ7ppfqxoQmLHiBYD3DpeP8eOndV0eclqsapogepvnFOuFena3N+QAKcU0dbQN1itZ 1DUJ0gsS7JVK8YTZn1coWZHxTsQ4NgjeywM4HHHK2U65leYGbxDc6w/zEFdndz24hghW 5K1VEBWGOplgYHa+SHKSCkm+ZZGiaGRfKGZPqP0wTF4GKQ+FV8U6lKhHzQXLa6543zPA Mx6MphOaBbZneokNt8OlDxymGh0cUKyFRaomNd1T2jlokllndwCDo0ufQkmau7N8PzbF JhQw== X-Gm-Message-State: AO0yUKXOn0hoDrqyx+NMxUggWMz8Bdj6YRYoi2rj79bRcCWGYpx6CcYF EvH7vLTBPm0vW+2v0sd2DW4= X-Google-Smtp-Source: AK7set9h73An83q/rMbenPCnAKilmbtLTneTXC5K3nvGtJR7mPfCP2jyvbqmZllSprkmaUUCONp3fg== X-Received: by 2002:a2e:bc20:0:b0:298:a7f4:850a with SMTP id b32-20020a2ebc20000000b00298a7f4850amr1173852ljf.32.1678889345149; Wed, 15 Mar 2023 07:09:05 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id 20-20020a2e1654000000b00295a8d1ecc7sm885386ljw.18.2023.03.15.07.09.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Mar 2023 07:09:04 -0700 (PDT) Message-ID: Date: Wed, 15 Mar 2023 21:09:02 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: Find-file using org-protocol Content-Language: en-US To: Kai Ma , emacs-orgmode@gnu.org References: From: Max Nikulin Mail-Followup-To: Kai Ma , emacs-orgmode@gnu.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=manikulin@gmail.com; helo=mail-lj1-x234.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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YNCWwIZA; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678889398; a=rsa-sha256; cv=none; b=N6E0mVbK8YMd6fomO7AeQeKDuT4RlhCuAIOih+aDqyBYNamuVVClSnGBF/eiQ16ZC40pF/ uJYL2nabogbxpSSDUiYM3FTr0zGKpogFczmVUmbaoV8Cp5eYbegYcXS+RiVW4G2Vx8QO2f KTaObYKk/8Cgk+piisEMEup2bUYqoY9hb4KyHKkLDFczqZ+LW/txYHmkkIcv7NyLjFRE8j 4qhZYJg36byYf8f4xVNAuvwmtxhUld9KQ6SmrmAbDCeYVkYY7omD+wMOEHEDs/JbMsE1hj HQdpEPkF11xsDR5h5CbtZ/QrJjwx99FrD5dei/0lGRr/86u/znvB1jLw8nRINA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678889398; 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=H6s1KPEsHT8DsE4+njFwWKGwY545/YxaokMqJzLwOtg=; b=qstxMpJ5vwId9sABINXDyjrUF9q63bFZlUgycga91FwAEDn0secqHUli32/yv96qg6R3ir LzQDygopXVuq+jtgHSAHPA+60dg7h2u++XWuZw4uhyQPlKPNRoUl/Uup9Fy+QXr0cDGbig CluUdqceuOJV6p7ApW2aiqYIiTh/5Z2jcMf5cckAt7U0o3GcYCEMRoZzws7ik+yIkKzEDM mO4FKiaj67m+R/CX06/yUxEKrpUoqOhTBjl9siNoCUQthk2Nv56A8aI+/eJ3Nz1ay3eZpS G85Ib01Qtxyacv7xzlLxAYwgcs8lPio6TvAWq2I3BF4He9pyLzf984CzguTr/w== X-Migadu-Spam-Score: -0.43 X-Spam-Score: -0.43 X-Migadu-Queue-Id: 7F7332051 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YNCWwIZA; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: SElguleRDDf6 On 15/03/2023 10:41, Kai Ma wrote: > > I’m using org-protocol to open local files in an Emacs client. Yes, > this is weird, but it is required for some Electron apps, because they > do not allow calling arbitrary commands. ... > It works, but there’s a minor annoyance: the buffer it opens is not > associated with the client. And killing the client won’t kill the > buffer it creates. Do you really need org-protocol for this purpose? I would suggest direct call of your function using --eval similar to `message-mailto` in https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient-mail.desktop I admit that it is tricky to safely pass an argument to emacsclient, see https://debbugs.gnu.org/57752 #57752 28.1.91; emacsclient-mail.desktop doesn't work for me. However instead of long Exec entry in the desktop file I would use a script with *single* %u argument. The reason is a Firefox bug that may cause lost of everything besides the command and the URI.