that_guu · 2022-03-21 08:30
So it appears that pdf tools just broke. I don't know why. When I lunch emacs i get the following errors:
Error (use-package): Failed to install pdf-tools: Package ‘pdf-tools-’ is unavailable
Error (use-package): pdf-tools/:config: Symbol’s function definition is void: pdf-occur-global-minor-mode
in my .emacs file i have these lines to configure pdf tools:
;; PDF files-------------------------------------------------------------
(use-package pdf-tools
:pin manual
:config
(pdf-tools-install)
(setq-default pdf-view-display-size 'fit-width); open a pdf in pdf-view mode
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward); use isearch
:custom
(pdf-annot-activate-created-annotations t "automatically annotate highlights"))
I tried M-x package reinstall pdf-tools, but for some reason I can't find the pdf-tools package.
I really don't know what happened.
I use Arch, and i3wm. My version of emacs is 27.2
Edit: [My emacs config file](https://github.com/PKpers/my-emacs-config/blob/3dc42fb985476bd53a4f30529c416d2900b7e7d7/.emacs)
holgerschurig · 2022-03-21 09:40
Maybe you compile it manually? E.g. go to the directory where it is located and run "make" inside it.
After this try (in a scratch buffer) `(require 'pdf-tools)`. If you see an error, run `M-x toggle-debug-on-error` and require again. Now you should see a backtrace. Maybe this backtrace is enlightening you.
When it works, try the require with pdf-occur (this is where pdf-occur-minor-mode is located).
arthurno1 · 2022-03-21 11:48
> Error (use-package): Failed to install pdf-tools: Package ‘pdf-tools-’ is unavailable
Seems like your Emacs can not download pdf-tools. See you have correct repository in your package-archives, Melpa is OK:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
Either execute that in your scratch buffer and try to install pdf-tools afterwards, or add it to your init file and see how it works.
that_guu · 2022-03-26 12:23
I have the following lines in my init file:
(require 'package)
(setq package-archives '(("melpa". "https://melpa.org/packages/")
("org". "https://orgmode.org/elpa/")
("elpa". "https://elpa.gnu.org/packages/")))
I tried the lines you proposed, but i had no luck. I'm still getting the same errors...
Something that seems interesting to me is that I can't find pdf-tools listed when I'm doing `M-x package-show-package-list`
darkblu32 · 2022-03-28 08:17
How about trying to use PDF tools that is alternative [**PDF software**](https://www.bitwarsoft.com/pdf-converter) to Adobe Acrobat Dc and it is free to download and install. Besides, it provides all the useful PDF tools that you need which include Split PDF, merge PDF, convert PDF, compress PDF, rotate PDF, and others useful tools. Try it out!
that_guu · 2022-03-28 08:28
I will check it out, thanks
darkblu32 · 2022-03-31 08:13
Alright you can just try it, and if you need any help just look for the article for online PDF tool in it!