-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 default file name for make a copy #4618
Conversation
I beleive that it is more intuitive to have 'Copy' part at the last of the filename. If I have many copies of the notebook in the same folder, it is easier for me to find the right one to open if 'Copy' part is at the last of a filename. |
I have just seen that the test cases are failing on the problem where I made change. We would also need to rewrite the test cases according. |
I think it's deliberately using the left-most dot to account for multi-part extensions like Unfortunately, I don't think there's any good general-way to know which part of a filename should be considered the extension. |
@takluyver Since, many of my colleagues and friends have felt similar problem, how about using separate code in case of .ipynb files only as we deal with mostly notebooks in Jupyter environment? I can make changes, if you are interested. |
I'd be OK with special casing .ipynb files if you want to do that. Be sure
to add a comment summarising how we got to that compromise. Thanks!
…On Wed, 19 Jun 2019, 18:28 Vibhanshu, ***@***.***> wrote:
@takluyver <https://github.com/takluyver> Since, many of my colleagues
and friends have felt similar problem, how about using separate code in
case of .ipynb files only as we deal with mostly notebooks in Jupyter
environment?
I can make changes, if you are interested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4618?email_source=notifications&email_token=AACQB5J6XRHPFIH3JT5YR23P3JUEVA5CNFSM4HL5ZHBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCSXHA#issuecomment-503655324>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACQB5M2T2P34KM5KBB6F4DP3JUEVANCNFSM4HL5ZHBA>
.
|
Thanks @takluyver for your approval. I have made the suggested changes. |
Thanks |
If a copy of notebook is created using File>Make a Copy..., the default filename is copied after partitioning the filename by dot (.) and appending -Copy1 (for the first copy) to the name of the file as shown in the picture below. In case, a filename itself contains dot (.), then it will partition from left instead of the right dot(.). I have fixed this issue by partitioning from the right side instead of the left which is more logical. I have attached the screenshots for the same.
Original file:
On making a copy of the notebook (before fix):
On making a copy of the notebook (after fix):