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 mANSIdLTKWOK4QAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 16:53:06 +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 0B1gINLTKWPQCAAAG6o9tA (envelope-from ) for ; Tue, 20 Sep 2022 16:53:06 +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 1E119188C3 for ; Tue, 20 Sep 2022 16:53:06 +0200 (CEST) Received: from localhost ([::1]:43916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaecS-0003X8-U3 for larch@yhetil.org; Tue, 20 Sep 2022 10:53:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaboT-0007v8-TP for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 07:53:22 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:45729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaboQ-0004IM-29 for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 07:53:17 -0400 Received: by mail-pg1-x534.google.com with SMTP id h188so2303039pgc.12 for ; Tue, 20 Sep 2022 04:53:13 -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=g8wI6lsG/uzxlqedykkGwTWEvUiuA2y9Y3ZurDHr/GM=; b=IahXnK5iwNVpG8a22Km6Fq/4xAnmX10mOxfNPMA3OuLABAmGDhk0p+Hb7gpSd9Xj9Q KDqZQHfZtPpU/Sj4q1ov80QiUw6yALHhUfNbFF8kwLjzMIrmdTFGM50hGUQY9sLiNtbQ Hc8+drqZ5K6NwWjbQoJlOJwSQrl1Od8xn6bVwV8xvg1ENqlaxx/jbjfKBqszgaki1C0t hnAoOtVTYYPmlDukYUE+KVcEnqqENt2vimmWJM+Y57FMhALQNOeej6c84nqAxdoOguWo URrF5ZWg6EEpeC+FrHAlvs8DvvGLE8MYxohZPRGQEcLNvhLkfMSVbwPTxs5hzpUqzTTu GZ2w== 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=g8wI6lsG/uzxlqedykkGwTWEvUiuA2y9Y3ZurDHr/GM=; b=tEIumvx6qoO9eYIKlzNt4cdFR8S0tdrTVxw0le37Us+r6bGT1tsCKJJkSmJr0Sd3Ig 38uNscnfntwJW0/9dtT3LSyeDH/G7tK0cDvH0faQTEmBKuwGMDtvlvitdf7j8T6cU7Z9 oP1AKBpcvedkKSwUuLuiOtTy5pduPiVBlAAtj4ww6Pp66TikdaBcCGyAfahileXryNQ3 EVHKToeuv9aMKS+elRcebaLoGRAedOMEtFpVJPz+3WIvoxfEEm23poktwc+lNMOwHyk0 aAy3Eame/JcnEprSotgPwcNd7gjnsc+Tq6oB1rm/FbnAd0S3Jr9tRDCJ0omJnHS/5sKM gcVw== X-Gm-Message-State: ACrzQf0ldK0/hoivDbfnLcNDY+0PF/IEsIlYOmQTi1kyU6wZGASSQhMn Wxx2Tf/7BFHf/3fpZrBBrEE= X-Google-Smtp-Source: AMsMyM5LWe69JSRNmmGAnTfUIFU5xh4U5+gJh1b55L7vwLnalz9vIwDJ1wlZhM2cqq9wFxrhMDJtKw== X-Received: by 2002:a05:6a00:228c:b0:542:e65c:98 with SMTP id f12-20020a056a00228c00b00542e65c0098mr22795978pfe.79.1663674792485; Tue, 20 Sep 2022 04:53:12 -0700 (PDT) Received: from localhost ([2409:8a70:2b5:ad00:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id j8-20020a654d48000000b0042ba1a95235sm1396398pgt.86.2022.09.20.04.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 04:53:11 -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> Date: Tue, 20 Sep 2022 19:54:02 +0800 Message-ID: <87r106z2g5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=yantar92@gmail.com; helo=mail-pg1-x534.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=1663685586; 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=g8wI6lsG/uzxlqedykkGwTWEvUiuA2y9Y3ZurDHr/GM=; b=O1QMoLWrHmDhcv0gW3kCCLKaRqNpFLRqrHRHWNLlW2g7orC1cAkveZbeVzUWm7+b/6BL0H E5jm10qy0Ufr8DJ98rlg/EGBfTpko6KngN0NZoOwztbvlBKCBJ1tYK2024gxAyXZDrD3Nq wmg8Zjv4viCEnCocQ77WdsIaRBZhgow9gGMA0CWb87EHU3giMvdvEfXIJxBwg/LtFLSeKf 6igDQTGmhiiwJB7h/AfNQ2lJDu9vgfWUddgiiw1l5/DPSptXluMR1+XbnnYdJ3dwT1jOxE JaHM205cnDa2M+LrfxR4wnmEt+EeTT/I3TmpL4mgDA4DeGs2cCq6fQfBKHkcAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663685586; a=rsa-sha256; cv=none; b=iIgedFlgu7gp6XGe+Z+YEb33/hZsrCLjLEc6pW/TMBThKlqE2339GHm3+LERK9zcIv61X8 ap8vADP04e7SOqzgke45rv9NONZ/ITbVsYeYg1DpB4ly1DfBW6he4ZL8de/oDgSFZKZ2xY auIT69dm/EV/Isv5Gd8HEy4Ub1OBups5eB0aCn14dHq7vQokPMYABc87/ym8oA6rVsyDmq bQxvNqKtGrUr/ocA5Sw0CyZmaTLkKAvbPMlYUxLCMr96y6TDG0px6el57wREengqx0Ujbm faKcZ5muxuX07DGJss6kNqO2SmIJtLvLJUhFZlDQ62Ob3K0dwbBjoRGJEq9X1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=IahXnK5i; 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: -1.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=IahXnK5i; 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: 1E119188C3 X-Spam-Score: -1.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: hgehxSgDUJ+D Max Nikulin writes: > Currently I believe that instead of injecting up to 6 entries into > `org-file-apps' for various combinations of page, anchor, and search > pattern, it is better to add single record with function handler. Notice > that the approach presented above is not affected by the bug with > multiple regexp group. Its additional advantage is that shell is not > involved, so peculiar file names can not cause execution of some code > when quoting and escaping are messed up. > > I think a set of functions for popular PDF viewers (evince, zathura, > okular, xpdf, xpopple, firefox, chromium & Co., etc.) should be defined > in some package, but I am in doubts if it suitable for Org core. > > Proof of concept implementation. Thanks for taking time to implement this proof of concept! 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. 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). 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. -- 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