From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: use pdf-tools in Emacs. Date: Thu, 27 Apr 2023 20:30:02 +0200 Message-ID: <87edo52mtg.fsf@gnu.org> References: <87r0s5efab.fsf@frege.mail-host-address-is-not-set> <87edo5bc61.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11878"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.3; emacs 30.0.50 Cc: stefan-husmann@t-online.de, help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 27 20:38:25 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps6Vd-0002w3-9f for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 27 Apr 2023 20:38:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ps6VC-0000er-8C; Thu, 27 Apr 2023 14:37:58 -0400 Original-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 1ps6VA-0000cF-35 for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 14:37:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ps6V9-0007RD-9B; Thu, 27 Apr 2023 14:37:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=84LbRrh+2y3Fz7pbBMFrIbEYVLZUU30BrJUtAV8Nle8=; b=Z6ggAiIvJHCTGB UAZlmIDD21zVAVKPFtnCEaAjTcZI77CSEtKu9Xk3xLHIneNBZegmRzqN/hJCCsqc9r5ma55nZ7Sbz PlWAEMKwpg6fJNx4IACGSj63ZJPC0yKqXDBl99SHZZ1uO12VMzjlxcC4ZVMU/P2pv10CS2fOvDJjg zgUilkHlWZlwI2vKR5JlESk/fxQamAYUlE4/12xfcobbN3rGW71XUUYT/Jf+GRmDsnPnuY3AEq3Nh C950S/6GfAyu2ODm3CGjsM7ttQLrI4bI3wPt/RcWn3SZNfwXtohcKQ2CpFrkl0drWL1tf2qpjmSRW QBCkAAaa3NoBjXLNQL8Q==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps6V8-0002xn-Ur; Thu, 27 Apr 2023 14:37:54 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 6B0B027C0054; Thu, 27 Apr 2023 14:37:54 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 27 Apr 2023 14:37:54 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduiedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepvfgr shhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrh hnpeehtdehieeuledvhfevfeevjeeljedvgeegfeduueevvddufffgteeikeevjeekgfen ucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhs ohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdroh hrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Apr 2023 14:37:50 -0400 (EDT) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143426 Archived-At: Hongyi Zhao writes: >> >> (use-package pdf-tools >> >> ;;https://github.com/jwiegley/use-package#magic-handlers >> >> :magic ("%PDF" . pdf-view-mode) >> >> :config >> >> (pdf-tools-install :no-query) >> >> ;; C-h o pdf-loader-install RET >> >> ;; This function acts as a replacement for =E2=80=98pdf-tools-insta= ll=E2=80=99 and >> >> ;; makes Emacs load and use PDF Tools as soon as a PDF file is >> >> ;; opened, but not sooner. >> >> ;;(pdf-loader-install) >> >> ) >> >> >> > >> > Indeed this does notinstall anything. use-package is about loading, >> > not installing. Use package.el or straight.el (or any other package >> > manager) for installing. >> >> Well, you can add a :ensure t clause to the use-package recipe and it >> will tell package.el to install the package. > > It seems that this is not true. I can assure you that I have (use-package pdf-tools :ensure t :init (pdf-tools-install)) in my user-init-file, and that with this and just this, PDFs are opened automatically using its `pdf-view-mode' (instead of `doc-view-mode'). When I do `M-x package-delete RET pdf-tools RET' and restart emacs, it will automatically install it again which is the task of :ensure, see (info "(use-package) Install package"). After installing the package automatically, I'm also asked Need to (re)build the epdfinfo program, do it now ? (y or n) y which is then built and the output shown in a *compilation* buffer. Bye, Tassilo