[Top][All Lists]

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

Re: how about a find-library-other-window command?

From: Juri Linkov
Subject: Re: how about a find-library-other-window command?
Date: Wed, 20 Jun 2007 00:54:35 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> - make <foo> use a new command like `switch-or-pop-to-buffer' which behavior
>   depends on a "config var".

Maybe some more clear and short name like `show-buffer'.

> - add prefix keys such as C-x 4 which can force one of the two behaviors for
>   the next command (or maybe just one prefix key C-x 4 which toggles the
>   behavior of the next command).

C-x 4 or some such prefix could automatically add the command's context
(buffer name + this-command) to the config variable, so the next call
without C-x 4 will reuse this preference once explicitly defined by calling
the command with the C-x 4 prefix.

> - make the "config var" sufficiently complex that it doesn't just choose
>   "always pop" or "always switch" but can choose different defaults for
>   different commands.  How to do that is up-in-the-air:
>   - Maybe switch-or-pop-to-buffer would look at this-command (yuck) and do as
>     assq search in a config alist based on that.
>   - Or switch-or-pop-to-buffer would take an additional argument to specify
>     the key to use an the alist search.
>   - It would probably be good to be able to specify not just different
>     behaviors depending on the command but also depending on the buffer in
>     which it is executed (e.g. "always use switch when done inside a *Help*
>     buffer").

If there are too many parameter types used in the config variable (the
target buffer name, the source buffer name, this-command), another option
would be to allow a predicate function in such a config variable.

Juri Linkov

reply via email to

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