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 OH/iBrk+0WNJhgAAbAwnHQ (envelope-from ) for ; Wed, 25 Jan 2023 15:37:45 +0100 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 KL/CBbk+0WPJWgAAG6o9tA (envelope-from ) for ; Wed, 25 Jan 2023 15:37:45 +0100 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 A1ADE21043 for ; Wed, 25 Jan 2023 15:37:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKgtQ-0005yH-5W; Wed, 25 Jan 2023 09:36:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKgtP-0005y8-G7 for emacs-orgmode@gnu.org; Wed, 25 Jan 2023 09:36:51 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKgtN-0000Bf-MK for emacs-orgmode@gnu.org; Wed, 25 Jan 2023 09:36:51 -0500 Received: from localhost ([::ffff:102.81.230.130]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000010B84E.0000000063D13E82.0000620E; Wed, 25 Jan 2023 07:36:49 -0700 Date: Wed, 25 Jan 2023 17:33:49 +0300 From: Jean Louis To: AW Cc: emacs-orgmode@gnu.org Subject: Re: Org mode links: Open a PDF file at a given page and highlight a given string Message-ID: Mail-Followup-To: AW , emacs-orgmode@gnu.org References: <87lfb5pbej.fsf@gmail.com> <87leqdxhr2.fsf@localhost> <13190256.uLZWGnKmhe@linux.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <13190256.uLZWGnKmhe@linux.fritz.box> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674657464; 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; bh=BmUiTA8P+T2uZzr/D0bw7bc2SDjFfj/H9rhB44+MTrA=; b=tdudxUlZV8ACvkhtfTLhr2yg78/i1GniF6Hjp1UN1N/woG3Fx4p/kfsl6Z92OBhREVGuSh 0JW+3YJlCq6Fbp3k+svXhbwBF1q8hSSVo025iKr0R3ZQuZKxo0HfXH2t1F54fZPSTI3WAl pxZBHHIhXQiTfJPJcR67TAcdykvlgnlOTMWuQ72GBm3f5lx7XRFxbm6rW4OyH7gZDeEn/g eCVhL9IJHSgAMQfPcnv3bIeVoVwmKUW3QKnL3fKYiaEtAwzZVzjB5giY85jQiFm+UjG4DL FJsOx9HZH2s4QLMyEmILD3VsrEKDZhozN+omCKDX+SqjgFjkyj3/Jdq2+4FF/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674657464; a=rsa-sha256; cv=none; b=VR4phnCB2qHHA0qn++Rkcv/lc6tNvoNZRNkDg0TSNjyP3XAi1/wXXNvLv2leCx67PWtE8N LRxKqbm7/FhThhIIS3bBKqwXh8E7ad2OTPup+W5gf2jzZ+dea2njMIGyVvM35evqfKHzPT Gg4E+fZ/pXjsftmBbAeL1YecXulZNq3nmgM5iNw48DfUVctGS5x+jiR6aB+522gP0X5Hv7 tTqCE38d3vD+quJflWwkHLiOxPZXcIgFSIBN+Yp9BK6ab+QJkTR2AfefiZazIx6XDxMG61 GuSGpnuYcD0cSKKrAgYttLXNyllLZ/4lDeaT4mgxwKHN5WMDzOvemG9+Axjg9Q== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none X-Migadu-Spam-Score: -2.38 X-Spam-Score: -2.38 X-Migadu-Queue-Id: A1ADE21043 X-TUID: 43ASmnXLOJR6 * AW [2023-01-25 14:48]: > Has this been done? I'm struggeling (again), how to link to a certain page of > a PDF, being opened in okular. > > ./link/xyz.pdf::123 does not open the pdf at p. 123 Simply do elisp: links with the below function: [[elisp:(rcd-okular "/home/user/my-file" 2 "small percentage")][small percentage]] (defun rcd-okular (file &optional page query-string) "Open `okular' on PDF FILE. PAGE is optional page number QUERY-STRING will be eventually found highlighted." (let* ((okular (executable-find "okular")) (args (list file)) (args (if page (append (list "-p" (format "%s" page)) args) args)) (args (if query-string (append (list "--find" query-string) args) args)) (name "*Okular*") (buffer (generate-new-buffer-name name))) (cond (okular (apply #'start-process name buffer okular args)) (t (user-error "Program `okular' not found"))))) -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/