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

Make citar ignore JabRef line breaks "^M" #418

Closed
tazheinrich opened this issue Nov 18, 2021 · 3 comments
Closed

Make citar ignore JabRef line breaks "^M" #418

tazheinrich opened this issue Nov 18, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@tazheinrich
Copy link

Citar does not display entries correctly when JabRef adds "^M" to break entries at the end of fields. Citar recongizes the faulty entries and it will add the references if selected, but the fields by which you can search your bibliography are not displayed, thus you cannot search these entries by title, keyword and so on.

What makes the case even more curious is that I can reproduce this error only on Windows 10. If I add entries on a machine running ArchLinux, "^M" is not added to the bib-file. It might be a JabRef problem, however as I cannot find any information on it on the internet, I suppose other completion tools ignore the code added by JabRef.

Here you can see what JabRef adds to the entries:

bib-entries

Here you can see that citar sees the entry but ignores author, title and year:

citar-entries

I can reproduce this error on:
Windows 10
emacs 27.2
most recent version of citar
JabRef 5.4

@tazheinrich tazheinrich added the bug Something isn't working label Nov 18, 2021
@bdarcus
Copy link
Contributor

bdarcus commented Nov 18, 2021

This isn't a citar bug; it uses parsebib for parsing.

But seems likely your issue is something to do with JabRef and the files it's creating. Perhaps there's a config option there for line-endings?

See, for example:

JabRef/jabref-koppor#390

@tazheinrich
Copy link
Author

Thank you! That might be the solution I'm looking for!

@bdarcus
Copy link
Contributor

bdarcus commented Nov 18, 2021

I'm not sure, but you might try the default (Linux) newline separator here, and maybe check the "reformat" option?

image

I don't know how Emacs on Windows handles line endings though.

Edit: here's what CR files from JabRef look like on linux in the terminal, with cat/bat, and then LF (CR/LF also produces this output):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants