elfeed-goodies icon indicating copy to clipboard operation
elfeed-goodies copied to clipboard

Customizable columns and their widths

Open nixmaniack opened this issue 8 years ago • 6 comments

mu4e has similar customization with following sample config.

(setq mu4e-headers-fields '((:human-date . 8)
                              (:flags . 6)
                              (:maildir . 20)
                              (:tags . 25)
                              ;; (:mailing-list . 15)
                              (:from . 15)
                              (:thread-subject)))

nixmaniack avatar Dec 07 '15 21:12 nixmaniack

Hrm, I think I can do this. At the moment, the columns do not have a maximum width, so that'll need some work, but I have a reasonable idea how I'd do that.

About the syntax, how about this:

(setq elfeed-goodies/search-header '((:left  ((:feed-name . -1)
                                              (:tags . -1)
                                              (:entry-title . -1))
                                      :right ((:filter . -1)
                                              (:status . -1)
                                              (:db-date . -1)))))

Where -1 means no limit. Not sure if that's the best value, I'm also considering 0 and nil. Also need a way to specify a search header when in split mode. Similarly, I can add similar syntax to customise the entry buffer header, and the search buffer entries, too. Mind you, the search buffer entries are deducible from the search header: anything that has to do with the feed or the entry, goes into there too.

This will take a bit of time, mind you. But I like the idea, a lot! Thank you for showing the mu4e example!

algernon avatar Dec 08 '15 08:12 algernon

That syntax looks nice! It would also allow the user to order according to preference what goes right and left. Regarding value for no limit, just not specifying it should be enough (e.g. mu4e's :thread-subject)

nixmaniack avatar Dec 08 '15 09:12 nixmaniack

Yep, you will be able to do stuff like this:

'((:left  ((:db-date)
           (:status)
           (:feed-name))
   :right ((:filter)
           (:tags)
           (:entry-title))))

There will be no restrictions which column can appear on which side, you can put them wherever you want.

Or, I can go with this kind of syntax:

(setq elfeed-goodies/search-header '((:feed-name) (:tags) (:entry-title)
                                     (:empty . :fill)
                                     (:filter) (:status) (:db-date)))

This seems shorter, and allows me to easily split the two parts at (:empty . :fill). If a width is specified there, it will use that.

What do you think?

algernon avatar Dec 08 '15 09:12 algernon

In second one, if I understand correctly, the left part of powerline is before (:empty . :fill)?

The first one is more clear I think. But either way, both should be easy to configure once understood. So I'm fine with any one.

nixmaniack avatar Dec 08 '15 10:12 nixmaniack

Yep, left part is before (:empty . :fill).

algernon avatar Dec 08 '15 10:12 algernon

Added a "help wanted" tag, because I likely won't have time to work on it until after Christmas. It's a bit more involved than what I have the time for before that.

algernon avatar Dec 08 '15 11:12 algernon