The sound distributed version control system

#449 Allow users to abandon changelists

Opened by ammkrn on May 30, 2021
ammkrn on May 30, 2021

I have an open pr with the maintainer of the edit crate to add this functionality but I wanted to see if there are any objections. The idea is to let users bail out of a changelist from pull or record by using whatever the “explicitly exit without saving” option is for their editor. Due to the way edit works right now, using :q! in vim or exiting nano without saving will still execute the command with the contents of the buffer. The outliers are going to be graphical editors, since they don’t have such an option, but they don’t work with pijul right now anyway (I think because of edit). The dichotomy might make it necessary to do this as a config option in the long run, but there are probably other things down the road that would necessitate something like editor = terminal or editor = graphical as a config option.

spacefrogg on May 31, 2021

I’d rather have the user save the empty buffer than relying on timestamp precision (which you have to do to make your suggestion work). Selecting and deleting everything is supported by all editors alike.

BTW, emacs would also force you to “fake edit” the buffer before being willing to save it. So, this is not a graphical editor kind of issue…

ammkrn on May 31, 2021

@spacefrogg

Thanks for your input, I’ll count that as one vote against, or at least a vote in favor of making it a non-default config option. Can you explain why you think emacs is not a graphical editor?

spacefrogg on May 31, 2021

According to your post, I counted an editor that can run on the terminal as a non-graphical editor. In that sense emacs is as (non-)graphical as vim. While it can run in a graphical environment, as well, it does not behave any differently from its terminal mode.