sachac / subed

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

Merge with next, previous #21

Closed sachac closed 3 years ago

sachac commented 3 years ago

As suggested by alphapapa, this one adds a command to merge the current subtitle with the next one, using the next one's ending timestamp as the new ending timestamp. There's also a command to merge with the previous one. It seems to work for SRT files with your code, and it'll work for .vtt files with the code for the other pull requests. What do you think? I wasn't sure about the keybinding. Is there a different one that might make sense? =)

rndusr commented 3 years ago

It's a great idea, but this breaks when merging the first subtitle with the previous one or the last subtitle with the next one.

sachac commented 3 years ago

Added some error handling. Thanks! (And sorry about the slightly messy git log!)

rndusr commented 3 years ago

(And sorry about the slightly messy git log!)

Scrtach the "slightly"! :)

I'm sorry, but I don't know how to pull and review all of this properly. (I'm a git with git.)

I think I pulled everything, but "merge-with-next" is missing from "subed--generic-function-suffixes", "subed-merge-with-next" doesn't seem to exist.

Would it be possible to create new PRs with the current GitHub master as base?

It would help very much if different PRs/branches don't modify the same parts of the code so I can review them individually. Atomic changes are always is better.

Sorry about the extra trouble. :/

sachac commented 3 years ago

Sure, I'll make a different branch and pull request!