Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Can no longer use two 'highlight feedlist' entries on config #568

Open
Rahtgaz opened this issue Jun 16, 2017 · 8 comments
Open

Can no longer use two 'highlight feedlist' entries on config #568

Rahtgaz opened this issue Jun 16, 2017 · 8 comments
Labels

Comments

@Rahtgaz
Copy link

Rahtgaz commented Jun 16, 2017

I've always used two 'highlight feedlist' entries on config two distinguish between a feed item a totals item on the feedlist. The screenshot below shows that I can no longer do this.

config file:

# [...]
highlight feedlist ".+ N .+" color137 default
highlight feedlist ".+ --> .+" color242 default
# [...]

Despite the fact that both regex end up overlapping, newsbeuter was smart to apply the second one on top of the first, giving me an orange color to unread items and a dark grey for the group items regardless of reading status.

I could effectively have a tri-color feedlist with a different color for read, unread and group entries. This no longer happens.

screenshot_2017-06-16_18-31-58

@Minoru
Copy link
Collaborator

Minoru commented Jun 16, 2017

Thanks for a report!

I tried d1c116d, r2.9, r2.8, r2.7 and r2.6, and I couldn't make any of them use two colours—all of them always used the second regex only if the first one didn't match. I suspect the culprit might be not in the Newsbeuter itself but in one of the libraries we rely on.

@Rahtgaz, what was the last version where you saw the desired behaviour? Also, what distribution are you using? Or is it OS X?

@Minoru Minoru added the bug label Jun 16, 2017
@Rahtgaz
Copy link
Author

Rahtgaz commented Jun 16, 2017

Hello Minoru,

Unfortunately I simply cannot remember the version number anymore. It was based of Ubuntu MATE 17.04. According to the ubuntu repos, that would be version 2.9, circa 2015 (https://packages.ubuntu.com/xenial/newsbeuter). The source package to the right points to that year, if you download the orig sources and inspect the CHANGES file.

Last week my old computer finally died and I took the chance to fully move to Arch. Had been runing it for a couple of years on a VM). So now I'm running newsbeuter 2.9-6 of that distro, last built on 2017-03-08.

@Minoru
Copy link
Collaborator

Minoru commented Jun 17, 2017

I managed to reproduce the desired behaviour with 2.8, but only when I swapped the highlight rules.

Highlighting was broken in 2.9 so that only the last rule applied (#166), so naturally nothing worked there.

The latest Git revision, d1c116d, applies "-->" rule only for unread feeds, and completely ignores the "N" rule.

I give up for now.

@tsipinakis
Copy link
Contributor

You probably meant to link to #166 not #116.

The 2.9-3 version in Debian (and Ubuntu, since they pull packages from Debian) has, among others, the fix for #166 backported., so that's probably why highlight worked in Ubuntu but not in Arch.

@Rahtgaz
Copy link
Author

Rahtgaz commented Jun 17, 2017

I managed to reproduce the desired behaviour with 2.8, but only when I swapped the highlight rules.

Yes, that's my bad. That's the result of me experimenting, trying to get it to work. The rules needs to be reversed, so that the normal behaviour -- read second rule only if first fails -- functions as expected.

@Minoru
Copy link
Collaborator

Minoru commented Jun 17, 2017

You probably meant to link to #166 not #116.

Yep; thanks!

@Rahtgaz
Copy link
Author

Rahtgaz commented Jun 18, 2017

@Minoru,

Looking at the file history, I think this may be the commit that broke it: 26522a9#diff-fd4d69e28b478905918fa0b3921b6dce

I'm not sure since I don't remember much about C++. But seems like something broke when you move the strings to use C11 variadic templates.

@Minoru
Copy link
Collaborator

Minoru commented Jun 18, 2017

Cool! To be clear on this point: did you build with and without that patch to verify?

I plan to build 2.9-3 (Debian patched version) some time this week to see how it behaves, and then run git-bisect from 2.8 to current master to find out where it was broken. We probably have a lot of changes since then, so fixing this won't be that simple, but at least we'll know what caused the regression.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants