Comments (9)
To make it even worse, this changes the stack order of buffers, so that C-x b RET no longer switches to the "previous" buffer. At this point polymode is unusable for me.
from polymode.
If you, like me, do use ivy-switch-buffer
and friends you can go bruteforce with this regex:
(add-to-list 'ivy-ignore-buffers "\\[.+\\]")
EDIT (Ido version):
(setq ido-ignore-buffers '("\\` " "\\[.+\\]"))
from polymode.
Actually, just found this in Elisp manual:
Buffers that are ephemeral and generally uninteresting to the user have names starting with a space, so that the ‘list-buffers’ and ‘buffer-menu’ commands don’t mention them (but if such a buffer visits a file, it is mentioned). A name starting with space also initially disables recording undo information; see *note Undo::.
from polymode.
Hiding those buffers is a non-trivial change. I have in my agenda to re-start working on polymode this week after a long break. This issue is a priority.
this changes the stack order of buffers, so that C-x b RET no longer switches to the "previous" buffer.
What change do you mean more concretely? I don't understand what you mean.
Polymode shifts only its own "non-interesting" buffers at the end of the buffer stack. I am using ido and the most relevant buffer is always in front. I don't understand how a couple of more buffers in ido menu make polymode unusable.
from polymode.
Well, maybe it tries to shift, but fails. Tried both polymode from melpa and git head. I can just:
- C-x f file1.jsp
- C-x f file2.jsp
Now C-x b shows 'file1.jsp[js]' as the buffer it will switch to by default. This seems to be OK, since switching to that buffer effectively switches to 'file1.jsp', but in the course of my normal work I had worse cases where it would switch to something different entirely.
I also tried to change variable 'pm--ib-prefix' in the source code from empty string to one space, but that broke the mode entirely.
from polymode.
Loosely related, but I am currently using a function like this to kill all polymode buffers for the current buffer (useful when switching to plain markdown-mode
). Perhaps a similar approach can be used as advice (?) for the buffer list.
(defun ans/kill-polymode-buffers ()
"List all polymode implementation buffers."
(interactive)
(let* ((b (buffer-name))
(pattern (concat b "\\[.+\\]"))
(matched-buffers (-filter (lambda (buf) (s-matches? pattern (buffer-name buf))) (buffer-list)))
(n-matched (length matched-buffers)))
(-map #'kill-buffer matched-buffers)
(message "Killed %d polymode buffers." n-matched)))
from polymode.
We can make that regular expression a little bit tighter, since the part in square brackets is always at the end of the buffer name.
(add-to-list 'ivy-ignore-buffers "\\[.+\\]\\'")
from polymode.
Good one. Just out of curiosity:
Is it more appropriate to use \\'
than simply $
here?
from polymode.
Marginally. The following is a valid (if foolish) buffer name, since buffer names can contain newlines:
foo[bar]
baz
from polymode.
Related Issues (20)
- Debugger entered--Lisp error: (void-variable polymode-run-these-before-change-functions-in-other-buffers) HOT 4
- Detecting that I'm in an inner chunk, from a major mode hook HOT 2
- On entering emacs lisp source block, text at top of org file is underlined in yellow/red by flycheck HOT 1
- unable to install manually HOT 2
- Help with a (hopefully) simple polymode?
- Reproducible error: stuck in latex-mode
- Starting polymode with lsp, makes the cursor to jump to the end of buffer HOT 10
- can't find polymode via package-install? HOT 1
- electric-indent-mode
- How to run a function is indirect buffers with the same major mode only?
- Typescript-xml polymode
- Setting mode file local variable to polymode applies itself recursively infinitely until cancelled
- Background Adjustment when Background Unspecified
- polymode creates additional [web] buffer
- Interaction with nix-mode: font-lock broken HOT 4
- Chunks not following automatic Emacs switch to light/dark theme HOT 5
- Polymode, Poly-COMEEGA and COMEEGA (Collaborative Org Mode Enhanced Emacs Generalized Authorship)
- inner mode indentation not works on the first line after head mark
- org-mode links become invisible HOT 3
- Polymode does not work in org-edit-special
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polymode.