Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewing pdf files with different org-mode version throws an error #283

Open
freddyholms opened this issue Jun 12, 2024 · 0 comments
Open

Comments

@freddyholms
Copy link

freddyholms commented Jun 12, 2024

Describe the bug
On a fresh install of emacs, I have reduced my config file to the following simplest case:

(use-package org
  :straight `(org
	      :fork (:host nil
			 :repo "https://git.tecosaur.net/tec/org-mode.git"
			 :branch "dev"
			 :remote "tecosaur")
	      :files (:defaults "etc")
	      :build t))

(use-package pdf-tools
  :straight t)
(pdf-tools-install)

When I try to view a pdf, I get the following stacktrace

Debugger entered--Lisp error: (void-variable org-format-latex-header)
  #f(compiled-function () #<bytecode -0x14765911616dbdc8>)()
  funcall(#f(compiled-function () #<bytecode -0x14765911616dbdc8>))
  eval((funcall #'#f(compiled-function () #<bytecode -0x14765911616dbdc8>)))
  custom-initialize-reset(pdf-annot-latex-header (funcall #'#f(compiled-function () #<bytecode -0x14765911616dbdc8>)))
  custom-declare-variable(pdf-annot-latex-header (funcall #'#f(compiled-function () #<bytecode -0x14765911616dbdc8>)) "Header used when latex compiling annotations.\nThe ..." :type string)
  byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\301\310!\210\301\311!\210\301\312!\210\301\313!\210\301\314!\210\315\316\317\320\321\322..." [display-buffer--action-custom-type require pdf-view pdf-info pdf-cache pdf-misc pdf-util facemenu faces org tablist cl-lib seq custom-declare-group pdf-annot nil "Annotation support for PDF documents." :group pdf-tools custom-declare-variable pdf-annot-activate-handler-functions funcall function #f(compiled-function () #<bytecode 0x19800016fe914>) "A list of functions to activate a annotation.\n\nThe..." :type hook pdf-annot-default-text-annotation-properties #f(compiled-function () #<bytecode 0x19800016fe914>) "Alist of initial properties for new text annotatio..." (alist :key-type symbol :value-type sexp) pdf-annot-default-markup-annotation-properties #f(compiled-function () #<bytecode 0x19800016fe914>) "Alist of initial properties for new markup annotat..." (alist :key-type symbol :value-type sexp) make-obsolete-variable pdf-annot-default-annotation-properties "0.90" #f(compiled-function () #<bytecode 0x180a3585469b023f>) "An alist of initial properties for new annotations..." (cons :tag "Label" (const label) string) (cons :tag "Contents" (const contents) string) (cons :tag "Color" (const color) color) cons :tag "Icon" (const icon) choice mapcar #f(compiled-function (icon) #<bytecode 0x1daff62dbbd4d0bc>) ...] 24)
  pdf-annot-minor-mode(1)
  pdf-tools-set-modes-enabled(t nil)
  pdf-tools-enable-minor-modes()
  run-hooks(change-major-mode-after-body-hook special-mode-hook pdf-view-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook special-mode-hook pdf-view-mode-hook))
  run-mode-hooks(pdf-view-mode-hook)
  pdf-view-mode()
  set-auto-mode-0(pdf-view-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
find-file-noselect-1(#<buffer test.pdf> "~/Downloads/test.pdf" nil nil "~/Downloads/test.pdf" (19394 45))
  find-file-noselect("~/Downloads/test.pdf" nil nil t)
  find-file("~/Downloads/test.pdf" t)
  funcall-interactively(find-file "~/Downloads/test.pdf" t)
  command-execute(find-file)

Steps to Reproduce the behaviour
Just launch emacs with straight.el set up and with the above init.el, then open a pdf file. For some reason, the second time I try vieweing the pdf, it works fine. I can actually reproduce without a pdf, just by (require 'pdf-annot).

What is the expected behaviour?
It should work fine on the first try.

Desktop
Please complete the following information:

  • OS: Debian Trixie

  • Emacs Version: "GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
    of 2024-05-15, modified by Debian"

  • Poppler Version: 24.02.0-5

Your pdf-tools install
Please complete the following information:

  • pdf-tools Version: 1.1.0
  • pdf-tools (use-package pdf-tools :straight t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant