Re: mg backup directory (bump)

2017-07-06 Thread Lucas Gabriel Vuotto
Bump. Emacs gets HOME from environment here. I think that getting it from pw entry is more correct, but I can make a patch to behave like emacs if needed. On 19/05/17 14:11, Lucas Gabriel Vuotto wrote: > Previous patch shall be ignored, as it was an ugly hack. Below is a patch > that is simpler

Re: mg backup directory

2017-06-07 Thread Lucas Gabriel Vuotto
bump because I forgot to CC florian@ On 26/05/17 18:11, Lucas Gabriel Vuotto wrote: On 26/05/17 12:38, Florian Obser wrote: On Fri, May 19, 2017 at 02:11:22PM -0300, Lucas Gabriel Vuotto wrote: Previous patch shall be ignored, as it was an ugly hack. Below is a patch that is simpler and fixes

Re: mg backup directory

2017-05-26 Thread Lucas Gabriel Vuotto
On 26/05/17 12:38, Florian Obser wrote: On Fri, May 19, 2017 at 02:11:22PM -0300, Lucas Gabriel Vuotto wrote: Previous patch shall be ignored, as it was an ugly hack. Below is a patch that is simpler and fixes expandtilde instead, so it fixes the problem in other situations (writing files to ~

Re: mg backup directory

2017-05-26 Thread Florian Obser
On Fri, May 19, 2017 at 02:11:22PM -0300, Lucas Gabriel Vuotto wrote: > Previous patch shall be ignored, as it was an ugly hack. Below is a patch > that is simpler and fixes expandtilde instead, so it fixes the problem in > other situations (writing files to ~, for example). The only thing that I

Re: mg backup directory

2017-05-19 Thread Lucas Gabriel Vuotto
Previous patch shall be ignored, as it was an ugly hack. Below is a patch that is simpler and fixes expandtilde instead, so it fixes the problem in other situations (writing files to ~, for example). The only thing that I'm not sure is whether to use getuid or geteuid. Any suggestion / explanat

Re: mg backup directory

2017-05-12 Thread Lucas Gabriel Vuotto
Sorry, space got mangled in previous email. Index: fileio.c === RCS file: /cvs/src/usr.bin/mg/fileio.c,v retrieving revision 1.103 diff -u -p -u -p -r1.103 fileio.c --- fileio.c28 Jul 2016 21:40:25 - 1.103 +++ fileio.c

mg backup directory

2017-05-12 Thread Lucas Gabriel Vuotto
Hi tech@, mg(1)'s backup-to-home-directory writes backup files to `~/.mg.d' according to the manpage. In order to expand the tilde, it uses a custom function (expandtilde, fileio.c:700) which uses the pw entry for the user name returned by getlogin(2). This can lead to an undesired result if mg i