Giter Site home page Giter Site logo

Comments (23)

tmalsburg avatar tmalsburg commented on May 17, 2024

Unfortunately, Helm seems to prevent error messages from appearing. That makes it difficult to say what might be going on without further testing. Could you please run the following command and see if it produces an error?

(helm-bibtex-candidates)

If that works without error, please also run the following to see how many entries were read from your bibliography:

(length (helm-bibtex-candidates))

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

When running the first command, I get

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
#[(it) "�@\227�AB\207" [--cl-var--] 2](%28"Timestamp" .))
mapcar(#[(it) "�@\227�AB\207" [--cl-var--] 2](%28"Timestamp" .) ("Owner" . "{rasmus}") ("Keywords" . "{selectivity, oxygen evolution, coatings, side reactions,}") ("File" . "{Couper1990 - New developments in electrode coatings for chlor-alkali processes.pdf:Couper1990 - New developments in electrode coatings for chlor-alkali processes.pdf:PDF}") ("Crossref" . "{Modernchloralkali4}") ("Pages" . "{71-83}") ("Editor" . "{Prout, N.M. and Moorhouse, J.S.}") ("Chapter" . "{8}") ("Year" . "{1990}") ("Publisher" . "{Elsevier Applied Science}") ("Booktitle" . "{Modern Chlor-alkali Technology}") ("Author" . "{Couper, A.M. and Brooks, W.N. and Denton, D.A.}") ("Title" . "{New developments in electrode coatings for chlor-alkali processes}") ("=type=" . "InCollection") ("=key=" . "Couper1990")))
helm-bibtex-parse-bibliography()
helm-bibtex-candidates()
eval((helm-bibtex-candidates) nil)
eval-expression((helm-bibtex-candidates) nil)
call-interactively(eval-expression nil nil)

The entry that is shown is the first one in the bibliography file.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Could you please also provide me with the first entry from you BibTeX file? Perhaps I can use it to reproduce the problem on my system. Thanks!

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

Here's the first entry:

@InCollection{Couper1990,
Title = {New developments in electrode coatings for chlor-alkali processes},
Author = {Couper, A.M. and Brooks, W.N. and Denton, D.A.},
Booktitle = {Modern Chlor-alkali Technology},
Publisher = {Elsevier Applied Science},
Year = {1990},
Chapter = {8},
Editor = {Prout, N.M. and Moorhouse, J.S.},
Pages = {71-83},

Crossref = {Modernchloralkali4},
File = {Couper1990 - New developments in electrode coatings for chlor-alkali processes.pdf:Couper1990 - New developments in electrode coatings for chlor-alkali processes.pdf:PDF},
Keywords = {selectivity, oxygen evolution, coatings, side reactions,},
Owner = {rasmus},
Timestamp = {2012.03.13}
}

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

I can't reproduce this. Could you please make sure that you are using the latest MELPA versions of the packages helm, parsebib, dash, f, and s? Also, which version of Emacs are you using?

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

Thanks @tmalsburg. I'm currently using
helm version 20150216.11
parsebib v 20150205.1305
dash v 20141220.1452
f v 20150217.328
s v 20140910.334

on emacs
GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
of 2014-03-07 on lamiak, modified by Debian

I'll try reinstalling some of those packages and see if that changes anything.

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

I noticed that there was a newer version of helm from melpa, although I already had helm installed. I installed that. That didn't help, however.

Deleting and then reinstalling parsebib didn't have any effect either.

My .emacs contains the following related to helm (I also tried (require 'helm-bibtex), but that didn't help):

; Use Helm instead of ido
; This enables matching of strings in matches, not just full matches
(require 'helm-config)
(helm-mode 1)
; Use Helm M-x menu
(global-set-key (kbd "M-x") 'helm-M-x)
; Replace yanking with Helm interface
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
; Replace buffer menu with helm-mini
(global-set-key (kbd "C-x b") 'helm-mini)
; Use Helm find files mode
(global-set-key (kbd "C-x C-f") 'helm-find-files)

; Load helm-bibtex
(require 'helm-bibtex)

; Load helm-orgcard
(require 'helm-orgcard)

(setq helm-bibtex-bibliography "~/Documents/Elektrokemidoktorand/doctorate.bib")

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

If I remove helm-bibtex from melpa, and download the helm-bibtex.el file from commit ddd6264 the full reference list works again after (load-file "~/helm-bibtex.el").

This is the commit preceding the one where caching of the bibliography was introduced. However, the commit after, where caching was introduced, also works.

(These next lines are a log of my lazy bisection attempts, so skip to the end for the conclusion.)

Going forward in time: Commit ae800a6 this does not work.

Moving back to commit e049fb6 this works

Going forward again between these two, to commit 7fb7e02 this works

Going forward again to commit fcb0494 , some of the entries get included, but not all. Only a few seem to have the author names parsed correctly, most show an empty field and only the article titles are shown.

Going to the commit just before that, 1a23dbc , everything seems to work fine. All author names are parsed correctly, and the list pops up almost instantaneously.

My conclusion is that there seems like the error starts in commit fcb0494 . The first entry in my database contains a crossreference. Could there be something wrong in the way that cross references are handled?

It seems strange that everything works on your system though, so perhaps there is something particular about my bib file. My bibliography is large, containing 1071 entries. I have no idea if that has any relation to the problem.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

The size of the bibliography is not the issue. I tested the code with crypto.bib which is gigantic and everything seemed to work nicely. Perhaps there is an encoding issue with your bibliography. Could you send me a zip of your bib file? My address is: [email protected]

from helm-bibtex.

joostkremers avatar joostkremers commented on May 17, 2024

Hi, sorry to burst into this thread, but an issue was reported on parsebib that may be related:

joostkremers/parsebib#3

There appears to be a bug in Emacs 24.3.1 that prevents helm-bibtex-parse-bibliography from working properly. The function --map doesn’t work properly, apparently because it occurs inside cl-loop. Replacing --map with -map (or mapcar) fixes the issue.

There are a few more cases where --map is used inside cl-loop in helm-bibtex.el, but I can’t say whether any of the other ones also cause problems. (I don’t use helm, so I can’t really test.)

The bug appears to have been fixed in Emacs 24.4, by the way. But it may still be worth providing a fix, because not everybody is able or willing to upgrade to 24.4.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Thank you, Joost! I suspected that it has something to do with --map but couldn't find the problem. As you suggested, I replaced --map with -map in 50fe2cb. @RKBK could you please test the latest version?

from helm-bibtex.

RKBK avatar RKBK commented on May 17, 2024

Hi @joostkremers and @tmalsburg,
I am pleased to say that the fix in 50fe2cb indeed seems to work fine with my bibliography. The new version seems to be on MELPA, and the version installed from there now (as is expected) also works fine.
Thank you very much for the help.

from helm-bibtex.

joostkremers avatar joostkremers commented on May 17, 2024

Glad I could help!

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Great! I suppose, I should play it safe and also replace the other instances of --map inside cl-loop. I must say that mixing looping idioms like that felt slightly awkward. In that sense, I'm not too surprised that it lead to problems.

from helm-bibtex.

SebastianRiedel avatar SebastianRiedel commented on May 17, 2024

Fyi, I just ran into a similar bug and found that the --map inside the cl-loop of helm-bibtex-apa-format-authors produces an error for me. Replacing the --map with a mapcar fixed my issue. Switching to emacs 24.5 fixed it as well, so that's what I ended up doing to avoid running into problems with all the other --map-s in the code.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

@SebastianRiedel, thanks for the report. I suppose I should replace all --map by -map to be on the safe side.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Should be fixed in c2987ab.

from helm-bibtex.

DiogoFerrari avatar DiogoFerrari commented on May 17, 2024

I have the same problem and the update did't solve it.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

@DiogoFerrari, if you don't see any entries that's usually because the bibtex file has an error. Could you please run the following commands and report the result?

(helm-bibtex-candidates)
(length (helm-bibtex-candidates))

from helm-bibtex.

DiogoFerrari avatar DiogoFerrari commented on May 17, 2024

It returns

Loading bibliography ...
forward-sexp: Scan error: "Unbalanced parentheses", 181009, 512282

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Without a stacktrace, it is difficult to say what is going on exactly, but this is support for my suspicion that your bibtex file is corrupted. The parsebib package, which we use to read bibtex, uses forward-sexp. 181009 is the probably the position of the opening parenthesis that has no counterpart. (512282 is the position where the file ends.) You can use (goto-char 181009) in the bibtex file to find the unmatched parenthesis.

from helm-bibtex.

DiogoFerrari avatar DiogoFerrari commented on May 17, 2024

@tmalsburg, you were right. I have found the error. It was an additional { in one of the fields of a bib file entry. Everything is working fine again. Thanks.

from helm-bibtex.

tmalsburg avatar tmalsburg commented on May 17, 2024

Great. I have added a new section about this to the documentation: https://github.com/tmalsburg/helm-bibtex#helm-bibtex-doesnt-show-any-entries

from helm-bibtex.

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.