~rjarry/aerc#250: 
allow disabling pager in filter

This implies that the user is going to provide an alternative pager for that particular mimetype. It is indicated by adding a pipe before the mimetype in filters (ignore any whitespace)

Rationale: | text/html = w3m -sixel for viewing html with images.

snippets from IRC discussion without context

if strings.HasPrefix("|") {
s = strings.TrimLeft("| ")

_, s, prefixed := strings.Cut(str, "| ")

Note, that this does not solve viewing inline images, but is a prerequisite.

Status
RESOLVED IMPLEMENTED
Submitter
~ferdinandyb
Assigned to
No-one
Submitted
7 months ago
Updated
8 days ago
Labels
feature

~inwit 21 days ago

This would indeed solve viewing inline images in text/html parts with a sixel/kitty capable tui browser like chawan. Maybe it's better to define a [pagers] config section allowing different pagers for different filetypes? Could be an overshoot, but the | syntax as defined here is obscure to me.

~ferdinandyb 21 days ago

On Thu Nov 21, 2024 at 21:19, ~inwit outgoing@sr.ht wrote:

This would indeed solve viewing inline images in text/html parts with a sixel/kitty capable tui browser like chawan. Maybe it's better to define a [pagers] config section allowing different pagers for different filetypes? Could be an overshoot, but the | syntax as defined here is obscure to me.

That would be overkill and hard to reason about imho. The idea here is that you just mark that specific filter line you have that you will be providing the pager, aerc does not have to pipe it into the configured default pager.

~rjarry REPORTED IMPLEMENTED 8 days ago

Robin Jarry referenced this ticket in commit 5a119d7.

Register here or Log in to comment, or comment via email.