sachac / subed

subed is a subtitle editor for Emacs
177 stars 16 forks source link

saving subed buffer removes flyspell overlays #55

Open mooseyboots opened 2 years ago

mooseyboots commented 2 years ago

not sure if others have this issue.

when i save a subed buffer, all flyspell underlines disappear, which means i have to keep running flyspell-buffer to see them again, even when flyspell-mode is enabled.

sachac commented 2 years ago

Probably because subed-sort possibly rewrites things. Do you want to add flyspell-buffer to your after-save-hook? If that works, we can add it to the README.

On Fri., Jan. 14, 2022, 06:07 mooseyboots, @.***> wrote:

not sure if others have this issue.

when i save a subed buffer, all flyspell underlines disappear, which means i have to keep running flyspell-buffer to see them again, even when flyspell-mode is enabled.

— Reply to this email directly, view it on GitHub https://github.com/sachac/subed/issues/55, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACD7EUZOBMLM2OC3YCTZ5TUV77YPANCNFSM5L6QK2AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

mooseyboots commented 2 years ago

yeah i guess the buffer gets fully re-written, so prob not much we can do. re-running flyspell-buffer after save is also going to be too slow, at least for longer videos.

sachac commented 2 years ago

I wonder if https://www.reddit.com/r/emacs/comments/fqe600/rfc_flyspell_visible or https://www.reddit.com/r/emacs/comments/bsoygn/spell_checking_for_onscreen_text might have something you can use to spellcheck visible text...

On Fri., Jan. 14, 2022, 11:05 mooseyboots, @.***> wrote:

yeah i guess the buffer gets fully re-written, so prob not much we can do. re-running flyspell-buffer after save is also going to be too slow, at least for longer videos.

— Reply to this email directly, view it on GitHub https://github.com/sachac/subed/issues/55#issuecomment-1013253268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACD7EWU47AP3BKG7ED2UZDUWBCTFANCNFSM5L6QK2AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

sachac commented 2 years ago

Hmm... If you don't mind losing the sorting behaviour, we could probably change this so that sorting is controlled by a custom variable. That way, SRT subtitles can still be renumbered as needed, but if you don't often need to completely sort the buffer, we can skip that part and you can keep flyspell. Would something like that work for you?

sachac commented 2 years ago

Working on getting it to skip sorting if already sorted, will update when I get all the tests worked out.

On Fri., Jan. 14, 2022, 13:08 Sacha Chua, @.***> wrote:

I wonder if https://www.reddit.com/r/emacs/comments/fqe600/rfc_flyspell_visible or https://www.reddit.com/r/emacs/comments/bsoygn/spell_checking_for_onscreen_text might have something you can use to spellcheck visible text...

On Fri., Jan. 14, 2022, 11:05 mooseyboots, @.***> wrote:

yeah i guess the buffer gets fully re-written, so prob not much we can do. re-running flyspell-buffer after save is also going to be too slow, at least for longer videos.

— Reply to this email directly, view it on GitHub https://github.com/sachac/subed/issues/55#issuecomment-1013253268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACD7EWU47AP3BKG7ED2UZDUWBCTFANCNFSM5L6QK2AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>