Is there a way to select a buffer by part of its name using elisp?
For instance, the ag
package may create a buffer called
*ag search text:MyPtyhonClass dir:c:/projects/my_module/*
or the realgud
package may create a buffer called
*ipdb my_program.py shell*
My usual approach is to select a buffer by name with switch-to-buffer-other-window
. Here is how I might do it for a buffer called *Occur*
:
(switch-to-buffer-other-window "*Occur*")
When I try the same pattern using only part of a buffer name, such as ag search text:
or ipdb
, a new buffer called ag search text:
or ipdb
is created rather than selecting the buffer whose name contains that substring. That is, supposing there exists a buffer called *ag search text:MyPtyhonClass dir:c:/projects/my_module/*
, calling
(switch-to-buffer-other-window "*ag search text:")
creates a new buffer called *ag search text:
.
ag
oripbb
to understand what you're saying?all-completions
.