From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 1229@debbugs.gnu.org
Subject: bug#1229: generate-new-buffer-name could be more efficient
Date: Tue, 03 Jul 2012 13:21:12 -0400 [thread overview]
Message-ID: <ujfw984v7b.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvlij1ospt.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 03 Jul 2012 09:58:30 -0400")
Stefan Monnier wrote:
>> + sprintf (number, "-%"pD"d", Frandom (make_number (999999)));
>
> I don't like this arbitrary constant. Maybe we could use something
> like "N * Flength (Vbuffer_alist)".
OK; though personally I don't see that it matters. IIUC, mkstemp,
fileio.c's make_temp_name, etc, all use a finite number of possible
random states, and they don't have the <2>... fallback that
generate-new-buffer-name does.
(Another option is to extract the random scheme that make_temp_name uses
to a separate function and use that here too.)
What do you want the arbitrary constant N to be ? :)
next prev parent reply other threads:[~2012-07-03 17:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e3tzb3pzkm.fsf@fencepost.gnu.org>
2012-07-03 7:33 ` bug#1229: generate-new-buffer-name could be more efficient Glenn Morris
2012-07-03 13:58 ` Stefan Monnier
2012-07-03 17:21 ` Glenn Morris [this message]
2012-07-03 17:27 ` Stefan Monnier
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=ujfw984v7b.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=1229@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).