From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Damien Elmes Newsgroups: gmane.emacs.devel,gmane.emacs.erc.general Subject: Re: Slow access to files using UNC path Date: Sun, 19 Sep 2004 12:44:15 +0900 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <878yb6q5ww.fsf@mobile.repose.cx> References: <68c73b1a04083122477869f5a@mail.gmail.com> <68c73b1a0409080600626643cf@mail.gmail.com> <68c73b1a040908220473b70936@mail.gmail.com> <68c73b1a04090823245a5d027c@mail.gmail.com> <68c73b1a04091223507210add9@mail.gmail.com> <87u0tveqtk.fsf@orebokech.com> <874qlve3vb.fsf@orebokech.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095567684 5654 80.91.229.6 (19 Sep 2004 04:21:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Sep 2004 04:21:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 19 06:21:11 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C8tCJ-0005KW-00 for ; Sun, 19 Sep 2004 06:21:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8tI7-0002se-Db for ged-emacs-devel@m.gmane.org; Sun, 19 Sep 2004 00:27:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C8tI0-0002sO-PR for emacs-devel@gnu.org; Sun, 19 Sep 2004 00:27:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C8tHz-0002s5-PK for emacs-devel@gnu.org; Sun, 19 Sep 2004 00:27:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8tHz-0002s2-Lv for emacs-devel@gnu.org; Sun, 19 Sep 2004 00:27:03 -0400 Original-Received: from [69.93.41.133] (helo=poseidon.linuxengine.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C8tC0-0005OK-Qp for emacs-devel@gnu.org; Sun, 19 Sep 2004 00:20:53 -0400 Original-Received: from mobile.repose.cx (ppp8315.hakata02.bbiq.jp [210.203.253.187]) (authenticated bits=0) by poseidon.linuxengine.net (8.13.0/8.12.10) with ESMTP id i8J4KnZj005768; Sat, 18 Sep 2004 23:20:50 -0500 Original-Received: by mobile.repose.cx (Postfix, from userid 1000) id B52F9E0098; Sun, 19 Sep 2004 12:44:15 +0900 (JST) Original-To: erc-help@lists.sourceforge.net In-Reply-To: <874qlve3vb.fsf@orebokech.com> (Romain Francoise's message of "Sat, 18 Sep 2004 22:09:12 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.39 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27265 gmane.emacs.erc.general:482 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27265 Romain Francoise writes: >> Where is the use of "" as a value of buffer-file-name documented? > > See the commit message for erc-log.el rev. 1.7: > > | (erc-log-setup-logging): set buffer-file-name to "", as (basic-save-buffer) > | will prompt for a buffer name before invoking hooks. the buffer-file-name > | will be overridden by (erc-save-buffer-in-logs) anyway - the main danger > | of doing this is write-file-contents hooks. Let's see if anyone complains. > | (erc-save-buffer-in-logs): return t, so that further write hooks are not run > > The real problem is probably that buffer-file-name cannot be set in > advance to the correct value since the filename will often be based on > the date/time of saving. When a buffer has no file name, basic-save-buffer will prompt the user interactively for one. Since before-save-hook isn't run until after the interactive request for a file name, this prevents a hook from setting a file name based on external factors (such as the time), without first requiring the user to input some junk data. The use of "" was a hack to avoid prompting, since for ERC logging, the value of buffer-file-name is ignored and computed by a routine instead. Cheers, Damien