From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 ADqEGR/xLmP+6wAAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 13:59:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WEKiGB/xLmPbggEAG6o9tA (envelope-from ) for ; Sat, 24 Sep 2022 13:59:27 +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 15CA62F26D for ; Sat, 24 Sep 2022 13:59:24 +0200 (CEST) Received: from localhost ([::1]:55232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc3oZ-00086F-Cv for larch@yhetil.org; Sat, 24 Sep 2022 07:59:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc3fk-0007wh-PX for emacs-orgmode@gnu.org; Sat, 24 Sep 2022 07:50:17 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:34589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc3fi-0004CZ-Ow for emacs-orgmode@gnu.org; Sat, 24 Sep 2022 07:50:16 -0400 Received: by mail-lf1-x134.google.com with SMTP id j16so4062268lfg.1 for ; Sat, 24 Sep 2022 04:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:cc:to:references :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date; bh=iSNgWeD3/9m+qKNS1amzdKqtJcn0gODHeKTYU5brfF8=; b=L8sfe2QZrGCrMj5vVTEFFN/RXVuztm2dJ7CUSz/EW96Fd7mfBTKqAEVPN9nQXOC46B 2EXLWPiJBNz9i0chN1hYse50Ps36ycUgU9DGYNGnZKtCBjqZYjcdTTvtQGQTuSKN1XK/ DaPPB6BBquXdHtpzFNPon/DmVUbyajDaQ9v1FJcGOB5cqzo154pCB6mK/LcQKS7GnoUm Mw7Jqs6pgcvs/5q+We9dCZcOs6FKzan3eu5Z/RBF5uY3aPnSl3fwAutk/iNFCRdYyERV AAWww7b+IKVmsIHnJ2R+JamfL3W9+Cki3xzB1Kzbt6bFJf4zdeq5WKkVclQa4jZEXEv1 gF/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:cc:to:references :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date; bh=iSNgWeD3/9m+qKNS1amzdKqtJcn0gODHeKTYU5brfF8=; b=IimccnV+XrKzues1zwGNyzhodMa3l/H+i0EOKJZaJLxwvmGVXkV32LaqlBhOQzZYjR 0/YjFiG37buYlG2xThfx98QLy3mW0GFMzQa81kYMYRx5dyp1Y0eeEQ4lFzxmgJQ/s5VY +edgkCwYduFpl6THiSi6/0Ohq/UHdwaKJ1mI7k92WDCvQZ5iyx/FpKqJ7iIryvO+m9XA G2VGIO/k6OUtTDCZASmamPb6FKczHyPBq12Mv6NmjhqUYkn4oaaJsAc2uzg2AaNxy5em of2p+gcz5VGFiUBjg7070ipnbHjNfwLEKWiwU+o5/KZ/SgYRdLDg+zj9LUxePIRPJj8C QBhA== X-Gm-Message-State: ACrzQf0Z4yM+ZzEdd4fMwPkq2MCRWfDJFKGZIYWrVNXTa7HZJR7NF//l BVldNIs2aTWTYPSZVYRN8s0Nkb629d4XLw== X-Google-Smtp-Source: AMsMyM6Hq6LYXfl/oHmoymJUIbqC050abTRN6ikJpfJ5MW5joATH7UWvg5IG4s06qKJUkFNRjHCtqg== X-Received: by 2002:a19:6555:0:b0:49e:7d52:a4ca with SMTP id c21-20020a196555000000b0049e7d52a4camr5410098lfj.198.1664020212069; Sat, 24 Sep 2022 04:50:12 -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 a9-20020ac25209000000b0048a9603399csm1872025lfl.116.2022.09.24.04.49.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Sep 2022 04:49:51 -0700 (PDT) Message-ID: Date: Sat, 24 Sep 2022 18:49:29 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Opening of links Content-Language: en-US References: <563301a7-1ad2-e155-636e-a2b8814b608d@emse.fr> To: emacs-orgmode@gnu.org Cc: Guillaume MULLER From: Max Nikulin In-Reply-To: <563301a7-1ad2-e155-636e-a2b8814b608d@emse.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=manikulin@gmail.com; helo=mail-lf1-x134.google.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 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=-2.118, 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" 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=1664020765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=iSNgWeD3/9m+qKNS1amzdKqtJcn0gODHeKTYU5brfF8=; b=l7ZDzyXnVaY7lnN1T6mkR5E30P15+TD+6cVadX6NJEwDJv+OHNFCEqUWKe957F+lEDApFx u3IkJyVwGrJo6aDQ8gPQ25vYKWjGM52X/PjeItkg3+9YgE2VE6U4duEjeaswZroRY4VAwM bNMg2x2sjBYEuqBIZnqp+9UZi86K7xcB6zth0N4MQEUEpqNl5fYP3GWm5UQ+clASkvdGc5 tODKrXh45JOmwQALjd3BvPET568cvQdHNiYBGeqKeY1GC7/K5LO+0BcHBKtemyitSHdOSJ eWJxLXs3fn5DCW0/d2uK9HReEKLEXtk53+SQV7KaYBBdOBU2bor0PNb5dglasA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664020765; a=rsa-sha256; cv=none; b=QgiH1wYeqlH9qF/ueUZPevZur+8gVdzrUd3AHugGResuBWUBR197vi9W9rOgLvM9wKnFKZ xTZKSIPLiewTvI8qycBVkcwX9j4Cp2Nh+qcRnQT100ldFD0hpHOp0U5ZBGyKfdWBuCQ0Tr dpv86KZkiSpbojYoRgT1YGzD6Ma+ciU+LxetFBcxh6iJdllyRL6v+6LKML5WgzMt4jIEnX xufTmsDTdaeX5rCJ9frg+75DTWPcKb/+S306aZvH16uQtx+GtpF7/qXR78MsuxdH0es16c +9wccKNCt5UAIl1WitC8FZdFlXt2KNDzqOQAAwonJ1jIaj1fQgzGudyrcGgxCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=L8sfe2QZ; dmarc=fail reason="SPF not aligned (relaxed)" 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: 7.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=L8sfe2QZ; dmarc=fail reason="SPF not aligned (relaxed)" 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: 15CA62F26D X-Spam-Score: 7.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: m22ottuP4vB4 On 23/09/2022 21:49, Guillaume MULLER wrote: > > - My OS settings are configured so that PDFs are opened in Evince. I > configured this with "xfce4-settings-manager > Default Applications" > (which runs "xfce4-mime-settings" under the hood) and it can be verified > with "xdg-open test.pdf" or by opening Thunar and clicking on "test.pdf". I would name it desktop environment configuration since OS may have more settings and it is your issue. These settings likely alters ~/.config/mimeapps.list https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html "Association between MIME types and applications" Unfortunately Emacs does not support this part of XDG specs, so there are no ready to use functions to work with .desktop files and MIME associations. You may add entries calling xdg-open for file types you wish to the `org-file-apps' custom variable. >   So, where in the world does org-mode/Emacs finds that it should use > Calibre instead of Evince? You may have mailcap configuration where Calibre has higher priority than Evince, check /etc/mailcap RFC 1524. A User Agent Configuration Mechanism For Multimedia Mail Format Information https://www.rfc-editor.org/rfc/rfc1524.html Emacs has limited support of mailcap and it is used by Org mode. Besides system configuration, Emacs has a set of predefined association. Unfortunately the latter is broken in Emacs-27, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40247 #40247 - 27.0.90; mailcap-mime-data erased when parsing mime parts - GNU bug report logs > - Now, I would like to circumvent this global OS behavior, so that Emacs > itself would be used specifically to open PDF links in files I open in > Emacs. When I was using Vanilla Emacs, I was advised to use pdf-tools, > and given a config that was working. I translated that into my DoomEmacs > config.org as follows: >   (use-package! pdf-tools >     :magic ("%PDF" . pdf-view-mode) >     :config >       (pdf-tools-install :no-query) >     ) >   But apparently it does not override org's (default) behavior of > opening PDF file with external tools. The code of `org-open-file' is tricky. You may instrument this function for debugging and step through it to realize what actually happens. Maybe pdf-tools vs. doc-view mode choice is controlled by `auto-mode-alist'. Concerning external viewer configuration, you may adapt for Evince the following approach: Max Nikulin. Re: Org mode links: Open a PDF file at a given page and highlight a given string. Sat, 3 Sep 2022 20:00:47 +0700. https://list.orgmode.org/tevj61$17d8$1@ciao.gmane.io