Bug 375361 - Possibility to watch a file like tail -f
Summary: Possibility to watch a file like tail -f
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 16.08
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-21 08:25 UTC by Gregor Mi
Modified: 2019-04-02 17:50 UTC (History)
2 users (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 Gregor Mi 2017-01-21 08:25:47 UTC
It would be helpful if kate has an option to watch a file and always scroll to the last as tail -f does it.

Meanwhile, one could add an option to the View or Tools menu which invokes glogg (http://glogg.bonnefon.org/) for the current file.
Comment 1 Lothar 2019-03-04 01:41:39 UTC
*** Bug 377505 has been marked as a duplicate of this bug. ***
Comment 2 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 377505, bug 384384
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