Someone on reddit had issue with this config file, there was no backup
file, in file directory or in ~/.mg.d
make-backup-files
backup-to-home-directory
in fact, having "make-backup-files" disables backups.
I've looked at the mg logic for backup files and I could sort that the
default make-backup-files value is 0
/funmap.c: {makebkfile, "make-backup-files", 0},
but in file.c there is a statement with a default to TRUE
* Save the contents of the current buffer back into its associated
* file.
*/
static int makebackup = TRUE;
I don't really get the logic here, nor when the configuration file and
that TRUE variable get in touch.
What I propose is to update the manual that make-backup-files is true by
default, so toggling it disable backups.
Index: mg.1
===================================================================
RCS file: /data/cvs/src/usr.bin/mg/mg.1,v
retrieving revision 1.117
diff -u -p -r1.117 mg.1
--- mg.1 2 Jul 2019 16:25:39 -0000 1.117
+++ mg.1 8 Nov 2019 17:16:47 -0000
@@ -688,6 +688,7 @@ Bind a key mapping in the local (topmost
Unbind a key mapping in the local (topmost) mode.
.It make-backup-files
Toggle generation of backup files.
+Enabled by default.
.It make-directory
Prompt the user for a path or directory name which is then created.
.It mark-paragraph