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…
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?
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.
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 frompull
orrecord
by using whatever the “explicitly exit without saving” option is for their editor. Due to the wayedit
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 ofedit
). 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 likeeditor = terminal
oreditor = graphical
as a config option.