Giter Site home page Giter Site logo

Comments (11)

politza avatar politza commented on August 22, 2024

Does it work if you eval this

    (setq pdf-tools-enabled-modes
          (remq 'pdf-misc-size-indication-minor-mode
                pdf-tools-enabled-modes))

and then open a new pdf file ?

After the error message I enter pdf-view-mode but when I try to look
at the pdf as a picture with C-c C-c the same process repeats itself.

I don't quite understand this, as C-c C-c in pdf-view-mode switches to
doc-view-mode.

from pdf-tools.

HakanHolmberg avatar HakanHolmberg commented on August 22, 2024

When I evaluate the code you suggested the first part of the error message disappears and what remains is

Error during redisplay: (eval (number-to-string (pdf-view-current-page))) signaled (error "Lisp nesting exceedsmax-lisp-eval-depth'")

What I see when I open a pdf file in pdf-view-mode is the underlying file content of the pdf file and I used C-c C-c out of old habit trying to toggle to the png images as you do in doc-view so that was the reason . I can access the png image of the document through C-c C-c using doc view but really want to use pdf-tools (hence this message)

please tell med if you need any more information and thank you for your work, emacs was in desperate need of a good pdf viewer

from pdf-tools.

politza avatar politza commented on August 22, 2024

Please eval this

    (setq pdf-tools-enabled-modes nil)
    (add-hook 'pdf-view-mode-hook
              (lambda nil
                (setq mode-line-position nil)))

and then open a new PDF file and see what's happening.

Was your Emacs build with PNG support ?

    (image-type-available-p 'png)

What's the value of

   system-configuration-features

?

from pdf-tools.

HakanHolmberg avatar HakanHolmberg commented on August 22, 2024

After evaluating

(setq pdf-tools-enabled-modes nil)
(add-hook 'pdf-view-mode-hook
(lambda nil
(setq mode-line-position nil)))

I get the following erroe message when I try to open a pdf

image-mode-window-get: Lisp nesting exceeds `max-lisp-eval-depth'

further on

(image-type-available-p 'png) evaluates to t

and

system-configuration-features evaluates to void, It seems like I do not have that variable defined

Do you think anything would change if I upgraded to emacs 24.4? As I understood, the function image-mode-window-get is part of image-mode.el that is used by doc-view. I read about som issues with this function but I am to much of a newbie to try something on my own. I gatherer som system settings from the emas bug report function, do not know if that is equivalent to system-configuration-features.

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.1 LTS

Configured using:
`configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
'--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
value of $LANG: sv_SE.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t

best regards
Hakan

from pdf-tools.

politza avatar politza commented on August 22, 2024

Do you think anything would change if I upgraded to emacs 24.4? As I
understood, the function image-mode-window-get is part of
image-mode.el that is used by doc-view. I read about som issues with
this function [...]

Yes, it's a problem in image-mode-winprops which was fixed in
revsision 112716. But there are some more problems with 24.3. I'll
look into it.

from pdf-tools.

politza avatar politza commented on August 22, 2024

Please checkout and try the latest version. It should work now with Emacs
24.3.

from pdf-tools.

HakanHolmberg avatar HakanHolmberg commented on August 22, 2024

After reinstalling the old error message disappears but I get a new one when I try to view a pdf

pdf-view-desired-image-size: Invalid function: pdf-util-window-pixel-width

with the same result as the former one, I am not able to view the image only the underlying file content.

from pdf-tools.

politza avatar politza commented on August 22, 2024

You need to reload the package or restart Emacs.

from pdf-tools.

HakanHolmberg avatar HakanHolmberg commented on August 22, 2024

I did that but nothing changed, It seems to me that my best bet is to simply update emacs so that all functions are defined

from pdf-tools.

politza avatar politza commented on August 22, 2024

The undefined function pdf-util-window-pixel-width is the result of
reinstalling a new version over the older one.

Please delete it via list-packages, restart Emacs and reinstall
pdf-tools.

from pdf-tools.

HakanHolmberg avatar HakanHolmberg commented on August 22, 2024

It is up and running, thank you so much for your help

from pdf-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.