emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: other-buffer advice on kill-buffer


From: Tim Cross
Subject: Re: other-buffer advice on kill-buffer
Date: Tue, 2 Aug 2011 11:00:13 +1000

2011/8/2 Tim Cross <address@hidden>:
> 2011/8/2 Jérémy Compostella <address@hidden>:
>> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]