Not being able to install and use pdf-tools or anything related to org-pdf

This page summarizes the projects mentioned and recommended in the original post on /r/DoomEmacs

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • org-pdftools

    A custom org link type for pdf-tools

  • First I tried config from here - https://emacs.stackexchange.com/questions/19686/how-to-use-pdf-tools-pdf-view-mode-in-emacs but the package in unmaintained, so I used https://github.com/fuxialexander/org-pdftools

  • straight.el

    ๐Ÿ€ Next-generation, purely functional package manager for the Emacs hacker.

  • ;; -*- no-byte-compile: t; -*- ;;; $DOOMDIR/packages.el ;; To install a package with Doom you must declare them here and run 'doom sync' ;; on the command line, then restart Emacs for the changes to take effect -- or ;; use 'M-x doom/reload'. ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;(package! some-package) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; https://github.com/raxod502/straight.el#the-recipe-format ;(package! another-package ; :recipe (:host github :repo "username/repo")) ;; If the package you are trying to install does not contain a PACKAGENAME.el ;; file, or is located in a subdirectory of the repo, you'll need to specify ;; `:files' in the `:recipe': ;(package! this-package ; :recipe (:host github :repo "username/repo" ; :files ("some-file.el" "src/lisp/*.el"))) ;; If you'd like to disable a package included with Doom, you can do so here ;; with the `:disable' property: ;(package! builtin-package :disable t) ;; You can override the recipe of a built in package without having to specify ;; all the properties for `:recipe'. These will inherit the rest of its recipe ;; from Doom or MELPA/ELPA/Emacsmirror: ;(package! builtin-package :recipe (:nonrecursive t)) ;(package! builtin-package-2 :recipe (:repo "myfork/package")) ;; Specify a `:branch' to install a package from a particular branch or tag. ;; This is required for some packages whose default branch isn't 'master' (which ;; our package manager can't deal with; see raxod502/straight.el#279) ;(package! builtin-package :recipe (:branch "develop")) ;; Use `:pin' to specify a particular commit to install. ;(package! builtin-package :pin "1a2b3c4d5e") ;; Doom's packages are pinned to a specific commit and updated from release to ;; release. The `unpin!' macro allows you to unpin single packages... ;(unpin! pinned-package) ;; ...or multiple packages ;(unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) (package! evil-tutor) (package! org-super-agenda) (package! pdf-tools) (package! org-noter) (package! org-noter-pdftools) (package! org-pdftools) (package! org-pdfview) ;;(package! org-pdfview) ;; (package! ein)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • org-noter

    Emacs document annotator, using Org-mode

  • ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;; Place your private configuration here! Remember, you do not need to run 'doom ;; sync' after modifying this file! ;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; clients, file templates and snippets. (setq user-full-name "John Doe" user-mail-address "[email protected]") ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here ;; are the three important ones: ;; ;; + `doom-font' ;; + `doom-variable-pitch-font' ;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for ;; presentations or streaming. ;; ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; font string. You generally only need these two: ;;(setq doom-font (font-spec :family "SF Mono" :size 16 :weight 'semi-light) ;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) (setq doom-font (font-spec :family "SF Mono" :size 14 :weight 'light)) ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: ;;(setq doom-theme 'doom-one) (setq doom-theme 'doom-vibrant) ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! (setq org-directory "~/org/") ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. (setq display-line-numbers-type nil) ;; Here are some additional functions/macros that could help you configure Doom: ;; ;; - `load!' for loading external *.el files relative to this one ;; - `use-package!' for configuring packages ;; - `after!' for running code after a package has loaded ;; - `add-load-path!' for adding directories to the `load-path', relative to ;; this file. Emacs searches the `load-path' when you load packages with ;; `require' or `use-package'. ;; - `map!' for binding new keys ;; ;; To get information about any of these functions/macros, move the cursor over ;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). ;; This will open documentation for it, including demos of how they are used. ;; ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. ;; display time in 24 hr format with day and date in mode line (setq display-time-24hr-format 1) (setq display-time-day-and-date 1) (display-time-mode 1) ;; show battery percentage on mode line i laptop (unless (string-match-p "^Power N/A" (battery)) (display-battery-mode 1)) ;; show relative line numbers on the right margin (defun linum-relative-right-set-margin () "Make width of right margin the same as left margin" (let* ((win (get-buffer-window)) (width (car (window-margins win)))) (set-window-margins win width width))) (defadvice linum-update-current (after linum-left-right-update activate) "Advice to run right margin update" (linum-relative-right-set-margin) (linum-relative-right-update (line-number-at-pos))) (defadvice linum-delete-overlays (after linum-relative-right-delete activate) "Set margins width to 0" (set-window-margins (get-buffer-window) 0 0)) (defun linum-relative-right-update (line) "Put relative numbers to the right margin" (dolist (ov (overlays-in (window-start) (window-end))) (let ((str (overlay-get ov 'linum-str))) (if str (let ((nstr (number-to-string (abs (- (string-to-number str) line))))) ;; copy string properties (set-text-properties 0 (length nstr) (text-properties-at 0 str) nstr) (overlay-put ov 'after-string (propertize " " 'display `((margin right-margin) ,nstr)))))))) ;; display line numbers accordingly (global-linum-mode 1) (setq global-display-line-numbers-mode t) (global-display-line-numbers-mode t) (setq hl-line-highlight 1) ;; Org Mode config ;; example keyword line - ;; (setq org-todo-keywords '((sequence "TODO(t)" "PROJ(p)" "VIDEO(v)" "WAIT(w)" "|" "DONE(d)" "CANCELLED(c)" ))) (after! org ;; custom icons for task stages ;;(setq org-todo-keywords '((sequence "โ(t)" "โฅ(o)" "|" "โœ“(d)" "โคฝ(r)" "โ™ฑ(c)"))) (setq org-todo-keywords '((sequence "โ(t)" "าจ(o)" "|" "โœ“(d)" "โ„ฅ(r)" "โ™ฑ(c)"))) ;; Setting Colours (faces) for todo states to give clearer view of work (setq org-todo-keyword-faces '(("โ" . (:foreground "yellow" :weight bold)) ("าจ" . (:foreground "cyan" :weight bold)) ("โœ“" . (:foreground "green" :weight bold)) ("โ„ฅ" . (:foreground "orange" :weight bold)) ("โ™ฑ" . (:foreground "red" :weight bold)) ))) ;;(eval-after-load 'org '(require 'org-pdfview)) ;;(add-to-list 'org-file-apps ;; '("\\.pdf\\'" . (lambda (file link) ;; (org-pdfview-open link)))) ;; configuring org-super-agenda ;;(use-package! org-super-agenda ;; ;; ;; run after org-agenda starts ;; :after org-agenda ;; ;; :init ;; (org-super-agenda-groups ;; '((:name "Today" ;; :time-grid t ;; :scheduled today) ;; (:name "Due Today" ;; :deadline today) ;; (:name "Important" ;; :priority "A") ;; (:name "Overdue" ;; :dealine past) ;; (:name "Due soon" ;; :deadline future))) ;; ;; :config ;; (org-super-agenda-mode) ;;) ;;(use-package org-noter ;; :config ;; ;; Your org-noter config ........ ;; (require 'org-noter-pdftools)) ;; ;;(use-package org-pdftools ;; :hook (org-mode . org-pdftools-setup-link)) ;; ;;(use-package org-noter-pdftools ;; :after org-noter ;; :config ;; ;; Add a function to ensure precise note is inserted ;; (defun org-noter-pdftools-insert-precise-note (&optional toggle-no-questions) ;; (interactive "P") ;; (org-noter--with-valid-session ;; (let ((org-noter-insert-note-no-questions (if toggle-no-questions ;; (not org-noter-insert-note-no-questions) ;; org-noter-insert-note-no-questions)) ;; ;;(org-pdftools-use-isearch-link t) ;; ;;(org-pdftools-use-freestyle-annot t) ;; ) ;; (org-noter-insert-note (org-noter--get-precise-info))))) ;; fix https://github.com/weirdNox/org-noter/pull/93/commits/f8349ae7575e599f375de1be6be2d0d5de4e6cbf ;; (defun org-noter-set-start-location (&optional arg) ;; "When opening a session with this document, go to the current location. With a prefix ARG, remove start location." ;; (interactive "P") ;; (org-noter--with-valid-session ;; (let ((inhibit-read-only t) ;; (ast (org-noter--parse-root)) ;; (location (org-noter--doc-approx-location (when (called-interactively-p 'any) 'interactive)))) ;; (with-current-buffer (org-noter--session-notes-buffer session) ;; (org-with-wide-buffer ;; (goto-char (org-element-property :begin ast)) ;; (if arg ;; (org-entry-delete nil org-noter-property-note-location) ;; (org-entry-put nil org-noter-property-note-location ;; (org-noter--pretty-print-location location)))))))) ;; ;;(with-eval-after-load 'pdf-annot ;; ;; (add-hook 'pdf-annot-activate-handler-functions #'org-noter-pdftools-jump-to-note)) ;;) ;;config for ein package ;;delete cell ;;(define-key ein:notebook-mode-map "\C-c\C-d" ;; โ€™ein:worksheet-delete-cell) (use-package pdf-tools :defer t :config (pdf-tools-install) (setq-default pdf-view-display-size 'fit-page) :bind (:map pdf-view-mode-map ("\\" . hydra-pdftools/body) ("" . pdf-view-scroll-down-or-next-page) ("g" . pdf-view-first-page) ("G" . pdf-view-last-page) ("l" . image-forward-hscroll) ("h" . image-backward-hscroll) ("j" . pdf-view-next-page) ("k" . pdf-view-previous-page) ("e" . pdf-view-goto-page) ("u" . pdf-view-revert-buffer) ("al" . pdf-annot-list-annotations) ("ad" . pdf-annot-delete) ("aa" . pdf-annot-attachment-dired) ("am" . pdf-annot-add-markup-annotation) ("at" . pdf-annot-add-text-annotation) ("y" . pdf-view-kill-ring-save) ("i" . pdf-misc-display-metadata) ("s" . pdf-occur) ("b" . pdf-view-set-slice-from-bounding-box) ("r" . pdf-view-reset-slice))) (use-package org-pdfview :config (add-to-list 'org-file-apps '("\\.pdf\\'" . (lambda (file link) (org-pdfview-open link))))) (defhydra hydra-pdftools (:color blue :hint nil) " โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” Move History Scale/Fit Annotations Search/Link Do โ”‚ PDF Tools โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ^^_g_^^ _B_ ^โ†ง^ _+_ ^ ^ [_al_] list [_s_] search [_u_] revert buffer ^^^โ†‘^^^ ^โ†‘^ _H_ ^โ†‘^ โ†ฆ _W_ โ†ค [_am_] markup [_o_] outline [_i_] info ^^_p_^^ ^ ^ ^โ†ฅ^ _0_ ^ ^ [_at_] text [_F_] link [_d_] dark mode ^^^โ†‘^^^ ^โ†“^ โ•ญโ”€^โ”€^โ”€โ” ^โ†“^ โ•ญโ”€^ ^โ”€โ” [_ad_] delete [_f_] search link _h_ โ†pag_e_โ†’ _l_ _N_ โ”‚ _P_ โ”‚ _-_ _b_ [_aa_] dired ^^^โ†“^^^ ^ ^ โ•ฐโ”€^โ”€^โ”€โ•ฏ ^ ^ โ•ฐโ”€^ ^โ”€โ•ฏ [_y_] yank ^^_n_^^ ^ ^ _r_eset slice box ^^^โ†“^^^ ^^_G_^^ -------------------------------------------------------------------------------- " ("\\" hydra-master/body "back") ("" nil "quit") ("al" pdf-annot-list-annotations) ("ad" pdf-annot-delete) ("aa" pdf-annot-attachment-dired) ("am" pdf-annot-add-markup-annotation) ("at" pdf-annot-add-text-annotation) ("y" pdf-view-kill-ring-save) ("+" pdf-view-enlarge :color red) ("-" pdf-view-shrink :color red) ("0" pdf-view-scale-reset) ("H" pdf-view-fit-height-to-window) ("W" pdf-view-fit-width-to-window) ("P" pdf-view-fit-page-to-window) ("n" pdf-view-next-page-command :color red) ("p" pdf-view-previous-page-command :color red) ("d" pdf-view-dark-minor-mode) ("b" pdf-view-set-slice-from-bounding-box) ("r" pdf-view-reset-slice) ("g" pdf-view-first-page) ("G" pdf-view-last-page) ("e" pdf-view-goto-page) ("o" pdf-outline) ("s" pdf-occur) ("i" pdf-misc-display-metadata) ("u" pdf-view-revert-buffer) ("F" pdf-links-action-perfom) ("f" pdf-links-isearch-link) ("B" pdf-history-backward :color red) ("N" pdf-history-forward :color red) ("l" image-forward-hscroll :color red) ("h" image-backward-hscroll :color red))

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts