Bug 101242

Summary: unused sub-files appear in first order of project list
Product: [Applications] kile Reporter: Matthias Pospiech <matthias.pospiech>
Component: generalAssignee: Jeroen Wijnhout <spam>
Status: CONFIRMED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Matthias Pospiech 2005-03-10 15:25:38 UTC
Version:           1.7.1 (using KDE 3.3.0, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)
OS:                Linux (i686) release 2.6.8.1-12mdk

I use the following system for my files (in a large tex project)
\main.tex
|-preambel.tex
| |-Fonts.tex
| |-Pagelayoutout.tex
| |- and so on...
|
|-title.tex
|-content.tex

and so on. These files are all included via \input in the main.tex

Unfortunately appear files that I comment (for example Fonts.tex) in the first order next to main.tex.

That make the project list unlogical to users of this system of files.

It would be much better if unused files (that are recognised to be not loaded at all) to be shown in a group "unused files"

So that the Project list would be
Project
|-other
|-main.tex
| |-...
|
|-unused
  |-Fonts.tex
  |-...

Understandable what I am looking for ?

Matthias
Comment 1 Jeroen Wijnhout 2005-03-11 10:27:36 UTC
I'm afraid I can't follow you here. What is a unused file? The project view list all files in your project and shows the dependency between the files. If you don't use the file, then why is it in your project?

best,
Jeroen
Comment 2 Matthias Pospiech 2005-03-11 10:38:01 UTC
>If you don't use the file, then why is it in your project? 
Because it is only temporary commented.

Or it belongs to the preambel and is unused. But that does not mean that it may not be needed later.

In projects with 10 chapters and only 1 used (to speed up compiling) all the others appear in first order. Thats what what I mean by unused.

The project view becomes then a bit unreadable. 
If we want to show the real dependency between the files as you said my view is to show that they are unused (commented \input inside the files or not loaded at all) and put them in a folder unused (inside the project view)

Clear now ?

Matthias
Comment 3 Jeroen Wijnhout 2005-03-11 10:43:35 UTC
Ok, the sentence about the "comment" wasn't very clear, now I understand. You comment out the line with \input{Fonts}.

What you want is Kile to scan commented text for \input \Input and \include commands. Currently Kile skips any comments found in the TeX files.

Right now Kile detects that the file is not used and assumes it is a root/master document. Therefore it appears "at first order".

It is clear now, but not so easy to fix.

best,
Jeroen
Comment 4 Matthias Pospiech 2005-03-11 10:47:42 UTC
>Right now Kile detects that the file is not used and assumes it is a >root/master document. Therefore it appears "at first order". 

Why not assume for unused files that they are unused instead of assuming a root document ?

This does not require to scan the commented code. That would be much better but as you said more difficult.

Matthias
Comment 5 Jeroen Wijnhout 2005-03-11 10:56:05 UTC
> Why not assume for unused files that they are unused instead of assuming a 
> root document ? 

Because you are not the only Kile user in the world ;-) Given that Kile skips comments in the TeX file there is currently no way to tell if the file is a subfile that is not used or another master document. It is possible to have more than one master document in your project. Thus, to implement your wish Kile would have to scan the comment in the TeX file. That way Kile can detect which files are unused.

best,
Jeroen