Bug 155044 - Autocompletion stops working after some time
Summary: Autocompletion stops working after some time
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Thomas Braun
URL:
Keywords:
: 156363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-03 19:43 UTC by Thomas Braun
Modified: 2008-05-13 11:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
first part of the codecompletion fixes (1023 bytes, patch)
2008-02-05 23:15 UTC, Thomas Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Braun 2008-01-03 19:43:42 UTC
Version:           2.0.0 (using KDE KDE 3.5.8)
Installed from:    Unlisted Binary Package
OS:                Linux

Joint Bug report from two bug reports from Thibaut Cousin and  
Russell W. Howell.

Mail from Thibaut:

  OpenSUSE 10.3 x86_64. I had the problem with my own build, and now with the 
Kile package provided by OpenSUSE build system.

> - KDE, QT version

  KDE 3.5.8 and Qt 3.3.8 (from OpenSUSE build system).

> - gcc version

  4.2.1.

> Can you reproduce it also with single documents (no projects, only one file
> open, no masterdoc, small files)?

  I've never used projects in Kile. I had the problem with both isolated files 
(one to two pages long) and multiple-file documents with a master file.
  Regards,

Mail from Russell:

This is related to a bug first reported on 19 November by Thibaut Cousin.
It is that the autocomplete option in Kile 2.0 stops working after a few minutes.
I just want to confirm that the same problem shows up in Ubuntu 7.10. I installed Kile 2.0 from the tar file on your website. It compiled and installed fine, but I've noticed the same bug. It seems that it must be triggered by a certain event, but I haven't been able to pin it down. For sure, however, the auto complete feature stops working after a certain amount of time.
Comment 1 Thomas Braun 2008-01-03 19:46:38 UTC
Some things which are not clear:
- Only on 64bit architecture?
- Only on KDE 3.5.8?

Thanks,
Thomas
Comment 2 Russell W. Howell 2008-01-03 21:48:23 UTC
For the record, I'm using Ubuntu 7.10 in KDE 3.5.8, 32-bit architecture.
Comment 3 Thomas Braun 2008-01-17 23:41:37 UTC
Hello Russell and Thibaut,

I did some investigations and are making some progress.

Some questions remain:
- Do you have abbreviation completion enabled?
- Could you attach a screenshot of your codecompletion configure dialog?
Comment 4 Andrea 2008-01-22 11:48:29 UTC
I think that this problem can be related to this bug report: http://bugs.kde.org/show_bug.cgi?id=156363

Sorry for the possible duplication of the bug, but I've not seen the this bug before to post the other one.
Comment 5 Michel Ludwig 2008-01-22 12:11:20 UTC
Additional information out of bug report 156363 by Andrea:

Hi all, 
I've noted that when a reference or citation is misspelled, then the auto-completion of references, citations and commands is no longer available. 
 
For example, consider this document: 
 
\documentclass[a4paper,10pt]{article} 
\usepackage[latin1]{inputenc} 
\begin{document} 
\section{test}\label{sec:test} 
 
In section~\ref{sec:test} 
\end{document} 
 
When I type \ref, the popup of command completion works and when I open the bracket, sec:test is proposed as possible completion of the reference. If I choose it or if I type it correctly, then there are no problems. Instead, if I misspell the reference, then there is no way to use again the auto-completion for commands, references and citations. The only way I found to restore auto-completion popups is to close and reopen kile. 
 
I can reproduce this problem using projects or single files not connected to a project. And the problem is system-wide: when it is activated, auto-completion is disabled for all open files and projects. 
 
Sometimes auto-completion seems to stop to work even when no \ref or \cite commands are used, but I've not yet found a possible activation sequence and, at the moment, I ignore causes in this case. Furthermore, no error messages are provided, when I start kile from command line and I activate the problem using a misspelled reference. 
 
I don't know if this problem is a real bug or simply an error in some kile's configuration, but it is quite boring. 
 
Regards, 
Andrea 
Comment 6 Michel Ludwig 2008-01-22 12:12:11 UTC
*** Bug 156363 has been marked as a duplicate of this bug. ***
Comment 7 David 2008-01-22 19:05:46 UTC
With the package provided by Debian sid, I see many times that, after typing \ref or \cite, no completion menu appears.

I am afraid I cannot give any more details
Comment 8 M_B 2008-01-30 22:12:39 UTC
Hi.

I have exactly the same problem on a gentoo system with kile-2.0
I'm running gnome 2.20.1 with kdelibs-3.5.7-r3, qt-3.3.8-r4 and gcc-4.1

I found out that the problem is related to the \cite command. Steps to reproduce are:

- write a document with a bibliography and a few references to images/equations/... which you compile. After compiling the document, when typing '\cite{' and Return which on my system writes '\cite{}' on the screen, the autocompletion stops working as described by Michel Ludwig (2008-01-22 12:11).

Another question (somewhat OT): While typing '\ref{', shouldn't I get a list of possible reference entries by then? I wonder because kile always shows me a list with a single entry which reads '\ref{key}'. Pressing Return, '\ref{\ref{key}}' is placed in my document, whereas my girlfriend, after hitting Return, gets a list containing the proposed references (ubuntu 7.10, but I'm afraid I can't give you more details right now). I'm aware that this matter is more closely related to bug #112735. In fact, the only way for me to get the references list (having typed 'ref{') is to hit esc, then backspace to delete the bracket '{' and then to re-enter '{' which is slightly annoying. If that could be fixed, kile would be the perfect LaTeX productivity suite (sounds somewhat microsoftish, come to think of it) for me.

Anyway, thank you for this great program.
Comment 9 Thomas Braun 2008-02-05 23:14:57 UTC
SVN commit 771425 by tbraun:

fix one part of the codecompletion error
I'm not sure if this is really the correct way, but at least my testing revealed no big drawbacks.
CCBUG: 155044


 M  +1 -0      kileviewmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=771425
Comment 10 Thomas Braun 2008-02-05 23:15:22 UTC
Created attachment 23434 [details]
first part of the codecompletion fixes

Okay I found one part of the problem.

Please try the attached patch. I'm not sure if this is the correct approach but
it fixes one codecompletion error (open a completion box and close it by
clicking with the mouse somewhere in the editor).

The problem with \ref{} inside \ref{} commands from from Comment#8 is known.

Thomas
Comment 11 Thibaut Cousin 2008-02-13 20:50:36 UTC
If it's worth anything at this point, I hit the same problem with a self-compiled Kile on Mac OS X (with Macports).

Is the current patch enough to correct most of the problem, or should I wait for "part two"?
Comment 12 Thomas Braun 2008-02-13 21:26:42 UTC
Hi Thibaut,

well actually I have currently no idea for part two.
So it would be good if you can try part one. You can check out the 2.0.x branch from svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/office.

Bye,
Thomas
Comment 13 Thomas Braun 2008-04-13 19:41:21 UTC
SVN commit 796505 by tbraun:

revert old codecompletion fix from 771425 because it created more problems as it solved

add new very hackish codecompletion fix. I tried for half an hour an didn't find any regressions.
And I also hope that our users do also not :)

These two bugs are in principle fixed with this commit, but I wait until it it confirmed
CCBUG: 155044
CCBUG: 160555




 M  +8 -3      codecompletion.cpp  
 M  +0 -1      kileviewmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=796505
Comment 14 Thomas Braun 2008-05-13 11:49:37 UTC
Hello,

this bug is fixed in kile 2.0.1.
If you still encounter problems, please reopen this bugreport or open a new one.

Thanks for are your help in trachking down the problem,
Thomas