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

Use default directory when adding files to an entry #459

Merged
merged 5 commits into from
Jan 25, 2016
Merged

Conversation

stefan-kolb
Copy link
Member

See #458.

  • The current implementation is hard to understand. I don't get how these three existing folder preferences are used.
  • Also, the method itself should be simplified and return a List

@koppor
Copy link
Member

koppor commented Dec 3, 2015

After going through the documentation, I found it. JabRef can have a directory per database. But what if you and me have different directories? Do we have to agree to one? Normally, it's simply the directory of the .bib file (meaning . is used as database directory). But what if the users somehow share a bibliography and use different directories? Then, this feature comes in. I can set another directory then you do. Both settings are serialized in the bib file. With -<loginname> as suffix in the jabref-meta field. If JabRef saves a file and my loginname matches the name stored in the bib file, it chooses that directory. If no match is found, it uses the "General file directory" of the bib file. If that is not found, it uses the one configured at "Options -> Preferences -> External programs" ("Main file directory").

Here some text from the documentation and mailing lists, but I think, the documentation has to be improved. 🌅

When thinking of it, we should offer the users a button "use current directory" next to "General file directory" and add a little help text that "." denotes that. Or render . as <directory of the bib file is used>. Then, hopefully, the "User-specific file directory" can be dropped. - I don't see any other use case. Why would I share a bib file and not share the PDFs? If I share the PDFs together with the bib file, a relative directory can be put in "General file directory".

Possibly, the "General file directory" should be stored relatively from the current directory of the bib file.

FAQ

http://jabref.sourceforge.net/faq.php: "Then at the field “General file directory” choose the directory specific for the database. If you want to set a directory for you only and other users should use the default directory, use the field “User-specific file directory”"

File help

http://jabref.sourceforge.net/help/FileLinks.php:
"Finally, in the Database properties dialog you can set a user-specific file directory, which will be valid only when you are the one working on the bib file."

Mail from the mailing list

(by @ThomasA)
https://sourceforge.net/p/jabref/mailman/message/27008930/
"As of revision 3449, JabRef supports an
option to specify a user- and host-specific file directory in the
database properties. This allows each user of a particular database to
store her/his personal path setting in the database. It furthermore
allows the same user to specify different paths on different computers
(must have different host names)."

@stefan-kolb
Copy link
Member Author

Thanks @koppor for this detailed clarification! I think we might simplify this somehow 😄

@stefan-kolb stefan-kolb added this to the v3.1 milestone Dec 12, 2015
@koppor
Copy link
Member

koppor commented Jan 8, 2016

We need a better internal datastructure.

stefan-kolb added a commit that referenced this pull request Jan 25, 2016
Use default directory when adding files to an entry
@stefan-kolb stefan-kolb merged commit e899fc3 into master Jan 25, 2016
@stefan-kolb stefan-kolb deleted the default-dir branch January 25, 2016 14:46
koppor added a commit to JabRef/user-documentation that referenced this pull request Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants