Fork me on GitHub
#emacs
<
2018-09-28
>
andrea.crotti13:09:58

@gtzogana sometimes I just redefine the test as empty 😄

andrea.crotti13:09:09

so it means it still runs but at least it passes quickly

theeternalpulse21:09:01

How do I prevent "buffer creep" in the sense that I can dedicate workspaces to only allow buffers to come into view if they are part of a specific project?

vemv02:09:54

projectile-switch-to-buffer might be a good start

theeternalpulse13:09:32

I use that all the time, but it's prev-next buffer that isn't aware of projects. I started to look into making a next/previous buffer for projects but wanted to see if there's an equivalent. Basically I want to dedicate a layout to a specific project.

vemv13:09:02

I use such an approach, it works great but it's too tailor-made to share it (yet) Basically I have a hashmap mapping project-id -> filename-list, and my next/prev buffer functions shift the order of those lists by one position

theeternalpulse13:09:50

What are some of the vars you use to build the list, if you can could you sahre it in a gist, I'm curious to build on it

theeternalpulse13:09:05

I wanted to do something like check if the next buffer was in the same layout, if not then go to the nearest one that was, and vice versa for previous

theeternalpulse13:09:14

just found the code for next-buffer pretty involved

vemv13:09:43

https://github.com/vemv/.emacs.d/blob/181f8175480c45fc020ee68e0a39ef985b2b8166/lib/non-submodules/vemv.project-interaction.el#L176 • The code uses a fixed layout: (vemv/safe-select-window vemv/main_window). vemv/main_window is the window where I open all my project-specific file buffers (other buffers may temporarily hijack it as well) • Only 3 function calls in this body are relevant to the 'algorithm': (vemv/clean-chosen-file-buffer-order), (switch-to-buffer ..., (puthash ...

vemv13:09:53

Hope it helps!

theeternalpulse03:09:14

I'll take a look, thanks