Bug 384384 - Documents modified on disk dialog should stop to trigger after first occurrence
Summary: Documents modified on disk dialog should stop to trigger after first occurrence
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 17.08.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-05 12:42 UTC by Gaël de Chalendar (aka Kleag)
Modified: 2019-04-02 17:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.57


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaël de Chalendar (aka Kleag) 2017-09-05 12:42:11 UTC
Overview: 

    I often open file modified by background processes and want to be able to look at them and other opened files without being interrupted by recurrent dialogs.

Steps to Reproduce: 

    1) Open a file

    2) Start a process writing on this file continuously

    3) Try to work with kate on other files

Actual Results: 

    The "Documents modified on disk" dialogs is displayed again and again

Expected Results: 

    The window "Documents modified on disk" should appear the first time and if the user choose to ignore the changes, it should not be displayed again even if a reminder could be displayed. The reminder could be updated whenever the file change, for example with the number of lines modified or anything else.
Comment 1 Nate Graham 2017-09-05 19:20:07 UTC
Well to be fair, it's right: the file really is being modified over and over again. It sounds like you're looking for a `tail -f` mode for Kate. I would suggest that actual tools designed for reading streaming data or rapidly-updating files would be a better fit for your use case than a general purpose text editor. You could use `tail -f` to view the rapidly-updating file and use Kate for your text editing needs.
Comment 2 Gaël de Chalendar (aka Kleag) 2017-09-06 16:02:34 UTC
I think you don't understand what I'm asking for. I don't want a behavior like tail -f with a continuous updating. The idea of updating a reminder just came to me while writing.

My basic need: stop to display the "Documents modified on disk" dialog after it has been displayed one time because it makes kate unusable as it blocks the interface.

Option 1: display again when needed after a manual reload of the file
Option 2: Mark the file as modified on disk
Comment 3 Nate Graham 2017-09-08 02:25:57 UTC
I'm trying to understand your workflow. It seems like if you're using Kate to edit a document that's constantly being updated by another program, that's not the right workflow or use of a text editor. What are these files that you're looking at? Log files? Or something else?
Comment 4 Gaël de Chalendar (aka Kleag) 2017-09-15 06:17:21 UTC
Hi Nate. I'm using Kate and Kwrite before in my development workflow since 1996. 

That's right that I don't use it only to "edit" files but also to dig into traces of execution of complex (sometimes running) programs where navigating, searching and highlighting regex occurrences is a must. I need kate features for that and a lot of other things.

I usually run 
$ program 2>&1 | tee output.log 
and load output.log in kate along other edited files.

Kate is perfect for this usage, except for the little annoyance I report here.
Comment 5 Lothar 2019-04-02 17:50:27 UTC
Git commit 81a8d573ecaf4ed0cfc803b081d3cbec99f8a787 by loh tar.
Committed on 02/04/2019 at 17:49.
Pushed by lohtar into branch 'master'.

DocumentPrivate: Add option "Auto Reload Document" to View menu

...and a "Enable Auto Reload" button to the ModOnHdPrompt.

There are a couple of request for such feature with different details and some
opinions against it at all. Not only because KTextEditor is not well suited to
work like 'tail -f'. However, this option should not cause any harm.

Currently jump the view after an update sometimes/often but that may fixed later
e.g. by D17857

- The max update interval is set to 3sec. Shorter intervals would cause a bad
  user experience
- As long as the user scrolls around updates are blocked
- The cursor is set to first/last line of the view when scroll above/below. This
  is currently not the best solution and cause also the mentioned jumps. Setting
  to the middle of the view would reduce this odd jumping but it shouldn't jump
  in any case
- Placing the cursor into the last line cause to work like 'tail -f'
Related: bug 375361, bug 377505
FIXED-IN: 5.57

Differential Revision: https://phabricator.kde.org/D19517

M  +2    -1    src/data/katepart5ui.rc
M  +6    -0    src/dialogs/katedialogs.cpp
M  +2    -1    src/dialogs/katedialogs.h
M  +58   -0    src/document/katedocument.cpp
M  +11   -0    src/document/katedocument.h
M  +30   -0    src/view/kateview.cpp
M  +6    -3    src/view/kateview.h
M  +1    -0    src/view/kateviewinternal.cpp

https://commits.kde.org/ktexteditor/81a8d573ecaf4ed0cfc803b081d3cbec99f8a787