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

Copy -> Export to Clipboard: Custom exports not a #6285

Closed
jhh931 opened this issue Apr 14, 2020 · 4 comments · Fixed by #6290
Closed

Copy -> Export to Clipboard: Custom exports not a #6285

jhh931 opened this issue Apr 14, 2020 · 4 comments · Fixed by #6290
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save
Projects

Comments

@jhh931
Copy link

jhh931 commented Apr 14, 2020

JabRef 5.0--2020-03-06--2e6f433 (Portable)
Windows 10 10.0 amd64
Java 13.0.2

I have several Custom Exports defined, and they word as intended via File -> Export.
However, when right-clicking on an entry in the entry table, and going for "Copy..." -> Export to clipboard, the Custom Exports are not visible. This worked fine in earlier JabRef versions (e.g 3.4.1)

Screengrab below: the red part shows default export formats to choose from, but the Custom Exports are not available in the pull-down menu.

Untitled

@Siedlerchr Siedlerchr added export / save bug Confirmed bugs or reports that are very likely to be bugs labels Apr 14, 2020
@Siedlerchr Siedlerchr added this to Normal priority in Bugs via automation Apr 14, 2020
@Siedlerchr Siedlerchr added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Apr 14, 2020
@Siedlerchr
Copy link
Member

Hi,
I take a quick look in the code and currently only exporters with the following extensions can be used. My custom exporters (xml and html etension) are listed there correctly.

private static final List<String> SUPPORTED_FILETYPES = Arrays.asList("txt", "rtf", "rdf", "xml", "html", "htm", "csv", "ris");

@jhh931
Copy link
Author

jhh931 commented Apr 14, 2020

Ah, that helps. I had my exporter defined as "RTF". After changing to "rtf" all was working well.

So for me this issue is closed, but a suggestion would be to make the code more robust with respect to this point. Or at least explicitly state that the extension should be 'no caps' in the manual, like here:

https://docs.jabref.org/import-export/export/customexports#adding-a-custom-export-filter

@Siedlerchr
Copy link
Member

@jhh931 Thanks for the feedback! Before I close this issue I want to check why it actually filters for those file types ( I currently see no reason why) or to make at least the file extensions case insensitive.

@Siedlerchr Siedlerchr removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Apr 14, 2020
Bugs automation moved this from Normal priority to Closed May 1, 2020
Siedlerchr added a commit that referenced this issue May 1, 2020
… ext (#6290)

* Fix selecting custom export for copy to clpboard with uppercase file ext

Fixes #6285

* fix annoying checkstyle

* Pass some more globals
show error dialog on ex instead of rethrowing

* make checkstyle happy

* implement enum analogous to InternalField logic

* make new extensions lowercase
@Siedlerchr
Copy link
Member

This issue should be now fixed in the latest master. File Extensions are now converted to lower case automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save
Projects
Archived in project
Bugs
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants