[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow access to files using UNC path

From: Damien Elmes
Subject: Re: Slow access to files using UNC path
Date: Sun, 19 Sep 2004 12:44:15 +0900
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Romain Francoise <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]