From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist Date: Sat, 29 Sep 2012 08:51:34 -0700 Message-ID: <29382156B26B45EE84512961BC10CB44@us.oracle.com> References: <87bogubqjy.fsf@gnu.org><873925ebpd.fsf@gnu.org><87ipb031aj.fsf@kwarm.red-bean.com> <87sja4t48j.fsf@gmail.com><9D98A7802F07462887BCC67BE194243B@us.oracle.com><87haqildr1.fsf@gmail.com><877grduvfz.fsf@gmail.com> <87ehlkoobb.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348933977 5128 80.91.229.3 (29 Sep 2012 15:52:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2012 15:52:57 +0000 (UTC) Cc: 'Karl Fogel' , 12507@debbugs.gnu.org To: "'Thierry Volpiatto'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 29 17:53:02 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1THzLc-00019u-0F for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2012 17:52:56 +0200 Original-Received: from localhost ([::1]:56157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THzLW-0007gs-Qx for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Sep 2012 11:52:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THzLT-0007gk-PD for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2012 11:52:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THzLS-0002A9-Kd for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2012 11:52:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THzLS-0002A5-H4 for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2012 11:52:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1THzLh-000551-U8 for bug-gnu-emacs@gnu.org; Sat, 29 Sep 2012 11:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Sep 2012 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12507-submit@debbugs.gnu.org id=B12507.134893392519462 (code B ref 12507); Sat, 29 Sep 2012 15:53:01 +0000 Original-Received: (at 12507) by debbugs.gnu.org; 29 Sep 2012 15:52:05 +0000 Original-Received: from localhost ([127.0.0.1]:33772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THzKm-00053q-T3 for submit@debbugs.gnu.org; Sat, 29 Sep 2012 11:52:05 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:20921) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THzKk-00053Z-Fk for 12507@debbugs.gnu.org; Sat, 29 Sep 2012 11:52:03 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8TFphv8017933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 29 Sep 2012 15:51:44 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8TFphD1012973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 29 Sep 2012 15:51:43 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8TFpgl4029366; Sat, 29 Sep 2012 10:51:42 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 29 Sep 2012 08:51:42 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87ehlkoobb.fsf@gmail.com> Thread-Index: Ac2eVOYwUIqsqTJzToaPjq5ga5wftgAAY/mQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65013 Archived-At: > >> > The question about visiting the file is still open, though. > >> > >> I am using now the patch I sent here yesterday and it works > >> really good, faster and do backups (numered) as expected. > >> Hope it will be applied here in emacs because it DTRT. > >> > >> I don't understand what is the problem with "visiting the > >> file". See in precedent post why it is not bad visiting the > >> file. In the special case of bookmark-write-file, it is > >> really not the problem. > > > > Your question is for Stefan. Your patch is equivalent to > > the change I proposed originally: just replace > > `write-region' with `write-file'. > > No, this is ineficient too, you write twice the same data. How so? What am I missing? What part of `write-file' writes the same data twice? All I see in the `write-file' definition, in terms of writing, is a call to `save-buffer'. > The important thing is writing directly to the buffer of file. > For the backup thing, yes it is similar, but with unneeded steps, Steps that you seem to claim constitute an additional disk write. I don't see that. What part of `write-file' performs an extra disk write? The only "extra" steps I see in `write-file' are setting the visited file name, setting the buffer status to modified, checking that the file is `file-writable-p', and setting `buffer-read-only' to nil. And running `vc-find-file-hook'. You are, I think, side-tracking the issue a bit. The question to be decided is whether to allow backups. It is not whether to use `write-file', `save-buffer', `basic-save-buffer', or something else. I don't really care exactly how it's done. I have confidence it will be done efficiently if it is decided to be done. > going straight to save-buffer is better and faster IMO (of > course if you have started writing data in the file buffer) > > But the worst thing is the actual version with write-region: > Slow and backup broken. I don't see that the current version is slow, either. But it certainly does not provide for backing up. That is the question to be decided.