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

wrong-type-argument integerp when calling ivy-bibtex-display-transformer #259

Open
peschkaj opened this issue Sep 3, 2018 · 1 comment

Comments

@peschkaj
Copy link

peschkaj commented Sep 3, 2018

With a single entry bibtex file:

@misc{norvigLetterFrequencyCounts,
  title = {English Letter Frequency Counts: Mayzner Revisited},
  author = {Norvig, Peter},
  year = {2012},
  howpublished = {\url{http://norvig.com/mayzner.html}},
  note = {Accessed: 2018-05-23}
}

ivy-bibtex errors with "Wrong type argument: integerp, nil"

toggle-debug-on-error output available at https://gist.github.com/peschkaj/2849631261c6ffa7a69bbf5f567834fa

Configuration info:

  • emacs version: 26.1 (installed via homebrew using brew install emacs-mac --with-imagemagick --with-modern-icon --with-natural-title-bar)

emacs configuration:

(setq papers-dir   (expand-file-name "~/Documents/reading/")
      papers-pdfs  (concat papers-dir "lib/")
      papers-notes (concat papers-dir "index.org")
      papers-refs  (concat papers-dir "index.bib"))

(use-package ivy-bibtex
    :after ivy
    :config (setq bibtex-completion-bibliography (list papers-refs)
                  bibtex-completion-library-path papers-pdfs
                  bibtex-completion-notes-path   papers-notes
                  bibtex-completion-pdf-field    "file"
                  bibtex-completion-display-formats
                  '((article       . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${journal:40}")
                    (inbook        . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} Chapter ${chapter:32}")
                    (incollection  . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
                    (inproceedings . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
                    (t             . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*}"))
                  bibtex-completion-additional-search-fields '(keywords)))
  ;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
  ;; ignores the order of regexp tokens when searching for matching candidates.
  (setq ivy-re-builders-alist
      '((ivy-bibtex . ivy--regex-ignore-order)
        (t . ivy--regex-plus)))
@peschkaj peschkaj changed the title wrong-type-argument integerp wrong-type-argument integerp on ivy-bibtex startup Sep 3, 2018
@peschkaj peschkaj changed the title wrong-type-argument integerp on ivy-bibtex startup wrong-type-argument integerp when calling ivy-bibtex-display-transformer Sep 5, 2018
@tmalsburg
Copy link
Owner

Hi, thanks for the report. I will try to reproduce this on my system (I'm using helm-bibtex). One question: Are you using org-ref? In the past there were cases where org-ref interfered with plain ivy/helm-bibtex.

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

2 participants