vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
643 stars 90 forks source link

make: cask: No such file or directory #214

Closed hongyi-zhao closed 1 year ago

hongyi-zhao commented 1 year ago

See my following testing:

$ git log -1
commit 7ff6293a25baaae65651b3e1c54b61208279a7ef (HEAD -> master, origin/master, origin/HEAD)
Author: Davide Masserut <dm@mssdvd.com>
Date:   Sun Apr 2 21:48:25 2023 +0200

    Ensure pixel-scroll-precision-mode deactivation

    Setting `pixel-scroll-precision-mode` to nil is not sufficient to disable
    the mode locally.

    Updates: #124

$ make -s
Using Emacs 30.0
make: cask: No such file or directory
make: *** [Makefile:49: .cask/30.0] Error 127

Then I run the steps here, but see the following chaos in pdf buffer:

image

How to fix it?

Regards, Zhao

hongyi-zhao commented 1 year ago

See here for more discussions:

Re: use pdf-tools in Emacs.


From: Hongyi Zhao
Subject: Re: use pdf-tools in Emacs.
Date: Wed, 26 Apr 2023 10:01:24 +0800

On Tue, Apr 25, 2023 at 11:10 PM Rudolf Schlatte <rudi@constantly.at> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > I try to use pdf-tools [1] in Emacs, but meet the following problem:
>
> Have you tried M-x pdf-tools-install RET ?

Yes. This way works.

> That command compiles the
> helper program that pdf-tools needs to display pdfs.  Also see the
> documentation of `pdf-loader-install`, which is another function
> provided by pdf-tools that I think is meant to be added to the user's
> init.el file.

In fact, I already have the following configuration in my init.el
file, but it doesn't seem to automatically compile and install
pdf-tools:

(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 ‘pdf-tools-install’ and
  ;; makes Emacs load and use PDF Tools as soon as a PDF file is
  ;; opened, but not sooner.
  ;;(pdf-loader-install)
  )

Regards,
Zhao

vedang commented 1 year ago

As explained in the thread, this bit of configuration works with use-package

(use-package pdf-tools
  :ensure t
  :init
  (pdf-tools-install))

I will add this to the documentation (or would really love a PR adding this to the README under the INSTALL section). Closing the ticket.

hongyi-zhao commented 1 year ago

In fact, the current document is break:

image