Comments (7)
I don't use helm, but patches are welcome.
Since nobody seems to be clamoring for this, it might be considered out of scope.
from perspective-el.
Let's keep this one open for now. I actually ran into a situation yesterday when I wanted this feature and remembered this ticket.
from perspective-el.
@alphapapa: I'm looking into this, and... I guess I'm not as proficient with Helm as I thought (which wasn't very).
How do I select a series of files in Helm and feed them to an arbitrary command, e.g., persp-add-buffer
? I usually just end up in Helm's projectile integration browser, and I know how to mark several files, but hitting Tab gives me a canned list of commands. I don't see a way to invoke a command on the selection. I read on the wiki something about making eshell aliases, but though I can pick an alias somewhere in the command tree, it doesn't seem to do anything at all (or maybe I didn't define one correctly).
from perspective-el.
With commit 0b693bd, helm-buffers-list
now lists buffers in all perspectives when called with a prefix argument. It now has actions to add to the current perspective, and to remove buffers from the current perspective. It supports both actions with multiple marked buffers. If anyone has ideas about how to make Helm work directly from persp-add-buffer
, let me know (either reopen this ticket or make a new one).
from perspective-el.
I'd like to be able to add multiple buffers at once without helm, just using the generic completing-read-multiple
(which I use via selectrum).
I was thinking about creating a new issue, but searched the closed issues first and found this. The issue title doesn't mention helm explicitly, so I think a more generic solution could be discussed.
Now that I think about it, it would be also useful to batch-remove buffers from a perspective. I haven't created my own completing-read-multiple
-functions, but whenever packages use that out of the box (e.g. for tagging), I found it incredibly useful.
Instead of via completing-read-multiple, it is also convenient to add/remove marked buffers from ibuffer
. Here's what I came up with:
(defun meliache/persp-ibuffer-remove-marked-buffers ()
(interactive)
(dolist (buffer (ibuffer-get-marked-buffers))
(persp-remove-buffer buffer)))
(defun meliache/persp-ibuffer-add-marked-buffers ()
(interactive)
(dolist (buffer (ibuffer-get-marked-buffers))
(persp-add-buffer buffer)))
It might be useful to have some similar functions built in or at least documented somewhere.
from perspective-el.
Re: completing-read-multiple
: I like that. I think persp-add-buffer
and persp-remove-buffer
can be modified to use completing-read-multiple
. There might be minor complications with persp-interactive-completion-function
.
Re: ibuffer. Your functions look fine, I can add them (feel free to open a PR [and don’t forget the needed declare-function
calls], or I’ll just do it later). What’s the right way to integrate them with ibuffer? Is there a keymap they should be added to? Or just let users run them with M-x?
from perspective-el.
Re: ibuffer. Thanks, I might do the PR. I came up with the functions rather on the fly, while writing the comment I wanted to write that such functions would be useful, but then I thought this should be easy to do myself if there's a way to get the marked buffers and it was. I didn't think much about keymaps yet, after all we don't have a special "persp-ibuffer" mode, so the only way would be to add keybindings to ibuffer-mode-map (or create a new keymap). So far I just used the commands interactively via M-x
. Maybe it would be useful to shadow the keybindings for persp-add-buffer
and persp-remove-buffer
with their ibuffer-versions while in ibuffer-mode, though this than makes it difficult to add/remove the ibuffer-buffer, so I'm not sure if that's good UX design.
When I run persp-ibuffer
and then meliache/persp-ibuffer-remove-marked-buffers
, this doesn't remove the removed buffers from the ibuffer view, so sometimes I call persp-ibuffer
again to update the view. It would be nice to have this update done automatically, though that shouldn't be done when run withing a normal ibuffer showing all perspectives.
Also I didn't think yet whether I should unmark the files after executing one of the above commands.
I think we could continue such discussions in the PR.
from perspective-el.
Related Issues (20)
- Perspective breaks after enable-theme HOT 5
- Perspective hides buffers when running Emacs as server HOT 4
- Current perspective name not being propertized in the mode-line HOT 5
- Display perspective in frame title HOT 7
- `C-x 5 2 ` different behaviour when running perspective with daemon HOT 2
- Perspective.el wipes out perspectives when a emacsclient frame is closed. HOT 2
- `persp-delete-frame` alters windows of other frames when killing frame with dedicated window HOT 1
- Issue with using ediff and perspective [sorted] HOT 6
- Compare to tabspaces? HOT 2
- Support eshell state save and restore
- Would it support different themes per frame? HOT 2
- Loading perspectives upon opening emacs HOT 5
- ibuf-ext.el not loaded HOT 2
- Feature request: Add `perspective-kill-other-buffers` HOT 3
- Perspective is killing lsp-servers when switching between perspective projects. HOT 7
- function to add buffer to persp other than current persp HOT 2
- a new function needed please. HOT 1
- problem with exwm-input-prefix-keys HOT 2
- How can I set a longer prefix key? HOT 1
- Avoid helm dependency? HOT 2
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 perspective-el.