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 COG7Co/JKmOTvwAAbAwnHQ (envelope-from ) for ; Wed, 21 Sep 2022 10:21:35 +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 eKrICo/JKmPOOgAA9RJhRA (envelope-from ) for ; Wed, 21 Sep 2022 10:21:35 +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 B8848AFC7 for ; Wed, 21 Sep 2022 10:21:34 +0200 (CEST) Received: from localhost ([::1]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oauz7-0005Zq-CG for larch@yhetil.org; Wed, 21 Sep 2022 04:21:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oauut-0005Wx-4Q for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 04:17:12 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:43608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oauuq-0004x5-Lk for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 04:17:10 -0400 Received: by mail-pl1-x62c.google.com with SMTP id l10so4872398plb.10 for ; Wed, 21 Sep 2022 01:17:07 -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=XcMQt4VVpiWOFRauBF0exNGBMmIL4XfZsDIKFfZz4CuUvQTUNNiWYr8VBGjUsjMIS+ NlERWtE7YM5YbO2M9tmiIVjehLNRnUOiMVo+uERtBXERW1LPDcKC23GK8hdb9RIe4n+X VQSG60aywbc7wrkSwoelADIe3ySB2oZStCUXoc4bD9iHK+6dlv0SZJOrrGEK+6cVj+WA FYF4qegxqvOxIaiXTzeSHnlYkoFc/PvX/FlTXIfWmQLorE5TLgUzEhwKBPqghQD9bGCr pSFlLvyftaoeii2Hd5INBwUvy4/koOjI7fuOFx9t0YL4LQug1teQ0BRpbRvN6cGtN9by 8NFg== 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=xrEpQWFH3VeiGGRrujUkMRkF6ybvGigBWNKb2hJ+Ri+/Vp6M4bVks2g+9htK9/l5BT AZim8ajCSDygFp3QCTPUU+B2BX5yyFO2pkarLkCOhxKzmkuR/8T0iBBI0nJ4Fe8w0mT7 vlFVAYm4wDzWw0L80qw8yj4cTUI7I+fvwMZOAaYnFGr3euF85tYT1m9HbH0BMx3ijQwC Y22qzBEnNXEyTi+x/gQLLq4XFEN9A+lN2q7pQTimXyuJZ51V6Y0x0v56P6JeSqZuLgkP mr0OpuPRajtbeRuZoVc1rHx/RxJp+yvX7vWtGBtTTCFINo+PULxQGYtFDQykzpBlRhPB xynw== X-Gm-Message-State: ACrzQf0drThgFMEe2mx+SXf6aNDEz+7Pu3iLjcwAEbjOxrB8I+sZImjE TgK4qEMuEOlQSdpdzBUJnTo= X-Google-Smtp-Source: AMsMyM48Ehj1Zx40YL2dni5nFf+25aucp+k7FOM1MA+sTdZqSJX5FIyf2p5Z3Gypxjl11Qx6fyQSfQ== X-Received: by 2002:a17:90b:17c3:b0:202:bc13:e4e7 with SMTP id me3-20020a17090b17c300b00202bc13e4e7mr8255830pjb.125.1663748226465; Wed, 21 Sep 2022 01:17:06 -0700 (PDT) Received: from localhost ([1.83.154.224]) by smtp.gmail.com with ESMTPSA id w24-20020a634758000000b004296719538esm1300796pgk.40.2022.09.21.01.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 01:16:56 -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:17:35 +0800 Message-ID: <87o7v9xhsw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62c.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=1663748494; 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=jl7mOhYDeO6ajgwvypyAE4yK//XAPsU6L6EnWqk4GfS7Eihw6rRXyxOE5vg/yusDjibNOa n8rldgz9iV4Gg4RAlJDQ+29G2LGUHK/Mpg07RDaUNv7DbkQPhyGaVN6wpe9Lv+sF7iCjBD NG0VFzW5v8E+BvmldzC0zoT8eo1HmyUapzIcw42jEg5gmLQUIG6IekeAA4gNQhh7EmrIe8 Zd5a2RSJW9oDvkAWyZ2j51CFDjbO7gw72ph53eUMX9F7PKmmf2J/8DXH6VXFawnShcv2uc 7A1qnYU4wUihfkygO3SqAtM9axeOFYOb/QudsbnTag8eLD7CxVXm/yc9MhiyuQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663748494; a=rsa-sha256; cv=none; b=nxrqQaPahydhnUukGKFHSnIe92YcNfBe0kHS8dJjhaIwZzNU4V/kgzCUIQX/hy0CkCeYnx ASRze6W7lquN8jtbSZNOd0xWaLTUgXbSLtMMMXXw0+BeQ9t+hmHdeFkjCCD+/Rz7qSs9Aa +Hr0HywV5JdvhYRsJ7pEpeE/+mHypKL4/2fh5Gym7va3+NSAn9c79EQF5cOf/AWaSSo3gM YuuT7K0/mHZ9UXujCgcOYZNRuWSZncBk2pRTZ1rkyynTkLjbt2NZ1LvAKH8NFMz9OxaGUV 9PEuP/11KabCCaCKt9wzbwtt+/qGKvsGLQqYAwpxBYgmno0UT2cYrYdU3ljO4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XcMQt4VV; 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=XcMQt4VV; 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: B8848AFC7 X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: H+TIB3PaE1GJ 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