From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: other-buffer advice on kill-buffer Date: Tue, 2 Aug 2011 11:00:13 +1000 Message-ID: References: <8662mgg2ea.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312246834 22042 80.91.229.12 (2 Aug 2011 01:00:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 01:00:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?ISO-8859-1?Q?J=E9r=E9my_Compostella?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 02 03:00:30 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qo3LI-0000oJ-IF for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2011 03:00:20 +0200 Original-Received: from localhost ([::1]:54512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo3LH-0004WZ-Qh for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2011 21:00:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo3LE-0004WH-K6 for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:00:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qo3LD-0006bN-Ho for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:00:16 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:50097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo3LD-0006bA-7t for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:00:15 -0400 Original-Received: by iyb14 with SMTP id 14so9251538iyb.0 for ; Mon, 01 Aug 2011 18:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=W9ePgtAX48KqN70f/pvTrmP4W8mXWIz0O6tY3cZPT3o=; b=EKTE9u0zjgswCdQ4sMR6jyZsEQk5hhFZg03+N2fRsGBYpfogRowtiWjdcjFlQ8BuAH fXl9/p3NQneFH2irP4KQGx4rCQOT0RslFQVPmTahLQqxohCV29u2qFBSIs4b7oElkjM4 23IwEIFWSqcjbBmC1vKXLOUF4wX7aCFeNcE9U= Original-Received: by 10.231.81.133 with SMTP id x5mr3284847ibk.161.1312246813985; Mon, 01 Aug 2011 18:00:13 -0700 (PDT) Original-Received: by 10.231.36.200 with HTTP; Mon, 1 Aug 2011 18:00:13 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142658 Archived-At: 2011/8/2 Tim Cross : > 2011/8/2 J=E9r=E9my Compostella : >> All, >> >> I'm trying to modify the behavior of the kill-buffer function to fit my >> needs. I would like to limit the list of eligible buffers used to select >> the buffer which will be displayed in place of the killed buffer. >> >> I have tried to advice the other-buffer function which seems called >> (Cf. buffer.c) but my advice is never called in this case. Indeed, my >> other-buffer advice is correctly called on switch-to-buffer call but >> never on kill-buffer call. >> >> So am I missing something ? >> Is there a restriction on advices for C implemented function ? >> How the kill-buffer function select the new displayed buffer ? Could I >> really modify its behavior and how ? >> > > Yes, there are some restrictions in how defadvice can be used and > which function sit can affect. From memory, you cannot advise > functions implemented in C, only those implemented in elisp. > > With respect to the buffer display, there is a current work being done > in this area for emas 24. If you are using emacs 24, have a look at > the buffer-display-alist thread. One of the things that was being > asked for was examples of how the new configuration could/would be > used. Your request may be a good test case. > > If your using emacs23 or earlier, personally, I would hold off until > the emacs 24 changes have settled as you will likely have to change > things once emacs 24 is released anyway. One of the objectives, as I > understand it, is to make this sort of configuration easier and more > flexible.so I expect you would be considered to be what they call an > 'interested party'. > Correction - the thread you should look at is called display-buffer-alist simplifications. Based on your subsequent messages regarding the activity mode you have developed, I think this thread may be even more relevant and worth checking out. Tim