From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: separate name uniquification from `generate-new-buffer-name' Date: Wed, 26 May 2010 02:19:26 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1274843808 26140 80.91.229.12 (26 May 2010 03:16:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 May 2010 03:16:48 +0000 (UTC) Cc: Drew Adams , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 26 05:16:46 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OH76p-0005oI-0t for ged-emacs-devel@m.gmane.org; Wed, 26 May 2010 05:16:43 +0200 Original-Received: from localhost ([127.0.0.1]:50136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OH76e-0005uw-8v for ged-emacs-devel@m.gmane.org; Tue, 25 May 2010 23:16:32 -0400 Original-Received: from [140.186.70.92] (port=35125 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OH6vu-0006qo-Pf for emacs-devel@gnu.org; Tue, 25 May 2010 23:05:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OH4Lb-0004c6-TF for emacs-devel@gnu.org; Tue, 25 May 2010 20:19:49 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:65513) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OH4Lb-0004by-No for emacs-devel@gnu.org; Tue, 25 May 2010 20:19:47 -0400 Original-Received: by fxm11 with SMTP id 11so3455948fxm.0 for ; Tue, 25 May 2010 17:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=0GOEHXXLiyAd9HgHClaUK5/nfttY2S9b0kYfx8FGKeY=; b=sIF15QGSz+b3ytd3xWI/cXZuHs/fD5X+B5uodsUS071yw4dIdK7BC3ZDlIWW4NMbGc R5f19vIrUCOOUfwpurB2ORadKXmoH8e7zAI8FBUeFWYienvm85AcOU9reyY38o4aNr+r jGHkGW2kypuNQwwO7SbG+PqkgqT0V7ca7kEYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=pGZaa3I/YS3SgzNwfQz0sMAVf1plU+aCH8sooMU0qomltzDafJAC6znfNIgD409uoB 4W2itCFaTNbV+EOtsIcT/NER3RwAovU8ghsn/Dx9NEjU3G0Rr4dCx2tpMz4O9vahp1cp mAbpvtkpw40anYEiYRhAUyfiXn38BNdWQ96oo= Original-Received: by 10.204.22.75 with SMTP id m11mr3316177bkb.51.1274833186305; Tue, 25 May 2010 17:19:46 -0700 (PDT) Original-Received: by 10.204.157.19 with HTTP; Tue, 25 May 2010 17:19:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125272 Archived-At: On Tue, May 25, 2010 at 21:30, Stefan Monnier wr= ote: > A good way to fix it is to come up with a good > name-buffer-function variable that holds a function that's run whenever > a buffer name is chosen or modified. =C2=A0This variable's default would = be > a function that implements the usual stuff and it could be replaced > by uniquify to do something more clever. As the comment in uniquify.el explains, the trouble is that usually the function to generate a new buffer name gets only the desired (non-unique) buffer name, not the intended use of the buffer, whether it is going to visit a file (and its name), etc. That somewhat limits the kinds of "uniquifyings" that can be done at buffer-creation time. Juanma