Subject: bug#1229: generate-new-buffer-name could be more efficient

From: Glenn Morris <[email-masked]>
Date: Tue, 03 Jul 2012 13:21:12 -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 ? :)