Bug 116746 - Please don't save file positions in .kilepr file
Summary: Please don't save file positions in .kilepr file
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jeroen Wijnhout
URL:
Keywords:
: 244294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-20 10:30 UTC by Markus Gaugusch
Modified: 2016-12-03 19:31 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
New option to not save cursor position (2.65 KB, patch)
2013-08-12 03:09 UTC, Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Gaugusch 2005-11-20 10:30:16 UTC
Version:           1.8 (using KDE KDE 3.5.0)
Installed from:    SuSE RPMs
OS:                Linux

Hi,
I'm using Kile together with a versioning system (SVN). This works fine for all files, except the .kilepr project file. Every time a cursor position is changed in any file and the project is saved, the .kilepr file changes. 
I would suggest to save all "floaty" information like cursor position and "open" information in a separate file, that will not be put into the source repository (e.g. .kilepos or .kilework).
When the file is missing, no files of the workspace should be opened when opening a project.

Thanks for all your great work!
Comment 1 Thomas Braun 2006-01-18 13:01:35 UTC
Hi Markus,

why do you want to save the kilepr file on every commit ?
The only thing which changes in that file (if you don't change the number/encoding of the projects latex docs ) is the file position.
So there is IMHO no real need to have version tracking for that file.

From the end users point of view it is also better to have only one config file than two.

Regards
Thomas
Comment 2 Markus Gaugusch 2006-01-18 13:15:05 UTC
I want to commit the file because it belongs to the "project" (in fact, it 
defines it) and I don't want to look into the file to see if I just 
changed cursor positions and open files, or if I really added/removed a 
document from the project.
In fact, M$ V*sual St*dio does it the same way, and I think that it is 
just fine that way.

The file containing the cursor positions is no config file IMHO, but 
rather just a temporary file like the aux and other files produced during 
a latex run. The information inside is not valueable, only a convenience 
for the user.
Comment 3 Jeroen Wijnhout 2006-01-19 09:47:12 UTC
I get your point (in fact I have the same problem with KDevelop project files, although they do try their best). It is technically not that difficult to have two files, one .kilepr and one .kilesession file (or something like this). Perhaps this is a nice feature for the next (after 1.9) version?

best,
Jeroen
Comment 4 Thomas Braun 2006-02-10 16:13:18 UTC
Okay I realized that this really is a problem :)

What do you think about asking the kate dev's for a new document variable "line" so that the editor switches automatically to that line when opening ?
So we could have the "go to last line when I closed the file" feature for all files, even without project. And get rid of the line numbers in .kilepr.

Regards,
Thomas

PS: This would be a long term solution, as fix for now we can have a option in the project file, if one wants to save the line numbers in .kilepr.
Comment 5 Christof Schulze 2009-04-20 03:14:05 UTC
this still persists. I would much appreciate a fix to this issue allowing users to put the kilepr file under version control.
Comment 6 Michel Ludwig 2010-08-04 20:01:20 UTC
*** Bug 244294 has been marked as a duplicate of this bug. ***
Comment 7 isil_rion 2013-05-06 15:35:17 UTC
Is there any news about this?
Comment 8 reescf 2013-08-11 22:00:03 UTC
Just to explain why this is wanted: I want the project file under version control as it tracks project information e.g. which source files are part of the project. If I'm working on the same project on multiple machines, I want my svn up command to update the files which are part of the project.

But I don't want the project file to require committing (or to create a conflict) merely because I opened the file to look at it and moved the cursor. (I'm not even sure I need to move the cursor.)
Comment 9 Michael 2013-08-12 03:08:39 UTC
Hi,
This has been open a long time. See attached patch for a potential fix. It's a new checkbox in the Project Options called "Do not save cursor position in project file" which, when checked, instructs Kile write the cursor position as zeros in the .kilepr file. Not super elegant, but it avoids the version control issue discussed above.
Comment 10 Michael 2013-08-12 03:09:11 UTC
Created attachment 81657 [details]
New option to not save cursor position
Comment 11 Michael 2013-08-12 14:55:07 UTC
Hmmmmm upon further reflection this is not really a good solution. There is more than just cursor position in the .kilepr file, such as

[item:cookie.tex]
open=true

We could hack this to always write open=false (or open=true) but then we're starting to break functionality... all files would be closed or all files would be open upon loading the project file.

Jeroen's suggestion of splitting into two files makes more sense. I don't think an extra file will be a problem since users are already subject to lots of LaTeX temporary files, a .kilepr, and a .backup for each .tex file.
Comment 12 reescf 2013-08-24 00:37:40 UTC
Although the 2 file solution would be wonderful, just not saving the cursor position would be very helpful despite the open/close issue. The cursor position changes pretty much every time I open a project. Which files I have open within the project changes but nowhere near as often.

As I say, the 2 file solution sounds perfect but the available patch sounds better than the current situation. (I'm very conscious of the length of time this has been open and worry that not being able to achieve perfection here might lead to no improvement at all.)
Comment 13 Michel Ludwig 2016-12-03 19:31:23 UTC
Kile 3 will save all the GUI-related settings in a different file