From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kJkaFqZddmPiSAEAbAwnHQ (envelope-from ) for ; Thu, 17 Nov 2022 17:13:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CKbrFaZddmNdNwAAauVa8A (envelope-from ) for ; Thu, 17 Nov 2022 17:13:26 +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 151072E082 for ; Thu, 17 Nov 2022 17:13:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovhV5-00042E-49; Thu, 17 Nov 2022 11:12:27 -0500 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 1ovhV2-0003xf-P8 for emacs-orgmode@gnu.org; Thu, 17 Nov 2022 11:12:24 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovhV0-0006ro-5l for emacs-orgmode@gnu.org; Thu, 17 Nov 2022 11:12:24 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ovhUy-0002G8-4t for emacs-orgmode@gnu.org; Thu, 17 Nov 2022 17:12:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Debugging firefox extension (Re: idea for capture anywhere in x) Date: Thu, 17 Nov 2022 23:12:10 +0700 Message-ID: References: <87tuw31iub.fsf@mm.st> <87r0zelo7e.fsf@posteo.net> <875yg7qiyb.fsf@localhost> <875yfj8nf7.fsf@localhost> <877czyguhp.fsf@localhost> 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:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: 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: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.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.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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.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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668701602; 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=HgHashpnVnCHAMLJT8deC7mgYtxc8cYQexGc9pYGenc=; b=ugbjK1fpipW5htmA4ptRTZzp4StLDze/N5IzovxywPryuDxZDuc1BN/HUKs95D7FqzV72a 8/SEoswKGC1Ofu0/Rfd9Q/MAXVVGLn2YT6F/SZmSqHh9L360o2Z4HCuo7DOxcPhZ3okVx8 yxOaov1v8YNiNVkuv7TcJPMBnfWT+XArPxrHbVb5GeKK4nSKIIAWwaMMTxkXd0A0TkghS/ 4s0y/KsWsG1aJ8pMKNhCMovK2oM+8Q9zuDJtW6nLqGYSj6TBP+TZvXFZBu284jwkLrCveK 24zsKQfjMCpXVoGTNYgbrJpuZ4jXjBxubfoStDIOlT6+5qp5ealVMkp0Sx3LPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668701602; a=rsa-sha256; cv=none; b=H31RyVW9pqW+QW14hkeZYc1X18WchbBbPLs7W4UeI2W1FLGkvtUhICAFr99OgoQMUvPm72 hsvteLYdfd/55MJ8SYc3tAsvIrCmE+GduLWox0QRc1fMHzMqh7I72jIPStCWeBIpqSGxyf ucn61BzGydD46y/xMIR9BxODQ16WjJS15AzDDsojtXkPQyokRqZM0Y1oRODBuMN2XdbVkV nUxmKuPE64w8Wa2xvQwjgdIOY3jIsw8BmO683pxMBL9Mb+fxHg9zdqQBB2GLFpfewjHSWD 1f0+xEkTg9czDsIMpk8VhMj1joOpVkXhnMpnjXM8edCw0w6vANKsuItw/zlzhw== 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+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: 2.37 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+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: 151072E082 X-Spam-Score: 2.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: rArdq3Dt1PbU On 17/11/2022 10:16, Samuel Wales wrote: > On 11/16/22, Max Nikulin wrote: >> Since recently we were discussing desktop notifications and temporary >> rising emacs window, I am unsure if capture indication is related to the >> firefox extension, notification daemon, or emacs. > > my brain is not connecting the first part of your sentence with the > second part [this has to do with my brain, not your english], I was writing about notify-send (or d-bus function) called in the case of successful capture and notification-daemon or dunst: Samuel Wales. Re: desktop notifications (Re: idea for capture anywhere in x) Wed, 26 Oct 2022 01:07:18 -0700. https://list.orgmode.org/CAJcAo8sp3dyUT0b8=3T1YeiQZzmDYS9Zah_6+LdczWHicnVX=w@mail.gmail.com I am unsure if your managed to add such feature to your configuration. > but i > have been assuming that it is the firefox org-capture extension saying > "i sent the request". Check browser console for warnings and try to call emacsclient with some org-protocol: URI from xterm or another terminal application (I would avoid Emacs shell buffers for such tests). > pop up emacs frame for a fraction of a second, which then, in elisp, > pops back down again. To raise and lower an existing window perhaps something like wmctrl, xdotool or fluxbox-remote should be used. Remaining withing Emacs I would consider temporary creating a new frame and dismissing it. I am unsure concerning focus stealing protection in window managers that may hide such window. A simple command that might be a substitute to notification windows: zenity --timeout 1 --info --title 'Title' --text 'Text' There are a number of dialog tools similar to zenity: lightweight or integrated with desktop environments. I have no idea which one you may have installed and if it has timeout feature or sleep&kill workaround should be used instead. However I believe that not running some notification daemon may cause problems with various application. >> More robust approach is a native messaging application that is a bridge >> between sandboxed firefox extension and emacs. It makes setup more >> complicated however and no simple org-protocol extensions use this >> approach. > > not sure i understand what native or sandboxed mean here or why, and > whether org-protocol is needed or if you are saying that there might > be a non-simple-to-install extension for it or so. Browsers create sandboxes for web pages and extensions to isolate them from host system. There is an API that allows communication of an add-on with particular helper application running on host system: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging A dedicated naive messaging helper allows to check emacsclient exit code or stdout. The price is more complicated configuration. Of course, an extension should support such communication protocol.