help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: icicle-kill-buffer should not delete the frame


From: Drew Adams
Subject: RE: icicle-kill-buffer should not delete the frame
Date: Wed, 23 May 2007 09:58:25 -0700

> How can I tell icicles to not also delete the frame the buffer is in.
> This is the default behaviour of my setup. Is this the desired
> behaviour of icicles? I am used to always having 2 frames open so I
> find this behaviour very annoying. I have not found (using icicles of
> course:) ) any icicle variable or function to change this behaviour.
>
> Have I missed something?

Are you talking about when you kill a buffer, with, for example, `C-x k'? If
so, then no, you have not missed anything. There is no Icicles user option
for changing this behavior. However, there are ways to handle it.

The fact that the frame is being deleted is, I think, due to other libraries
that Icicles takes advantage of if they happen to be loaded: `misc-cmds.el'
and `frame-cmds.el'.

Are you using library `misc-cmds.el'? Command `icicle-kill-buffer', bound to
`C-x k', uses `kill-buffer-and-its-windows' instead of `kill-buffer', if the
former is defined. Library `misc-cmds.el' defines
`kill-buffer-and-its-windows'. So if you do not use library `misc-cmds.el'
then the frame should not be deleted.

`kill-buffer-and-its-windows' actually calls `delete-window' to delete all
windows showing the buffer; it does not, by itself delete the frame. The
fact that your frame (not just the window) is deleted by `delete-window'
suggests that you also use library `frame-cmds.el' - is that right?

If so, `delete-window' deletes the frame too, if it has only one window. So,
if you use `misc-cmds.el' but you don't use `frame-cmds.el', then only the
window will be deleted, not the frame (and only if there are other windows
on the same frame).

If you want to use both `misc-cmds.el' and `frame-cmds.el', then you can
either undefine `kill-buffer-and-its-windows' (by using `fmakunbound') of
make it an alias of `kill-buffer'.

Another alternative is to bind `C-x k' to a different command from
`icicle-kill-buffer' (use vanilla `kill-buffer', for instance). However,
Icicles uses the same function, `icicle-kill-a-buffer', in other places
besides as the action function of mult-command `icicle-kill-buffer'.

In particualar, `icicle-kill-a-buffer' is used as the deletion action for
several Icicles multi-commands involving buffers, so that you can delete
selected buffers on the fly (using `S-delete') during buffer-name
completion. This is the case for these commands: `icicle-buffer',
`icicle-buffer-list', and `icicle-object-action'. If you want to inhibit the
frame deletion everywhere, then simply rebinding `C-x k' will not be
sufficient (plus, you will lose the features provided by
`icicle-kill-buffer').

HTH.

BTW, I'm happy to reply to questions about Icicles on gnu-help-emacs, but
I'm not sure that is the best place - it is a general list about GNU Emacs.
You can also use the Emacs Wiki for that, in particular, these pages:

http://www.emacswiki.org/cgi-bin/wiki/IciclesIssues - report bugs

http://www.emacswiki.org/cgi-bin/wiki/IciclesDiscussion - discussion,
feedback

Finally, you can also report Icicles bugs by choosing "Send Bug Report" from
the Icicles menu or using `M-x icicle-send-bug-reportÂ’.







reply via email to

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