Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Switch to other buffers, files and functions in emacs via popup
Emacs Lisp
Branch: master

License GPL 2 MELPA


popup-switcher provides (yet another) convenient way to switch buffers, optional navigation possibility through functions/methods and any other kind of switching you like. It's easy to use and extend for custom purposes. It uses popup lib for better sense.


Add MELPA (if not yet) to your package-archives list:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . ""))

Then you can install popup-switcher with the following command:

M-x package-install [RET] popup-switcher [RET]

Load popup-switcher:

(require 'popup-switcher)



Add a hotkey to psw-switch-<X> to you taste (for the full list of predefined switching functions see Usage section), e.g.:

(global-set-key [f2] 'psw-switch-buffer)

Maximum number of visible items

Set maximum number of visible items in popup menus

(setq psw-popup-menu-max-length 15)

Menu position

Non-nil psw-in-window-center means horizontal locate popup menu in the window center. Locate popup menu in the fill-column center otherwise (by default).

(setq psw-in-window-center t)

Fuzzy matching

Non-nil psw-use-flx enables flx fuzzy matching engine for isearch in popup menus. flx-ido is required in this case, it can be installed by your favorite approach. E.g. by MEPLA: M-x package-install [RET] flx-ido [RET]

(setq psw-use-flx t)

Modified buffers marker

Non-nil psw-mark-modified-buffers means mark modified buffers with star char (*) expect special beffers like *Messages* any time you call psw-switch-buffer.

Functions/methods navigation

To navigate through functions/methods names you should add the most recent CEDET and load eassist lib. This feature is optional, and popup-switcher can operate without CEDET (and therefore without navigation possibility through functions/methods).

;; Activate semantic
(semantic-mode 1)

;; Load contrib library
(add-to-list 'load-path "~/.emacs.d/cedet/contrib/")
(require 'eassist)

(eval-after-load "eassist"
  '(global-set-key [f3] 'psw-switch-function))


List of interactive functions:

Command Description
psw-switch-buffer switch buffers through popup menu
psw-switch-recentf switch recent files
psw-navigate-files simple file navigator
psw-switch-function switch (navigate) through functions in the current buffer (optional)
psw-switch-projectile-files switch among projectile project files list (optional)

Run M-x psw-switch-buffer [RET] (or your selected key). Type some letters from the name of buffer of interest (since isearch is enabled on start) to filter buffers list, use arrow keys and [RET] or mouse to select buffer.

When you are in menu created by psw-switch-buffer, you can kill selected buffer by pressing C-d or C-k.



Copyright © 2013-2015 Kostafey and contributors

Distributed under the General Public License 2.0+

Something went wrong with that request. Please try again.