unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Damien Elmes <damien@repose.cx>
Cc: erc-help@lists.sourceforge.net, emacs-devel@gnu.org
Subject: Re: Slow access to files using UNC path
Date: Thu, 23 Sep 2004 21:50:31 +0900	[thread overview]
Message-ID: <87r7otgne0.fsf@mobile.repose.cx> (raw)
In-Reply-To: <jwv65665v98.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 22 Sep 2004 08:59:47 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> than what?  What alternatives have you considered?  How is the buffer-save
> triggered (is it triggered by a timer, by the user selecting the buffer and
> hitting C-x C-s, by some other command in the main ERC buffer, indirectly by
> save-some-buffers, ...)?

Depending on the user's preferences, all of the above. Also possibly
by certain network activity.

> How about choosing the file name based on the date the buffer is
> created?

Then restarting emacs 20 times in one day will result in an
unnecessarily large amount of files.

> How about using "foo/bar-latest at first and switching to "foo/bar-<date>"
> in before-save-hook?

So theoretically bar-latest will never be written to? So basically
you're suggesting that instead of a blank value in the
buffer-file-name variable, we use something more misleading?

> How about always using "foo/bar-latest" as buffer-file-name and
> link/copy/move the file to "foo/bar-<date>" in after-save-hook?
>
> How about using "foo/bar-<date>" at buffer creation and in before-save-hook
> update the "<date>" part if necessary (if the date only includes the month,
> it's unlikely to change, and if the user restarts Emacs every day, the same
> will hold even if the date includes the day)?

At the moment emacs does not easily facilitate the dynamic generation
of a file name at save time. Your increasingly complicated suggestions
would solve the problem, but this level of complexity in what is
ultimately a hack in the first place seems unnecessary, IMHO.

If recent changes in emacs are going to prevent "" as a
buffer-file-name from working, then perhaps it would be better to have
a save hook which is called prior to the buffer-file-name being
checked, so these elaborate hacks are not necessary in the first place.

>> as it allows us to compute the file name on demand rather than attempt to
>> keep it updated by something like a timer.
>
> Hmmm.... doing it in a timer?  That sounds like trouble,

Exactly.

Cheers,

Damien

  reply	other threads:[~2004-09-23 12:50 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01  5:47 Slow access to files using UNC path Dhruva Krishnamurthy
2004-09-01  6:31 ` KOBAYASHI Yasuhiro
2004-09-01  6:42   ` Andre Spiegel
2004-09-01  9:50     ` Dhruva Krishnamurthy
2004-09-01 10:22       ` Dhruva Krishnamurthy
2004-09-01 12:13         ` Andreas Schwab
2004-09-01 13:15           ` Dhruva Krishnamurthy
2004-09-01 13:27             ` Andreas Schwab
2004-09-01 14:31               ` Stefan Monnier
2004-09-08  6:49     ` Dhruva Krishnamurthy
2004-09-08  8:18       ` Kim F. Storm
2004-09-08  8:41         ` Miles Bader
2004-09-08  8:53         ` Dhruva Krishnamurthy
2004-09-08 11:55         ` Stefan
2004-09-08 13:00           ` Dhruva Krishnamurthy
2004-09-08 16:44             ` Stefan Monnier
     [not found]               ` <m3656ov3ps.fsf@kfs-l.imdomain.dk>
     [not found]                 ` <68c73b1a040908220473b70936@mail.gmail.com>
     [not found]                   ` <68c73b1a04090823245a5d027c@mail.gmail.com>
     [not found]                     ` <jwvk6v3yytf.fsf-monnier+emacs@gnu.org>
     [not found]                       ` <jwv4qm7yxkx.fsf-monnier+emacs@gnu.org>
2004-09-13  6:50                         ` Dhruva Krishnamurthy
2004-09-13 12:39                           ` Stefan Monnier
2004-09-18 11:53                             ` Romain Francoise
2004-09-18 18:38                               ` Stefan
2004-09-18 20:19                                 ` Romain Francoise
2004-09-18 19:00                               ` Adrian Aichner
2004-09-18 20:09                                 ` Romain Francoise
2004-09-19  3:44                                   ` Damien Elmes
2004-09-19  7:01                                     ` Stefan
2004-09-19  7:25                                       ` Damien Elmes
2004-09-20  0:05                                         ` Richard Stallman
2004-09-20  5:28                                         ` Stefan
2004-09-21 23:46                                           ` Damien Elmes
2004-09-22 12:59                                             ` Stefan Monnier
2004-09-23 12:50                                               ` Damien Elmes [this message]
2004-09-23 13:12                                                 ` Stefan
2004-09-09  4:03           ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2004-07-18  9:29 Dhruva Krishnamurthy
2004-07-16 11:40 Dhruva Krishnamurthy
2004-07-16 13:22 ` Peter Lee
2004-07-17 13:23   ` Dhruva Krishnamurthy
2004-07-17 18:00     ` Andreas Schwab
2004-07-18  2:31       ` David Kastrup
2004-07-18  5:09         ` Eli Zaretskii
2004-07-18  6:12           ` Dhruva Krishnamurthy
2004-07-18  9:53             ` Andreas Schwab
2004-07-18 19:41             ` Eli Zaretskii
2004-07-19  4:35               ` Dhruva Krishnamurthy
2004-07-19 19:09                 ` Eli Zaretskii
2004-08-25  9:44                   ` KOBAYASHI Yasuhiro
2004-08-26  4:36                     ` Dhruva Krishnamurthy
2004-08-26  7:10                       ` KOBAYASHI Yasuhiro
2004-08-26  8:50                         ` Dhruva Krishnamurthy
2004-08-26 20:52                           ` Richard Stallman
2004-08-27  3:59                             ` Dhruva Krishnamurthy
2004-08-27 13:19                               ` Stefan Monnier
2004-08-30  4:46                                 ` Dhruva Krishnamurthy
2004-08-30  5:11                                 ` Dhruva Krishnamurthy
2004-08-30  8:32                                   ` Andreas Schwab
2004-08-30  9:27                                     ` Dhruva Krishnamurthy
2004-07-18  9:49         ` Andreas Schwab
2004-07-18 10:04           ` Dhruva Krishnamurthy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r7otgne0.fsf@mobile.repose.cx \
    --to=damien@repose.cx \
    --cc=emacs-devel@gnu.org \
    --cc=erc-help@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).