From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: TODO Date: Tue, 26 Feb 2008 13:26:34 -0500 Message-ID: References: <5E2DA7EF-D0F1-4B0C-A3DC-F0B64FE2FE00@gmail.com> <13170DB6-B7A1-4843-AAF5-AB68B65D2331@gmail.com> <18370.18434.78349.822958@kahikatea.snap.net.nz> <200802261813.m1QIDEku015891@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204050445 12235 80.91.229.12 (26 Feb 2008 18:27:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2008 18:27:25 +0000 (UTC) Cc: mail.vjrao@gmail.com, emacs-devel@gnu.org, Nick Roberts , "rms@gnu.org" To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 19:27:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JU4WX-0000GE-Jz for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2008 19:27:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JU4W1-0004EO-Fj for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2008 13:26:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JU4Vt-0004AF-Fg for emacs-devel@gnu.org; Tue, 26 Feb 2008 13:26:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JU4Vq-000464-Kw for emacs-devel@gnu.org; Tue, 26 Feb 2008 13:26:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JU4Vq-00045j-0A for emacs-devel@gnu.org; Tue, 26 Feb 2008 13:26:46 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JU4Vm-0005A8-7b; Tue, 26 Feb 2008 13:26:42 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9A76D2CF97B; Tue, 26 Feb 2008 13:26:41 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 97A3F3FE0; Tue, 26 Feb 2008 13:26:34 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 8403D6CAA2; Tue, 26 Feb 2008 13:26:34 -0500 (EST) In-Reply-To: <200802261813.m1QIDEku015891@sallyv1.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 26 Feb 2008 10:13:13 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.709, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_COPYWRT 0.11, STOCK_S_SYMB 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90519 Archived-At: >> Please let me know if anyone is already working on one of these tasks. >> >> ** make emacsclient accept -nw as a synonym to -t. >> >> ** Replace some uses of the preprocessor code in Makefile.in with the >> equivalent autoconf. >> >> ** Make "emacs --daemon" start emacs without showing any frame. >> Use emacsclient later to open frames. > AFAIK nobody has publicly announced that is working on any of these. > Do you have a copyright assignment on file? If not, it would make sense > to get started on that as soon as possible, so that it is ready by the > time you finish writing the code. >> ** Make vc-checkin avoid reverting the buffer if has not changed after >> the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough. > I have a patch for this one. > But it needs a few more eyes on it from people that know the code > involved very well to make sure it is correct and the right thing to do. > The patch itself is not too complicated. BTW, I'd like someone to clarify the goal. I.e. what is it trying to fix. It seems that if the file hasn't been changed, the current code should at the very least end up not modifying the buffer (since insert-file-contents already compares the bytes to find the unchanged prefix and suffix). So what is the difference in this case between calling revert-buffer and not calling it? Also I expect that if the file hasn't changed, it will often have kept its modification time as well, so in which circumstances would the modtime check fail but the md5 check succeed? Stefan > --- vc.el 10 Oct 2007 10:34:53 -0700 1.464 > +++ vc.el 11 Oct 2007 12:18:02 -0700 > @@ -1328,7 +1327,19 @@ > (save-excursion > ;; t means don't call normal-mode; > ;; that's to preserve various minor modes. > - (revert-buffer arg no-confirm t)) > + (if (string= > + (with-temp-buffer > + ;; Insert the file on disk in a temporary buffer and compute the md5 there. > + (let ((coding-system-for-read 'binary)) > + (insert-file-contents file) > + (md5 (current-buffer)))) > + (md5 (current-buffer))) ;; md5 for the current buffer > + (let ((writable (file-writable-p (buffer-file-name)))) ;; Try to set the read-only state. > + (unless (eq buffer-read-only writable) > + (setq buffer-read-only writable)) > + (message "not reverting")) > + (message "reverting :-(") > + (revert-buffer arg no-confirm t))) > (vc-restore-buffer-context context))) > (defun vc-buffer-sync (&optional not-urgent)