Code Monkey home page Code Monkey logo

Comments (4)

alphapapa avatar alphapapa commented on July 19, 2024

Hi,

Thanks for the kind words. I'm glad you like it.

Yes, marking non-adjacent buffers would be a useful feature. However, Bufler uses magit-section for displaying buffer lists, and it doesn't support that. Like Magit, it only supports marking entries that are adjacent.

This could probably be worked around by keeping a separate list of marked buffers and displaying marks in a column, similar to Ibuffer. Of course, that would need to be deconflicted with magit-section's own markings.

That would be, I think, a non-trivial amount of work. And such work might be better aimed at enhancing magit-section to support non-adjacent marking itself, so Bufler could get that feature "for free."

So, supporting non-adjacent marking is probably not a feature I will work on anytime soon, as I have many other ideas to get to first.

P.S. Re-reading your comment, I get the impression that you aren't aware that Bufler already supports marking of adjacent buffers and groups. Press C-SPC on a buffer to mark it, then move point to continue marking others. Then you can act on marked entries, e.g. k to kill buffers. It's also trivial to add additional commands that apply to marked buffers; see the source code.

from bufler.el.

acegallagher avatar acegallagher commented on July 19, 2024

Hey alphapapa,

Even more incredible that you take the time to write such a thoughtful reply to a github feature request.

I was aware of the marking feature in bufler, and I've been trying to use it. I'm a scientist that uses emacs as an IDE for data analysis development, and as such I typically have multiple terminals, code buffers, data files, and directories, all open for the same project. I'm working on customizing bufler groups to support this more easily but in the end the buffers I want to run an operation on are rarely next to each other and marking/filtering/regex is really powerful (to for example kill all terminals across all projects).

Right now I just fire up ibuffer manually and do these types of operations and that works alright-enough. Interesting implementation concerns, you're a sharp person for reusing the magit code and I'm sure your implementation greatly benefits. The selection of adjacent buffers makes sense when dealing with files committed in git, where neighboring in the filesystem probably means neighbors in git operations also. And I suppose you wrote bufler with primarily with VC projects in mind. Maybe I'll poke the magit creators about selecting non-adjacent files and see what they think.

I can't wait to see the other ideas you implement, happy coding, and thanks for responding here.

from bufler.el.

alphapapa avatar alphapapa commented on July 19, 2024

Thanks for the kind words.

I was aware of the marking feature in bufler, and I've been trying to use it. I'm a scientist that uses emacs as an IDE for data analysis development, and as such I typically have multiple terminals, code buffers, data files, and directories, all open for the same project. I'm working on customizing bufler groups to support this more easily but in the end the buffers I want to run an operation on are rarely next to each other and marking/filtering/regex is really powerful (to for example kill all terminals across all projects).

Right now I just fire up ibuffer manually and do these types of operations and that works alright-enough.

Thanks for sharing that, that sounds very interesting. I guess Bufler isn't yet suitable for that specific use case. As I wrote in the readme, Ibuffer is a mature project, and Bufler is far from feature parity with it.

Interesting implementation concerns, you're a sharp person for reusing the magit code and I'm sure your implementation greatly benefits. The selection of adjacent buffers makes sense when dealing with files committed in git, where neighboring in the filesystem probably means neighbors in git operations also

Yes, magit-section grew out of Magit, so that's probably part of it.

I think what's needed is for either magit-section to have more sophisticated marking tools, or we need another library that does similar things. I've been looking at the built-in Widget and tree-widget libraries for ideas. Those packages don't seem easy to use, and I can see why Jonas went with magit-section instead.

And I suppose you wrote bufler with primarily with VC projects in mind.

No, I just added a VC column because it was easy and useful.

Anyway, the idea is for Bufler to allow very flexible, powerful rules to group buffers as usefully as possible, automatically. I plan to make more enhancements to these tools in the future, e.g. to make it easier to have multiple bufler-list views with different grouping rules applied. That might be useful for your specific needs, so you could have different rules for different projects.

Maybe I'll poke the magit creators about selecting non-adjacent files and see what they think.

There's probably an issue about it already on the Magit repo, or something like it, ISTR. Please link it if you can dig it up again.

Please continue to share any feedback. Thanks.

from bufler.el.

alphapapa avatar alphapapa commented on July 19, 2024

FYI, I recently made https://github.com/alphapapa/taxy.el out of my plans to factor out parts of Bufler. I think implementing non-adjacent marking can be done fairly simply by defining a column in taxy-magit-section and then writing commands that act appropriately, depending on whether any buffers are individually marked. I'll look at this in the future, after converting Bufler to use Taxy.

from bufler.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.