rudolfochrist/interleave

pdf-view-new-window-function: Wrong type argument: number-or-marker-p, (("91")

windrg opened this issue · 1 comments

Hi I'm trying to install pdf-tools again from the ground.
And here's my configuration.


  (use-package pdf-tools
      :pin manual ;; manually update
      ;;:ensure t
      :config
      ;; initialise
      (pdf-tools-install)
      (setq pdf-info-epdfinfo-program "~/.emacs.d/elpa/pdf-tools-20180109.1234/epdfinfo")
      ;; open pdfs scaled to fit page
      (setq-default pdf-view-display-size 'fit-page)
      ;; automatically annotate highlights
      (setq pdf-annot-activate-created-annotation t)
      ;; use normal isearch ??? necessary to test or  improve by using evil search!!!
      (define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)
  )
  
  (add-hook 'pdf-view-mode-hook
	    (lambda ()
	      (linum-mode -1)
	      (beacon-mode nil) ;; to prevent blinking on entering this mode??? stil not sure this is corrent or incorrect
	      ))

But unfortunately it shows this chaotic result

%PDF-1.3
%����
14792 0 obj
<< 
/Linearized 1 
/O 14800 
/H [ 2456 3591 ] 
/L 2316604 
/E 73280 
/N 91 
/T 2020643 
>> 
endobj
                                              xref
14792 71 
0000000016 00000 n
0000001799 00000 n
0000002011 00000 n
0000002155 00000 n
0000002215 00000 n
0000002250 00000 n
0000002308 00000 n
0000002411 00000 n
...
0000035300 00000 n
0000048624 00000 n
0000071848 00000 n
0000071874 00000 n
0000072302 00000 n
0000072988 00000 n
0000002456 00000 n
0000006022 00000 n
trailer
<<
/Size 14863
/Info 14775 0 R 
/Encrypt 14794 0 R 
/Root 14793 0 R 
/Prev 2020630 
/ID[<2fe5dcbe7261fb84275f0327dad6dd27><2fe5dcbe7261fb84275f0327dad6dd27>]
>>
startxref
0
%%EOF
   
14793 0 obj
<< 
/Type /Catalog 
/Pages 14777 0 R 
/Outlines 14801 0 R 
/Threads 14796 0 R 
/Names 14799 0 R 
/PageMode /UseOutlines 
/PageLayout /OneColumn 
/OpenAction 14795 0 R 
/AcroForm 14798 0 R 
>> 
endobj
14794 0 obj
<< 
/Filter /Standard 
/R 2 
/O (��	I3�J�4��\(�e���T �>`���"�$R���)
/U ([_gJ��^:^\(��H���⛷o��7�$h�Fƛ�)
/P -44 
/V 1 
>> 
endobj
14795 0 obj
<< 
/S /GoTo 
/D [ 14800 0 R /Fit ] 
>> 
endobj
14796 0 obj
[ 
14797 0 R 
]
endobj
14797 0 obj
<< 
/I << /Title (�)>> 
/F 23 0 R 
>> 
endobj
14798 0 obj
<< 
/Fields [ 549 0 R 14838 0 R 14843 0 R ] 
/DR 569 0 R 
/DA (ViO��/ɺ��+���)
>> 
endobj
14799 0 obj
<< 
/Dests 14774 0 R 
>> 
endobj
14861 0 obj
<< /S 3723 /T 4312 /O 4490 /V 4506 /E 4540 /Filter /FlateDecode /Length 14862 0 R >> 
stream
�JW&��W-4a���-�i��@��<����Bb��?���N���p�]����i�)��7�����y�?䢐�<��q�c5��<��5�\0��ڭ�n�.�0�̽�!V���o�8C�/��Ţ�����j�z���lo7������+��T��)F�$����w������r��M
��m��B蝤
�5l��#'@[�p���t�Ha�q�%��!	!L�h�SH<͍��
����0��_j*���m�N��z)�2a.{�2}f�L��cc]��^J���I�$��KK.������2��~��4��ġR������.���ȥ���������]B8�DY�,L��C��]������k7���y"�����g���`�1��[B`������"��:��R�g�L��ׄ��j�k֕��@�J����n��kS:1��@�R����543�^�S�v�N�����I]�Vo�y�h�������֛�]a�|L�2na�"�
��A��:�	q�|�Ux��<V��������m�n"~[��V�F����ێ+����n�}�2�[1�������1�PjaՅ���5"��d*���ph�Cs���E�8@��jd���1������ŭ��S-	X�+��<v+��T�{ǂ���~�(�������&���;�Bȸ�FTH�ͫ��e�& ���8���ڢ����d�P��B9��!��9���z�F6�3���9M���9
�S��t'�DNw�����K����&�b�M��R�^܉:2.�t��knԏ:5` �ҌFP�{es�*���N�"�q�ކ~�L	h؏��r�iN���Igxe��(b�G!�Zz����U�.�x��h;����E����S� �\�
״�T��-��X����E�C�=�j�c��)L6��w�����@�g�Z���	m�����)(���-!���;�$���h���1�q9̶���j������i�����\��h428�����b��ƻ���8����]�Q���K�!*���K)�f9:x����k��k}df��Wd�ŗ�w`�)ʝ�>_:�F���������8?6�Q}���|5�'j�K��DL�\0'�Ò��/���\�Sm��W�w��Z�V����t�J��$]j�i�A#�iR\0S܈��Tnxy�����͙���b�n��6���s�E?l��@F�TA:�,��~kߓ;�F���kRMԈ���������6�����$Dsg�!.���)�����=�(��`������[��e���t�t`=
�ލ��i��\0uQ�����[�)����9҂3\\�|���꥽���& �)����w���nLhg�$��H����8�OY��(��}	���.�^W�\04
��І�lti������5y�R�'�Y�[Y��������7mg�	#w�yc KΉJ<��L�p��0<��c��߸'�t3Y�U'��b����F删��%����Y� �Ӕsa��$@5k�ab����d�>�5����M��3ǜy�ǥ�SA??��a��(N���h��pC�
R����T�_����:��\��6wS��7�?�r�E�����b1;�q��£�j�]%����&^C��Cb�����׏끞Hɨ�>����������
2��e��_�:���Ub���~�*N�V�������XV�V͝�fG���[v_5�&�������+e*-z����x�D�)�B9�8<�%�G���

�13��Dr��N?�4��7^߳�RpE��X��NL�c���p�;�����ҵ���/|ul�|
[��b{ny�f�#�����΢�(Nn���R�@*��g���|K�Z봫���w4�7O���¥�A}�l< ��frg���C
����EkR��:��������ةܰ���?V���o��Q�_�f1��!��7k�qdz��I�.�»H�z�q`��x�%��O&��i���s���e�� ��n_��<R�L?�A���M�.Ϭ������#�� )D�쬀����"��*3v���@6?��$W*@��h�\0v�'!��B�2B���1��IE����[_e���iOV�tʪ�<"W�Z�0�j�XU��B��6=r�&`/FE�S��+��#����aB��1�����H����� �.���e�*�l$S�$�'�/�9�B�uur�]n����p �
t3���Jn��qGOn2Ȼ�.�v'G�wc����4�6�"�&jC��E�����������P��A�I�y������\������_�܏��_�DPТ��/$(�%^#�ߗ��L�	 K�"@b���$�ē���=j���vR�R�ꉥī1��a�V
�"�k�:>󊁃������ T��2�OP�+�c׮P������q�;��أ���h{^���K�_��(�_��j��������L��ء��<��r)����IsG��i�22��;դ�5��Q���¬4�T�n��ۓ����
Al��=;a�	�������d�>Zg��,�Y�u�	�-���]�
C!�f�B"����h�V��D�e��
�;���AU"'h�K�/��&<�$,L��I(�;�4���e��

��hoӒ#8�[�&�N����
��N�K,X��M���Ҥ�+0��Nz�F'_�|�ux�Q���͙\0���b�D���*�V���iu��'\�9P��:|�ۉ�e�o2�	,��(��u��ǠK�Ξ��>|�c�y�f��H�|b��a��Jr�3��R�4d��SR^�W[9��5i�8����OM��0M$�oY�MfH���"l��Ɗ?�[�.J��vK�i��ߴ��b��L����v_�1���?��Q��>�q��|P��ǒ�SJ��s��
Q��2���!���Ce�Q�������,5��W�-!-�,�1����nr b��B�,����C�
�
...

And it also has these messages

File mode specification error: (wrong-type-argument number-or-marker-p ((91)))
pdf-view-new-window-function: Wrong type argument: number-or-marker-p, (("91"))
Wrote /home/cysh/rpt2.txt
evil-line-move: Beginning of buffer [12 times]
Reverting buffer ‘cysh’.
Quit
Reverting buffer ‘cysh’. [2 times]
Quit [4 times]
**File mode specification error: (wrong-type-argument number-or-marker-p ((91)))
pdf-view-new-window-function: Wrong type argument: number-or-marker-p, (("91"))**
Auto-saving...done
Reverting buffer ‘cysh’.
Quit
. is undefined
apply: Buffer is read-only: #<buffer rpt2.txt>
Quit
apply: Buffer is read-only: #<buffer rpt2.txt> [3 times]
Quit
d is undefined [2 times]
. is undefined [3 times]
evil-line-move: Beginning of buffer [4 times]
Quit
evil-line-move: Beginning of buffer
Quit [5 times]
Auto-saving...done
Quit [2 times]
Mark set
Quit [3 times]
**pdf-info-query: epdfinfo: No such page 0**
Loading /home/cysh/.evil/recentf...done
Cleaning up the recentf list...done (0 removed)
Auto-saving...done
Mark saved where search started [2 times]
Quit [4 times]
evil-line-move: Beginning of buffer [3 times]
Auto-saving...done

So I had set a trap right on (pdf-view-new-window-function) and it shows this callstack

Debugger entered--entering a function:
* pdf-view-new-window-function((t))
  run-hook-with-args(pdf-view-new-window-function (t))
  image-mode-winprops(nil)
  image-mode-window-get(page nil)
  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 802.11a-1999.pdf> "~/Documents/802.11a-1999.pdf" nil nil "~/Documents/802.11a-1999.pdf" (2101268 2065))
  #f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x233d53>)("/home/cysh/Documents/802.11a-1999.pdf" nil nil nil)
  ad-Advice-find-file-noselect(#f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x233d53>) "/home/cysh/Documents/802.11a-1999.pdf" nil nil nil)
  apply(ad-Advice-find-file-noselect #f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x233d53>) ("/home/cysh/Documents/802.11a-1999.pdf" nil nil nil))
  find-file-noselect("/home/cysh/Documents/802.11a-1999.pdf" nil nil nil)
  find-file("/home/cysh/Documents/802.11a-1999.pdf")
  dired-find-file()
  dired-open-file(nil)
  funcall-interactively(dired-open-file nil)
  call-interactively(dired-open-file nil nil)
  command-execute(dired-open-file)

Could I get some advice from you to overcome this situation, please?

Hi there,
this seems to be a pdf-tools related bug. This has nothing to do with interleave. Since I'm not using pdf-tools myself I can't provide any assistance. I guess you'll have more luck if you open up this issue with the pdf-tools issue tracker.

Best,
Sebastian