[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-05 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #11 from Ardith Metz  ---
I opened new bug about editorconfig/kate interaction:

https://bugs.kde.org/show_bug.cgi?id=402896

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-05 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #10 from Dominik Haumann  ---
Thanks to all for you detailed investigation.
PS: Not, most things are not even obvious for "Kate developers", whatever that
means :-) A Kate developer is someone who contributes to Kate, that includes
you, Lothar :-)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-04 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

Ardith Metz  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |NOT A BUG

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-04 Thread Lothar
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #9 from Lothar  ---

> Thank you very much for helping to find this!

Puh! You're welcome, but Thanks for the "Thanks" :-)

> when they're used and why they both exist.

Well, as said I'm no guru, but so far I know, katerc is Kate only, katepartrc
is also used e.g by Kile, Kwrite and any stuff which based on KTexteditor
What, when, where is something saved/used I can't say ATM. Kate has some more
"config" files, like for session management

> Why .editorconfig takes precedence over ~/.config/katepartrc and 
> ~/.config/katerc? 

I think only when editorconfig is nearby the file you currently edit. So when
some (Code) project have such in their tree it will used. So I understood the
docs.

> it makes kate gui config inapplicable

Yes, I think so too

> it may be created by some different app than kate thus users like me may be 
> unaware why the kate behavior suddenly changed

Yeah, it should somehow clear be shown which config (file) is in use to avoid
these kind of trouble.

Feel free to file a new bug report, and close this one :-)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-04 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #8 from Ardith Metz  ---
Wow, that's a nice finding!

The excerpt that I showed in first post:

[Document]
...
Keep Extra Spaces=true
Remove Spaces=0
...

was from ~/.config/katepartrc, not ~/.config/katerc. I misremembered it but I
originally posted this couple of months ago :)

Anyway my ~/.config/katepartrc matches ~/.config/katerc so that wasn't much
relevant.

I indeed have .editorconfig (not sure where it comes from) which has a below
line:

trim_trailing_whitespace = true

after changing it to:

trim_trailing_whitespace = false

the issue reported here goes away. Thank you very much for helping to find
this!

There are still couple of things which aren't clear for me:

1. What is the difference between ~/.config/katepartrc and ~/.config/katerc,
when they're used and why they both exist.
2. Why .editorconfig takes precedence over ~/.config/katepartrc and
~/.config/katerc? It may create confusion as:
a) it makes kate gui config inapplicable
b) it may be created by some different app than kate thus users like me may be
unaware why the kate behavior suddenly changed

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-03 Thread Lothar
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #7 from Lothar  ---
> I assumed it's obvious at least for kate developers

Well, I have submitted some patches in the recent past but to call me as such,
would be a little presumptuous. Besides I'm as while a little "slow", but I'm
here. The smart guys are usually busy.

That's much better but I still can't reproduce it. At 6./14. did you change it
to "Never" or is it also before on "Never"? Without any config file around it
should be on "Never".

I notice there is also a ~/.config/katepartrc as fall back and Kate support
https://editorconfig.org/

>From docs
  KatePart has support for reading configurations from .editorconfig files,
  when the editorconfig library is installed. KatePart automatically searches
  for a editorconfig whenever you open a file. It gives priority to kateconfig
  files, though.
https://docs.kde.org/stable5/en/applications/katepart/config-variables.html

That sounds to me promising, when you add an empty .kateconfig, Kate stops
using
.editorconfig. So I hope you have such around.

I couldn't got .editorconfig to work but with an .kateconfig the display in the
config dialog is not changed, it still says "Never" but the space will removed.

Kate 19.03.70
Frameworks 5.53.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-02 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

Ardith Metz  changed:

   What|Removed |Added

Version|18.08.0 |unspecified

--- Comment #6 from Ardith Metz  ---
I showed excerpt from ~/.config/katerc (without saying that it's from
~/.config/katerc because I assumed it's obvious at least for kate developers).

I also pointed to relevant gui option which will modify ~/.config/katerc.

If you want me to go for full nit, then here I am:

1. rm ~/.kateconfig
2. rm ~/.config/katerc
3. rm ~/kate_test
4. echo " " >kate_test
5. kate kate_test
6. Chose from toolbar: "Settings" -> "Open/Save" -> "General" -> "Remove
trailing spaces" -> "Never" -> "Apply" -> "Ok"
7. Click "Save" button (notice "Undo button is activated which means changes
are done in document)
8. Close kate
9. touch .kateconfig
10. rm ~/.config/katerc
11. rm kate_test
12. echo " " >kate_test
13. kate kate_test
14. Chose from toolbar: "Settings" -> "Open/Save" -> "General" -> "Remove
trailing spaces" -> "Never" -> "Apply" -> "Ok"
15. Click "Save" button from toolbar (notice "Undo button isn't activated which
means there aren't changes done in document)

I hope everything is clear now. Tested on:

Kde plasma:5.14.4
Kde frameworks: 5.53.0
Qt: 5.12.0
Kate: 18.12.0
Distro: Arch Linux

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-02 Thread Lothar
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #5 from Lothar  ---
In you initial post...
https://bugs.kde.org/show_bug.cgi?id=397956#c0
...did you not explicit mention ~/.config/katerc but often .kateconfig.

- Step 1. looks to me obsolete
- In 7. you create an empty file but you did not note before to ensure that 
  there is no such file
- Between 8. + 9. seems to be missed to start Kate again

Lastly I have only played around with my "Remove trailing spaces" setting, with 
and without to start Kate again, but couldn't observe the described damage.
Have also set "Keep extra spaces" from indention page as shown in your post.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-02 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #4 from Ardith Metz  ---
Which part isn't clear?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-01 Thread Lothar
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #3 from Lothar  ---
I have, and spent a couple of time to investigate that, but can't reproduce it. 
Your explanations are not clear enough for me, sorry.
Happy New Year!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2019-01-01 Thread Ardith Metz
https://bugs.kde.org/show_bug.cgi?id=397956

--- Comment #2 from Ardith Metz  ---
@Lothar

did you read my description above? I tested this with "Remove Spaces=0" in
~/.config/katerc . Also with fresh config.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2018-12-31 Thread Lothar
https://bugs.kde.org/show_bug.cgi?id=397956

Lothar  changed:

   What|Removed |Added

 CC||loh@googlemail.com

--- Comment #1 from Lothar  ---
I guess ~/.config/katerc is responsible how to act in case of a not existing
.kateconfig

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 397956] Kate unconditionally removes trailing spaces if .kateconfig file doesn't exist

2018-09-02 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=397956

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.