Bug 142087 - Kate does not remember indentation settings for new files
Summary: Kate does not remember indentation settings for new files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 153564 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-23 01:11 UTC by Yuriy Kozlov
Modified: 2010-05-15 19:59 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Kozlov 2007-02-23 01:11:44 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

Kate does not automatically apply indentation settings to new files.

Steps to reproduce:

1. Create a new file (File -> New)

2. Go to Settings -> Configure Kate -> Editor -> Indentation and set Indentation mode to Python Style. Hit OK. (If Indentation mode was already set to Python Style, change it to something else, hit Apply, then change it back before hitting OK.)

3. Type the following (<angled brackets> indicate a keypress and not something to be typed verbatim):

class asdf: <return>

The second line should now contain a single tab (or whatever your indentation settings are configured to do).

4. Create another new file and then repeat the previous step. The second line will not be automatically indented. Check Settings -> Configure Kate -> Editor -> Indentation to confirm that Indentation mode is still set to Python Style.

It should either use the saved setting for new files, or reset the setting.

Running KDE 3.5.6 on Kubuntu Feisty 7.04

Originally filed here: https://launchpad.net/ubuntu/+source/kdebase/+bug/71273
Comment 1 Anders Lund 2007-02-23 13:34:57 UTC
Every new file (File->New) has the indentation mode set to my default.
Comment 2 Yuriy Kozlov 2007-02-23 20:07:03 UTC
Saving the setting, then exiting kate, then starting it again:
The first file follows the indentation setting, subsequent new files still don't.
Comment 3 Anders Lund 2007-02-24 12:12:25 UTC
On Friday 23 February 2007, Yuriy Kozlov wrote:
> Saving the setting, then exiting kate, then starting it again:
> The first file follows the indentation setting, subsequent new files still
> don't.


It obviously does here, my default is 'normal' rather than 'none' which is the 
default. Are you sure the setting is actually saved?
Comment 4 Yuriy Kozlov 2007-02-24 20:24:48 UTC
I don't know what the other indentation settings are supposed to do at all, but the symptoms I described happen with the Python and XML indentation settings.  The setting dialog shows the setting as whatever was saved, and the first file follows the setting, but new files don't.
Comment 5 Anders Lund 2007-02-26 15:41:43 UTC
Pease check in the Tools->Indentation Mode that your files have the expected 
mode set.
Comment 6 Wolfram R. Sieber 2007-03-30 14:50:12 UTC
For
 KDE Version  2.5.5 (KDE 3.5.5, Debian Package 4:3.5.5a.dfsg.1-6 (4.0))
 Application  Advanced Text Editor
 Operating System  Linux (i686) release 2.6.18-4-k7
 Compiler  Target: i486-linux-gnu,
steps 1..3 described Yuriy also apply for Ruby indentation. 4, I didn't check out, nor the Tools->Indentation Mode, suggested by Anders. - Currently, I have to achieve some programming goal, hence, sorry, no time for in-depth bug-checking.
Comment 7 Yuriy Kozlov 2007-03-30 19:57:38 UTC
The new file does have the mode set in Tools > Indentation
Comment 8 Jan 2007-04-13 12:57:06 UTC
I've got the same problem here and took a look in some config files.
It looks like the default session overrides the the indentation mode.

~/.kde/share/apps/kate/sessions/default.katesession
	[Document 0]
	Bookmarks=
	Encoding=UTF-8
	Highlighting=None
	Indentation Mode=0
	URL=

After deleting this session file the default indentation mode is applied.
Comment 9 FiNeX 2008-02-26 14:07:01 UTC
This report seems to be a dup of #153564.
On http://bugs.kde.org/show_bug.cgi?id=153564#c3 Anders says that in new kate version (3.0) the indentation is unset for new documents.

Is this the right behaviour?
Comment 10 Paul Worrall 2008-07-08 23:06:19 UTC
I can reproduce this on both kate 2.5.9 (Kubuntu 8.04) and kate 3.0.83 (Kubuntu Intrepid Alpha 1).
Comment 11 FiNeX 2008-12-30 16:11:17 UTC
*** Bug 153564 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Cullmann 2010-05-15 19:59:07 UTC
That works for me in KDE 4.4, each session remembers the right settings.