From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 CD3gOUHNKmPzcwEAbAwnHQ (envelope-from ) for ; Wed, 21 Sep 2022 10:37:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iKTuOUHNKmPafQEA9RJhRA (envelope-from ) for ; Wed, 21 Sep 2022 10:37:21 +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 93127BC91 for ; Wed, 21 Sep 2022 10:37:21 +0200 (CEST) Received: from localhost ([::1]:41532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oavEO-0007nr-B1 for larch@yhetil.org; Wed, 21 Sep 2022 04:37:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oauvY-0006Uq-OS for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 04:17:52 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:41781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oauvW-00052V-LD for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 04:17:52 -0400 Received: by mail-pl1-x635.google.com with SMTP id p18so4883712plr.8 for ; Wed, 21 Sep 2022 01:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=lLyDEE81c5f0F+a9/2CGiby0kz3eRx3C+bTrmwfTLv4=; b=iNC7WkYy6N0ziaHCalQa97MKvMCc0p83xNHKur+TjO3sjpaXaAd1/N5WR7pXLexWOm HdVHi/kwlidb48bWr1Jw4e4DjOXmaLupOzy4MjjxdX8rh7mdrLi+DQvR1KzGnUZIn6WU 2cwiTeSo+Dg5WHjyNNceC6zvgQqxO1frxB0ctgTfi3/kZHNBL3ASrATV9U+zAd9VSXpF 5VoiUBTjtPcc72jw/7cNZpyR+hqbCJM9ood0saq4Em+lDDUQgBJBSAk2K5XIECkg6ygD 26mRvbdCBhuLO3sIyWHmca639iPZmd1OA/EUgeT5d11NTnzCVaJIBMtF0zxignjwim3H FvYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=lLyDEE81c5f0F+a9/2CGiby0kz3eRx3C+bTrmwfTLv4=; b=YxsM1i+EbKfM61ev3vv442pm0kucQkv7kesPWeUf6mw96S8yP9KUPrnjlkqo8GCcnA Dlel6LLXCWALsEtXoSxfBT/aQIiAoCNlpQ71nQ5UB8Xeu6oxM/SJ4bNRio5zXWpXo3n6 poi7tPLZ2CaSAmjGn8jrpZeSvbkRaQ3bTUfgtrtgJAs3BWMViQhuojtHWBG5yijldjoE z+AiHnOgBCPcjqxxkG6qhMX/5O8L1TOssQ9taU76u76x6Dw5Lb9XmAgIkq9iWZw4FZuf gUXNlP5gRULU7TEGKnMFiNoVnUgcHpXuT7ieWvKF0Cnw0FUi/KsIfWIQ8u5U0PuB5GOV Sqpw== X-Gm-Message-State: ACrzQf3H//GcRSvE+WTkVFlSnuJBvkNlaybbPegwJCc5aRYDAOpXWdIa mWUuklGFzONYvbspZrl+gqAXYQ4A9ek= X-Google-Smtp-Source: AMsMyM7aja2TpojAHksSr84YJwGvpWudPpJcKk/gHliJZ3wYpHYjbU6Hya0azPg2qoy/V2ybMdz1Qw== X-Received: by 2002:a17:902:8bc3:b0:178:8563:8e42 with SMTP id r3-20020a1709028bc300b0017885638e42mr3606715plo.0.1663748268157; Wed, 21 Sep 2022 01:17:48 -0700 (PDT) Received: from localhost ([1.83.154.224]) by smtp.gmail.com with ESMTPSA id y14-20020a62ce0e000000b0053e66f57334sm1455725pfg.112.2022.09.21.01.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 01:17:46 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Org mode links: Open a PDF file at a given page and highlight a given string In-Reply-To: References: <87lfb5pbej.fsf@gmail.com> <87r106z2g5.fsf@localhost> Date: Wed, 21 Sep 2022 16:18:41 +0800 Message-ID: <87leqdxhr2.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=yantar92@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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" 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=1663749441; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lLyDEE81c5f0F+a9/2CGiby0kz3eRx3C+bTrmwfTLv4=; b=MSZ8aNVDtN6+gYtt/eD5z0PDIfmp9o6kkIv1hBzP00EUpw/rVLh/QmErKZqjgVzj6KYM55 tzLRvLcB9Bn2JRXAPxU5Fr5HsyoQeCM357ijBybF1j89Gfrc+E7xovD2iO8BPcTPF+5f54 g5TXmO8RWOvi2L6GNj786aEOM0geqRCpQ9mgN6VOPaC0JCnZxS0JfTVCyf6TqOaHdd/vVd qCFYADOWT7yXnXbXDMSIS4Uo0//I1lbVM5wHnUjXU0asPgDR/Y50VfwZbiyFxSaDlA8A1X P29ZcwJNrIHuGh8LLprkBzU40X+u3X0XNMNRE4t3QnamC0im4mrqY8Cpt6A6jg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663749441; a=rsa-sha256; cv=none; b=lnTopmOgqJSpK8H5ryO5Heg+SqbZE+xiHtS+TQcIZ5tqbF6R2+58+wIBPnxLHIlyYYR4vw BijWecKIzPO/iR4YjvUMfwrZlrkmPAMht//xrEyjcdd+G3tUR7LWugeuoHBzKumLT3W+br lWrX1Hazvj1QxXl/JFbg3zH2owp8bSXpQiJVYCQW71j8NEovLKxEqLmGt0HXEwkj7gSkqx aV2C43lFmhR2YfnzhZz13macVcCrNSRo38ryJQIn8v3BZIqaskqf9CPoi9TkmM8yGsXGpw C5fjmql4MA5578KtSnC/9kJnL+H6F+4F203trlB1Y62SMKeY9cx/Y3dgjolg3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iNC7WkYy; 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: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iNC7WkYy; 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: 93127BC91 X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: LuwvTzShURkO Max Nikulin writes: >> I think that it is a very good idea for Org core to support search terms >> in file links that are handled by Free Software. > > Maybe I misunderstand something, but your stress on Free Software here > surprised me. I did not mention explicitly any proprietary application > such as Adobe Reader. On the other hand support of Chromium (that is > free) unavoidably assumes Google Chrome and likely MS Edge with other > derived products with same customization as chromium vs. > chromium-browser command name discrepancy in Linux distros. I was referring to GPL-compatible software. If we have better integration with Libre/Free Software, it is suitable for Org core. IMHO. >> Moreover, I think that we should, by default, auto-detect and use Free >> Software to open file links, when such software is installed on user >> machine (unless the user explicitly instruct otherwise). > > Could you, please, elaborate? E.g. for PDF file default is docview mode. > Unless a user has an override in `org-file-apps', likely it should be > used. Perhaps system-wide handler may be considered as a candidate, but > on linux it means XDG MIME handlers that is not supported by Emacs, so > only mailcap remains. Both XDG database and mailcap have no notion of > location within the file to open. I am referring to cdr of the org-file-apps entries. docview will correspond to `emacs' command. XDG will correspond to `system'. And we have `default', which could detect Libre Software, if installed. >> I see Free Software support as dedicated files like ol-evince, >> ol-okular, etc. The file functionality and common function may probably >> be factored out into ol-file library. > > I am considering a single package, something like org-pdfviewer, that > has definitions for all popular viewers: evince, okular, firefox, > chromium, etc. I believed that user should explicitly configure > preferred viewer by either adding an entry with supplied function to > `org-file-apps' or this package has its own defcustoms and the entry > injected to some variable as you suggested in > Ihor Radchenko. Re: [PATCH v2] org.el: Fix percent substitutions in > `org-open-file' Mon, 05 Sep 2022 13:46:41 +0800. > https://list.orgmode.org/875yi2xtj2.fsf@localhost > > The point of defcustoms in the package instead of (or in addition to) > `org-file-apps' is that evince and okular support more formats than PDF. I understand your idea. What I am suggesting is to implement support for a subset of popular viewers (the Libre ones) and add it to Org core. Support for non-Libre viewers could be added ad third-party packages based on the Org core implementation. The default viewer may be customized by user according to, say, org-file-apps-default-pdf-viewer defaulting to 'auto (detect). This customization will only take effect when the PDF file entry in org-file-apps sets the command to `default'. Hope I made my idea more clear. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92