From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0FTjGmT+o2ItQwAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 04:31:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kHjJGWT+o2K8RwEAG6o9tA (envelope-from ) for ; Sat, 11 Jun 2022 04:31:00 +0200 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 1929D12271 for ; Sat, 11 Jun 2022 04:31:00 +0200 (CEST) Received: from localhost ([::1]:54438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzqtv-0008Iu-7h for larch@yhetil.org; Fri, 10 Jun 2022 22:30:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzqtP-0008Ii-Ep for emacs-orgmode@gnu.org; Fri, 10 Jun 2022 22:30:27 -0400 Received: from ciao.gmane.io ([116.202.254.214]:33914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzqtN-0007rq-PV for emacs-orgmode@gnu.org; Fri, 10 Jun 2022 22:30:27 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nzqtJ-0002Ml-No for emacs-orgmode@gnu.org; Sat, 11 Jun 2022 04:30:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: org-capture firefox extension broken [silently] Date: Sat, 11 Jun 2022 09:30:11 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 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: 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, 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654914660; 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=4jpzlbG1I/cQ2NzkuqgMZdHB2cgIDXvCE/Eay/hIvow=; b=KvaT5ycjKOJujRkA06UNhNbPHOlrygx157uGEeMMbNbZcsJxxgkwspxzySfHTwjCCMKmxy IYL18cn8I+dt6ZQxU1ckloLPiqKlVxDhJguUS3+Da1DnveEWoGO9ul01pp0Rk+K4+EWyzT HxaMKrzeEU19qKcmxPA7rYVS6UdUwaBcmtvomemKl42bcF0PuzkBmh2mlmBTlSds7nAZ14 4Ep2aXGjxPHq/+EZWN6zQZ09qM30OEOdb6APUZ03BOd9YpYjyn0smCchCNYfvx4pjoDfgA 6pHLUAjxZIOYcoF6Z9Ww6w8xj5kKo0y0or9Rdydxlb6qeL7tJdyPeQgHL6u76Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654914660; a=rsa-sha256; cv=none; b=FSBP/H5X+/v/fzONr/tPpotUUHHjjBJOk73Dx/uDtDSWWa+Rhdr2lLgd7v/yobnYR4cAiE hzPjQKd1+nNHWS35PaavAU+luvecsLUCgR8f8qYdIx0C/gouyNwliU7vFOMtyF8JOYAKZa 47ZHGfT+QXtPpE6P7T5CEtwo9mkvoBkntUtcafyqTCN1nPDJRgfSnd8vEBxQIORlpWhRXE dFeIcoiqqnt9YIiQciqmGriOHLklB5bvcJZsADzqh745QCJkMlg8+otaBka9I14uDw+188 sIvv/UeEEroOtY9oA2Ywww55OoWBGeNeL1y5fTk9OV1saZNkI83a7dpM5ruMFg== 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.72 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: 1929D12271 X-Spam-Score: 2.72 X-Migadu-Scanner: scn1.migadu.com X-TUID: qzV9v3i32zT4 On 11/06/2022 08:43, Samuel Wales wrote: > On 6/10/22, Max Nikulin wrote: >> - Have you tried to check that org-protocol still works on your system? >> xdg-open 'org-protocol:/org-capture?url=something' > > i ran this from emacs shell mode bash cli as user. it brought firefox > to fg, opened a new tab, and the tab has a search page in my default > search engine that says "org-protocol:/org-capture?url=something" in > the search box. is that correct? First of all, I recommend to run such command in a terminal application instead of Emacs. I do not remember which of Emacs shell modes executes commands asynchronously (eshell?), so xdg-open fails e.g. for Gnome or KDE. Having fluxbox you should be affected in less degree. Another point is that when shell running emacsclient is associated with a terminal then emacs might try to create a frame inside this terminal. I am unsure concerning your preferences for capture windows, but it is better to factor out Emacs as shell here. Actually you have found the source of the problem. A handler for org-protocol is not configured in your environment, so xdg-open falls back to a browser and firefox falls back to search engine. It is not a problem of the browser add-on. >> Prevented navigation to “org-protocol://capture?template=p&url=https%3A%2F%2Fplanet.emacslife.com%2F&title=Planet%20Emacslife&body=This%20month” due to an unknown protocol. "unknown protocol" confirms the conclusion. Check that the ~/.config/mimeapps.list (or maybe ~/.local/share/applications/mimeapps.list) file contains the following sections and entries therein (unsure exact name of your desktop file) [Added Associations] x-scheme-handler/org-protocol=org-protocol.desktop; [Default Applications] x-scheme-handler/org-protocol=org-protocol.desktop; Or ~/.local/share/applications/mimeinfo.cache has [MIME Cache] x-scheme-handler/org-protocol=org-protocol.desktop; I just have realized that for kde-open5 it is enough to have mimeinfo.cache entry. Gnome without "Default Application" entry shows its own application selection dialogue. When there is no handlers like kde-open5 specific to desktop environment, xdg-open may scan .desktop files. It seems, you have some problem with your .desktop file for org-protocol. Check that you have it in ~/.local/share/applications/ and try the command specified in the Exec field in a terminal (with some org-protocol URI). An entry in ~/.local/share/applications/mimeinfo.cache is usually created by update-desktop-database ~/.local/share/applications and entries to ~/.config/mimeapps.list may be added by xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol or something like xdg-settings set default-url-scheme-handler org-protocol org-protocol.desktop The latter actually calls the former. To check that files are updated: xdg-mime query default x-scheme-handler/org-protocol xdg-settings get default-url-scheme-handler org-protocol If it is still broken then it is time to inspect output of sh -x /usr/bin/xdg-open 'org-protocol:/org-capture?url=something' >> - Have you tried to create a html page with an org-protocol link and to >> click on it? > > no clue what i would do to do that. For example, create an org file with some link, export it as HTML, edit the result to use the URI from "Prevented navigation" error in and open this html file in Firefox. Using org-protocol URI as link target in an org file is possible as well, but additional setup may be required to avoid treating it as unknown target. By the way, https://github.com/sprig/org-capture-extension/ has some instructions. They are not perfect, but they are still in some points better than worg page for org-protocol.