From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +EY2EiL1PmC0bgAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 02:32:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +MYPDiL1PmDfDgAA1q6Kng (envelope-from ) for ; Wed, 03 Mar 2021 02:32:02 +0000 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 7BA01F530 for ; Wed, 3 Mar 2021 03:32:01 +0100 (CET) Received: from localhost ([::1]:54434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHHIu-0003ih-9C for larch@yhetil.org; Tue, 02 Mar 2021 21:32:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHHIJ-0003iO-CW for emacs-orgmode@gnu.org; Tue, 02 Mar 2021 21:31:23 -0500 Received: from mout01.posteo.de ([185.67.36.65]:39244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHHIH-0004mA-4f for emacs-orgmode@gnu.org; Tue, 02 Mar 2021 21:31:23 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B143216005C for ; Wed, 3 Mar 2021 03:31:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614738676; bh=0/C0y1I4Gwl3o/2sUjwAacK4u+nD1A8wKucxdoBB87A=; h=From:To:Cc:Subject:Date:From; b=SraG8ShdLL3EjNJlfOLK7jP5fmDyeJKzk9WFUJuIPazZxaYjwp9aEI6eRFX6zTJXW HSCUawiHki3I1Nq++fbmalLFcJn3vuSadJlzQDVhSc2y7imu2smXF2VEWpebFEVu08 8oxlGaSuLFKseAln2+saon7uFjV0zCNgbLu3TzDnjcbZcdhX2YjMrKblCvjBUOMKYo 595bHSpxfXezffeINpgkbX7LH58UjMiG5f7MKy/ebIcBH0lhD5z9/qBdBvfl7iqlcR RCXIdvhBVhef0vquVLTjs8e7TEgAgGswiP1Hc/mX3NNFxsg3D6TtZloYxnDPJ2tk+l A38OwdvATdtYw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dqyfq60fcz9rxM; Wed, 3 Mar 2021 03:31:15 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Rodrigo Morales Subject: Re: Org mode links: Open a PDF file at a given page and highlight a given string References: <87lfb5pbej.fsf@gmail.com> Date: Wed, 03 Mar 2021 03:31:15 +0100 In-Reply-To: <87lfb5pbej.fsf@gmail.com> (Rodrigo Morales's message of "Tue, 02 Mar 2021 15:07:32 -0500") Message-ID: <87lfb5c6j0.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614738721; 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=dpSWn2qP4nSha0rEL5kViDa3TjF6Ltws1nUSUefRf9M=; b=GIw4YHFlBlXAw4W1BjzWVfH+mYRfOFIjp73tevPOTtbm5c2ZPgYqHM4PgXwA614XCYv38t lQl8I8lTg20Q5TSg+ROqW+cRcNE8jeQCKCeYjJbS3EamlwFw5evspzhe64bhriD+0HrnnU fILKJJXgoOpAM8jrvkFl81dpfhlsLFRbf/YrALAdgf0BfHTumWCXXBIIgendvH7gaEnLHI 48qANHPPbMDe8AK2Xa/l3NsatFGd3AaCYjTzJn98XezCeo8A9Fhk6WhiDokINgxpldeTQ6 ETaFa3nefL4lYkq8/C74yQHTg9q8Jd6EFM8dl3T2fo4iEbprU8qb2wJ/4kPDOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614738721; a=rsa-sha256; cv=none; b=E3NFVVHhYXbw2kNn5ohcRtEqBU649gYZyhK14Q7Ssp8SHy3HJ+rdcNAs4cPB0y6mFllvFY kg7njl61/dv6z4BKFczyJ5uLGNcbgn1thQ4YRXliD2sMz3ph1udQbOu5/9LAS5g1w7vzXQ jjSOdLhx9/FQ1+vhtWaY+Qh1DFXxlw4IJBhuO0Phq6o2oZ8Mi8VtMYcLJ8+5H97lYSHYtZ jOqTkDiAJwqD6MpfW2JZOYRu+20kjK6V+/UzQ5r1k89BHvH6XndezGkFbxF1IZ6HWn2zuo QhHIzLbbUtU7BEH++q1ApdDWVd26w+v346UyR7b5RTBASYKBeh7Qpqxn85wAag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SraG8Shd; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SraG8Shd; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7BA01F530 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: yPq5wYxakDBY Hi Rodrigo, Rodrigo Morales writes: > I want to be able to > > + create a Org link to specific pages of a PDF. I've managed to > accomplish this by setting the following value. > [ ... ] > + create a Org link to specific pages of a PDF and highlight a given > string. A possible alternative, which gives you more control over the link, is `org-link-set-parameters'. For example: #+begin_src emacs-lisp (org-link-set-parameters "pdf-pag" :follow (lambda (path) (let ((pag (if (string-match "::\\([1-9]+\\):*:*\\(.*\\)" path) (match-string 1 path) (error "no pages"))) (clean-path (expand-file-name (replace-regexp-in-string "::.+" "" path))) (str (when (string-match "::\\([1-9]+\\)::\\(.+\\)" path) (match-string 2 path)))) (start-process-shell-command "zathura" nil (concat "zathura " clean-path " -P " pag (when str (format " -f '%s' " str))))))) #+end_src And then: #+begin_src org [[pdf-pag:~/Downloads/grub.pdf::95::do]] #+end_src Best regards, Juan Manuel