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

Fix Copy cite command should respect preferences #10707

Merged
merged 14 commits into from
Dec 22, 2023
Merged

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Dec 21, 2023

Fixes #10615
Supersedes #10690

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

fix checsktyle
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Dec 21, 2023
@koppor
Copy link
Member

koppor commented Dec 21, 2023

I'm working on it - especially that \cite as preference works. Reason: We should not force all users to adapt their preferences. JabRef should keep working. See #10568 (comment) for a discussion.

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Dec 21, 2023

Ah I see, we then would need a migration step

If the cite command in the preferences equals \cite then replace it with the new format

@koppor
Copy link
Member

koppor commented Dec 21, 2023

The issue also happens if the user enters something wrong in the preference field. Currently, key1key2 is then used. Which can be done better. I am working on it.

I will output an info

INFO: Wrong indexes -1 -1 for completeCiteCommand \cite. Using default delimiter and suffix.

\cite then automatically turns into \cite{key1,key2}

@koppor
Copy link
Member

koppor commented Dec 21, 2023

image

Registry setting Computer\HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\org\jabref -> cite/Command, content \cite will be magically converted by that parsing, too.

@koppor
Copy link
Member

koppor commented Dec 21, 2023

I went through the items of #10615 and worked on all of them (e.g., adding more test cases). Should be fine now 😅

koppor
koppor previously approved these changes Dec 21, 2023
@Siedlerchr Siedlerchr added this pull request to the merge queue Dec 22, 2023
Copy link
Contributor

github-actions bot commented Dec 22, 2023

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

Merged via the queue into main with commit 11d90a1 Dec 22, 2023
18 checks passed
@Siedlerchr Siedlerchr deleted the copycitecommand branch December 22, 2023 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy cite command should respect preferences
2 participants