From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85711 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: check mtime of newsrc.eld before saving it Date: Wed, 04 Feb 2015 06:39:44 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <8761bhzz0f.fsf@lifelogs.com> References: <87twzdc86f.fsf@building.gnus.org> Reply-To: ding@gnus.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423050052 6700 80.91.229.3 (4 Feb 2015 11:40:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2015 11:40:52 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33950@lists.math.uh.edu Wed Feb 04 12:40:47 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YIyK6-0006mp-0W for ding-account@gmane.org; Wed, 04 Feb 2015 12:40:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1YIyJP-0002bK-8L; Wed, 04 Feb 2015 05:40:03 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YIyJM-0002at-8Z for ding@lists.math.uh.edu; Wed, 04 Feb 2015 05:40:00 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1YIyJH-0000D6-16 for ding@lists.math.uh.edu; Wed, 04 Feb 2015 05:39:59 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1YIyJE-0000nG-SO for ding@gnus.org; Wed, 04 Feb 2015 12:39:52 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YIyJD-0006O8-TT for ding@gnus.org; Wed, 04 Feb 2015 12:39:52 +0100 Original-Received: from c-98-229-61-72.hsd1.ma.comcast.net ([98.229.61.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2015 12:39:51 +0100 Original-Received: from tzz by c-98-229-61-72.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2015 12:39:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-229-61-72.hsd1.ma.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:eVJ8SvTXHMO9Jg+4XxlnCeN/xQU= X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85711 Archived-At: On Tue, 27 Jan 2015 12:40:40 +1100 Lars Ingebrigtsen wrote: LI> Ted Zlatanov writes: >> I sometimes update my newsrc.eld in a directory shared between multiple >> machines. I wanted a way to stop Gnus from overwriting the updated >> file. >> +(defcustom gnus-save-newsrc-file-check-timestamp nil >> + "Check the modification time of the newsrc.eld file before saving it. LI> I like it, but I don't think we really need this variable. Instead the LI> checking should always be on OK, I can make that change. But then I need... >> + (error "Couldn't save %s because it was updated" checkfile)))) LI> this should be a `y-or-n-p' instead, I think. That would make Gnus' LI> behaviour here be pretty consistent with how Emacs otherwise behaves LI> when writing data to files. ...a way to merge the on-disk newsrc.eld with the current one, because currently aborting is the only way to avoid overwriting either side's marks. Something that walks all the groups and merges each entry would be ideal; if the time of last group exit was recorded somewhere in the marks, then this would be simply a timestamp compare. Otherwise we may have to prompt the user for any groups with different marks. Could the newsrc.eld format be modified to record this? This is kind of related to the gnus-sync thing. Ted