kostafey / popup-switcher Goto Github PK
View Code? Open in Web Editor NEWSwitch to other buffers, files and functions in emacs via popup
Switch to other buffers, files and functions in emacs via popup
Add the .
directory to the list so that we can utilize the dired-mode
too.
Hello, when trying to invoke psw-switch-buffer
or psw-switch-function
I get the following error:
Debugger entered--Lisp error: (invalid-function (ask-user-about-supersession-threat (_)))
(ask-user-about-supersession-threat (_))()
psw-popup-menu(:item-names-list ("index.php" "*scratch*" "*Messages*" "*straight-process*" "*Compile-Log*" "*lsp-log*" "*iph*" "*iph::stderr*") :fallback #f(compiled-function (key _) #<bytecode 0x1832365>) :position nil :initial-index nil)
psw-switcher(:items-list (#<buffer index.php> #<buffer *scratch*> #<buffer *Messages*> #<buffer *straight-process*> #<buffer *Compile-Log*> #<buffer *lsp-log*> #<buffer *iph*> #<buffer *iph::stderr*>) :item-name-getter #f(compiled-function (buffer) #<bytecode 0x1832329>) :switcher switch-to-buffer :fallback #f(compiled-function (key _) #<bytecode 0x1832365>) :initial-index nil)
psw-switch-buffer()
funcall-interactively(psw-switch-buffer)
call-interactively(psw-switch-buffer record nil)
command-execute(psw-switch-buffer record)
execute-extended-command(nil "psw-switch-buffer")
smex-read-and-run(("toggle-debug-on-error" "psw-switch-function" "psw-switch-buffer" "projectile-switch-project" "projectile-discover-projects-in-directory" "customize-group" "projectile-find-file" "straight-rebuild-package" "mark-whole-buffer" "customize-face" "flymake-mode" "comment-region" "uncomment-region" "describe-variable" "indent-region" "describe-font" "yas-reload-all" "customize-variable" "customize" "compile-llncs-and-open" "global-display-line-numbers-mode" "lsp-mode" "lsp-rename" "company-yasnippet" "fringe-mode" "lsp-ui-mode" "org-version" "describe-face" "line-number-mode" "lsp-organize-imports" "lsp-workspace-show-log" "org-reload" "company-box-mode" "window-divider-mode" "what-cursor-position" "imenu" "what-face" "linum-mode" "lsp-ui-imenu" "flycheck-mode" "report-emacs-bug" "lsp-format-buffer" "copy-region-as-kill" "lsp-describe-session" "show-paren-mode" "describe-function" "lsp-ui-sideline-mode" "flycheck-verify-setup" "lsp-restart-workspace" "lsp-workspace-restart" ...))
smex()
funcall-interactively(smex)
call-interactively(smex nil nil)
command-execute(smex)
Emacs 26.3
I have seen strange behaviour of psw-switch-function
, where it sees the items but does not move point to the selected one.
On some files (for example my 1-function pel-benchmark.el) executing psw-switch-function
changes the markers value inside imenu--index-alist
which then prevents it (and any other imenu based navigation) from moving point to the proper location.
I started investigating and have identified that when this happens, the imenu--index-alist
is modified during the execution of pew-switcher
doing it's (funcall switcher (psw-get-item-by-name ...))
form. I instrumented the code with extra (message) forms to dig further and then the issue disappeared. It now works fine with all instrumentation removed....
I saw this issue with Emacs 26.3 and 27.1. I was trying to debug on Emacs 26.3. I tried debug-on-variable-change
on imenu--index-alist
but it did not trigger. I wonder if it was modified by lax-plist-get
called by paw-get-item-by-name
. This function is written in C and would not trigger debug-on-variable-change.
Now that I can't reproduce the problem, and I know I've seen it happening, I am wondering what else I can do to investigate the issue. Any idea would be welcome.
I wrote this issue in case someone has seen the problem and has some ideas as to where the problem could be. I'll continue investigating if I can reproduce the issue again. When it was occurring it was occurring all the time.
After opening *.org file (org-mode is activated automatically), first call to psw-switch-buffer shows popup menu incorrect. I can select menu item only by mouse. Next, function psw-switch-buffer works correctly.
GNU Emacs 24.3.1, popup-switcher 0.2.2
I use your plugin as replacement for standard commands for finding files, switching buffers and opening recent files. But there is similar pattern for killing buffer(s). Can you please add popup for this function too?
I see that this popup should kill buffer and close after pressing RET
and kill buffer, but not close (until there are no available buffers) when desired buffer is selected and I press k
or d
to be able to kill more than one buffer invoking popup only once.
The code:
-mapcat
function from dash, yet it does not require it not identify it as a requirement,These 2 problems are identified by the byte-compiler.
I have fixed the problems in my fork and will submit a PR just next to this report.
psw-switch-buffer list buffer menu, always highlight current file, I think highlight previous buffer will be better.
Trying to call function psw-switch-buffer fails if dired was started.
Minibuffer message: Args out of range: "~", 0, 2.
After closing dired, popup-switcher works good again.
GNU Emacs 24.3.1, popup-switcher 0.2.2
Hi. There is small problem for popup-imenu
in regard to flex matching: it doesn't tolerate duplicates at the moment. The thing is that imenu may contain items, like overloaded methods, that I'd like to match and switch between them. My suggestion would be to drop flx-ido
dependency and implement flx-popup
here, to be able to fully control flx
match in a way, appropriate for particular switching function. What do you think?
I have a symlink to Dropbox
directory on another partition. Whenever I select this symlink it opens the Dropbox
directory in dired-mode
and closes psw-navigate-files
popup. This is not what I expect to happen. This should only happen when I use .
for the current directory.
popup-switcher does not work already long time. It just does not show popup menu. Environment: Arch Linux, GNU Emacs 24.4.1, popup 20141215.349 (0.5.2). popup-switcher 20141224.326 (0.2.6).
Backtrace:
Debugger entered--Lisp error: (void-function remove-if)
(remove-if (function (lambda (buf) (or (minibufferp buf) (let ((buf-name (buffer-name buf))) (and (>= (length buf-name) 2) (equal (substring buf-name 0 2) " *")))))) (buffer-list))
psw-get-buffer-list()
(psw-switcher :items-list (psw-get-buffer-list) :item-name-getter (quote buffer-name) :switcher (quote switch-to-buffer))
psw-switch-buffer()
call-interactively(psw-switch-buffer nil nil)
command-execute(psw-switch-buffer)
The readme screenshots show a broken image icon, at the bottom of the Usage
section:
https://github.com/kostafey/popup-switcher#usage
Clicking on them opens a blank page with the text: Not Found
They link to:
<img src="https://dl.dropboxusercontent.com/u/820526/psw-switch-buffer.png" width="600" />
<img src="https://dl.dropboxusercontent.com/u/820526/psw-switch-function.png" width="600" />
It might be better to host them on Github.
I installed popup-switcher to quickly close buffers without having to open ibuffer, and it would speed things up by not having to open it multiple times.
edit: nvm, I checked the closed issue and see it's not possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.