-
Notifications
You must be signed in to change notification settings - Fork 37
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
File not found error #126
Comments
Yes, Ebib does not use the same format for the file field as JabRef. The solution that people talk about on the page you link to seems to be to patch the Ebib source files. This isn't necessary, however: it's possible to add support for JabRef's file field format without patching Ebib. Unfortunately, it does require writing a bit of Elisp. There is a customisation option If all your file fields have the same form that you describe, i.e.,
In addition, you need to add the following two lines to the
This should get you going, though I haven't tested it much and I assume that every file field has the same format. If you run into problems, feel free to let me know. I think it would actually be a good idea to add support for the JabRef format to Ebib. That will take a bit longer, though, but when I do, I'll post here to let you know. |
Unfortunately an error occurred with the lisp code: “Warning (initialization): An error occurred while loading ‘/Users/***/.emacs.d/init.el’: Symbol's value as variable is void: direction Here is the backtrace result: |
Sorry, that's because the first line of the code snippet is missing. It should be:
I hope it works now. |
Yes, It does! |
Great! 🎉 I'll keep this issue open because I would like to improve support for JabRef-style file fields, but I first need to figure out what exactly JabRef allows and does not allow. Once I have added something to Ebib, I'll will post here to let you know. |
I'd like also suggest an enhencement of the ebib--expand-file-name: (defun ebib--expand-file-name (file)
"Search and expand FILE.
FILE is a file name, possibly with a partial file path. It is
expanded relative to `ebib-file-search-dirs'. If the file cannot
be found, the non-directory part is searched for as well. As a
last resort, FILE is expanded relative to `default-directory'.
If FILE is an absolute file name, expand it with
`expand-file-name' and return the result."
(if (file-name-absolute-p file)
(expand-file-name file)
(let* ((unmod-file (funcall ebib-file-name-mod-function file nil))
(ebib-file-search-dirs (append ebib-file-search-dirs `(,(file-name-directory (ebib-db-get-filename ebib--cur-db)))))
)
(or (locate-file unmod-file ebib-file-search-dirs)
(locate-file (file-name-nondirectory unmod-file) ebib-file-search-dirs)
(locate-file unmod-file '((file-name-directory (ebib-db-get-filename ebib--cur-db))))
(expand-file-name unmod-file))))) The |
Dear Joost,
I can’t figure out how to open with Ebib pdf attachments from Jabref (Ebib gives me a "file not found error" feedback). Ebib, correct me if I’m wrong, seems not use the same file name convention. Jabref file’s field format looks like this:
file = {:Raby1995.pdf:PDF},
I would like not to change this format as I still want to use Jabref outside emacs.
I saw the problem discussed here (https://forums.zotero.org/discussion/38209/problem-with-export-to-bibtex) but i could not understand how some contributors were able to fix it.
NB. Here is, for information, my ebib configuration in emacs-mac 26.191
(use-package ebib
:ensure t
:config
(setq ebib-index-columns
(quote(
("Entry Key" 20 t)
("Author/Editor" 20 nil)
("Year" 6 t)
("Title" 40 t)
("keywords" 20 t))))
(setq ebib-bibtex-dialect 'biblatex)
(setq ebib-preload-bib-files '("PATH“))
(setq ebib-file-search-dirs '("PATH“))
(setq ebib-use-timestamp t)
(setq ebib-timestamp-format "%d.%m.%Y"))
Thank you very much
The text was updated successfully, but these errors were encountered: