Bug 319042 - Make "Save As" directory/file same as opening directory/file
Summary: Make "Save As" directory/file same as opening directory/file
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.16.60
Platform: Debian unstable Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 01:39 UTC by ramon diaz-uriarte
Modified: 2014-03-12 13:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ramon diaz-uriarte 2013-04-29 01:39:36 UTC
Okular should offer as default file and directory to save a file the same file/directory that was opened.

Reproducible: Always

Steps to Reproduce:
1. Open a file somewhere (e.g., ~/d1/d2/d3/f1.pdf).
2. Do "Save As"
Actual Results:  
The menu, by default, offers to save as: ~/Documents/f1.pdf

Expected Results:  
The menu, by default, offers to save as: ~/d1/d2/d3/f1.pdf

(this is what other KDE applications do, such as Kate and rkward).

- This is related to bug 315552.

- Note that the proposed behavior would ease the problems in bug 315552, but also would make behavior consistent (now, a file that exists under ~/Documents would by default be overwritten; but not with other files).
Comment 1 Albert Astals Cid 2013-05-07 20:22:43 UTC
It doesn't offer ~/Documents it does offer the last folder you used to save a file with Okular, which defaults to ~/Documents if you have never saved a file
Comment 2 ramon diaz-uriarte 2013-05-07 20:35:06 UTC
(In reply to comment #1)
> It doesn't offer ~/Documents it does offer the last folder you used to save
> a file with Okular, which defaults to ~/Documents if you have never saved a
> file

Yes, I think you are correct, of course. However, that is still undesirable. 

The key point is that if we open and change documents, we are not offered the very same document we are viewing and editing as the default to "Save As". This means that in deeply nested or complex directory structures, saving the changes in the file that was opened becomes a painful directory-navigating exercise.

As I said, fixing this would also solve (or ease) problems reported in bug 315552.
Comment 3 Fabio D'Urso 2013-05-07 23:12:10 UTC
I agree with the OP. Albert, do you have a preference in favor of the current approach?
Comment 4 Albert Astals Cid 2013-05-07 23:17:58 UTC
If you want to work on such a path we can discuss over it, take into account though that there are files coming from http, stdin, etc.
Comment 5 Fabio D'Urso 2013-05-13 23:07:34 UTC
Git commit 460502d1240ae5eaa865b3e2873a23322b836ebf by Fabio D'Urso.
Committed on 14/05/2013 at 00:58.
Pushed by fabiod into branch 'master'.

Make "Save As" default path point to where the file was opened from
FIXED-IN: 4.11.0
REVIEW: 110419

M  +1    -1    part.cpp

http://commits.kde.org/okular/460502d1240ae5eaa865b3e2873a23322b836ebf
Comment 6 ramon diaz-uriarte 2013-05-13 23:44:19 UTC
Fantastic! My life (or the part of my life that deals with PDFs) got a lot simple now!
Comment 7 Christian ML 2014-03-12 13:12:25 UTC
I have to add a point to this old thread, because I just upgraded okular and noticed the new behaviour:

One frequent situation is opening a (pdf) from within a browser, looking at it and then eventually saving a copy of it. The new default "save as" dir is then /tmp, which I find very annoying.

Is there a way to set my own default save directory ?
Comment 8 Christian ML 2014-03-12 13:14:03 UTC
Sorry, please ignore my last posting - "save copy as" seems to do exactly what I need.