Skip to content

Fix Copy cite command should respect preferences#10707

Merged
Siedlerchr merged 14 commits into
mainfrom
copycitecommand
Dec 22, 2023
Merged

Fix Copy cite command should respect preferences#10707
Siedlerchr merged 14 commits into
mainfrom
copycitecommand

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Dec 21, 2023

Copy link
Copy Markdown
Member

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.

Comment thread src/main/java/org/jabref/logic/push/CitationCommandString.java
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

koppor commented Dec 21, 2023

Copy link
Copy Markdown
Member

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

Siedlerchr commented Dec 21, 2023

Copy link
Copy Markdown
Member Author

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

koppor commented Dec 21, 2023

Copy link
Copy Markdown
Member

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

koppor commented Dec 21, 2023

Copy link
Copy Markdown
Member

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

koppor commented Dec 21, 2023

Copy link
Copy Markdown
Member

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

Comment thread src/main/java/org/jabref/gui/preferences/external/ExternalTabViewModel.java Outdated
Comment thread src/main/java/org/jabref/gui/preferences/external/ExternalTabViewModel.java Outdated
@Siedlerchr Siedlerchr enabled auto-merge December 21, 2023 22:26
koppor
koppor previously approved these changes Dec 21, 2023
@Siedlerchr Siedlerchr added this pull request to the merge queue Dec 22, 2023
@github-actions

github-actions Bot commented Dec 22, 2023

Copy link
Copy Markdown
Contributor

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
@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