GNOME Bugzilla – Bug 314856
Auto-update document statistics
Last modified: 2020-11-24 10:18:04 UTC
Instead of having an update button in the document stats box, could it do so automatically after a second or two of idle keyboard? Other information:
Yes, this would be a nice enanchement if someone wants to give it a try.
Sorry for the spam... I think it makes sense track all possible enanchements to the docinfo plugin in one place, so I'm marking this as dup of 304371 *** This bug has been marked as a duplicate of 304371 ***
The bug this was marked as a duplicate of does not fix this bug. Please can this be reopened?
good point. Though I don't see this happen anytime soon unless someone provides a patch :)
I'll give it a go when I have the time. It seems to be a pretty trivial patch.
Created attachment 67651 [details] [review] Update stats in real time This patch adds realtime updating (well, not real real-time). It updates 2 seconds after the last change to the buffer. It also automatically updates when the active document changes.
the patch looks fairly good to me, though I am a bit concerned about this change: 1) the doc stats dialog is not modal, you can keep on typing while the dialog is up; if it's a big document gathering the stats can take a noticeable time. Thus autoupdating could be annoying... we should at least find a way to comunicate that something is a happeing (statusbar? busy cursor?) Maybe there should be an explicit [ ] Automatically Update check button? (lame, I know) 2) automatically switching the document could be confusing. I am not sure which use case is most common, but I guess that I would use the plugin (especially the autoupdate thingie) to keep an eye on the lenght of a document I am writing, if I switch tab to take a look at a draft or some notes or something like that, I don't care about their document stats.
I use gedit 2.16.1 and still is not implemented this characteristic. Perhaps to be used an observant pattern.
Regarding comment #7: If the auto-updating of document statistics is too slow, or currently irrelevant, then the user can just close the stat window. Am I missing something here? Also, is it really that slow? I just tried updating statistics for a 1.3MB textfile on my rather old laptop, and it takes less than a second. It seems like you are pointing out kind edge cases, I think that for a majority of us this would be a welcome feature.
I'd also like to propose that the auto-updating show the stats in the status bar instead of a separate window. Especially useful would be the length of the currently selected text.
Can I try and submit a patch for this? Where can I find the concerned source code. And how is a patch generated. I am more familiar with git.
(In reply to Ashhar Hasan from comment #11) > Can I try and submit a patch for this? Where can I find the concerned source > code. And how is a patch generated. I am more familiar with git. You may want to read https://wiki.gnome.org/Newcomers
Mass-closing of all gedit-plugins bugzilla tickets. Special "code" to find again all those gedit-plugins bugzilla tickets that were open before the mass-closing: 2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3 By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements. We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.