minad / marginalia

:scroll: marginalia.el - Marginalia in the minibuffer
GNU General Public License v3.0
780 stars 27 forks source link

Buffer information in tab annotation #147

Closed tsloughter closed 2 years ago

tsloughter commented 2 years ago

I use tab-switch to go between open projects (Emacs built-in project support). Marginalia has been great for most everything (thanks!) but in this case I get the name of the current buffer in that tab group/project as both the key and the buffer info, so it looks like:

2022-09-16T16:06:34,998866945-06:00

I looked at the source and there doesn't seem to be a way to customize what is put in that buffer information column? Would it make sense to put the tab group name instead of the buffer name again?

Is there usually different information there and it is just my use case that makes it be duplication?

minad commented 2 years ago

The first column is the name of the tab. So if the tab is named after a buffer it will be duplicated. How could we obtain the tab group or project? Then we could display it there additionally or instead of the buffer names.

tsloughter commented 2 years ago

Thanks, I see the commit that adds tab group.

I still get confused by the builtin tabs and tab line. In the actual tabs at the top, hard to read (still trying to theme) I thought the name of the tab was the first part, not the second:

2022-09-17T04:03:19,150894968-06:00

2022-09-17T04:08:21,160424814-06:00

Will pull down the latest and give it a try.

minad commented 2 years ago

@tsloughter If you come up with a better annotator feel free to create a PR or a proposal. See here for the current annotator code:

https://github.com/minad/marginalia/blob/7f5bf7818b8c5a88cc3e7011d561655b287570e3/marginalia.el#L1038-L1061