~sircmpwn/aerc

3 2

Open PDF-attachment

Uwe Jochum
Details
Message ID
<20210322142233.01397f4b@uwe-LIFEBOOK-U7410>
DKIM signature
missing
Download raw message
Hi all,

as a non programmer and newbee to aerc I stumbled over one thing: How do
open a PDF that is attached to an email in aerc? There is a
filter section in aerc.conf, I know, and I tried to do this (see last
line):

########aerc.conf#######################
[filters]
#
# Filters allow you to pipe an email body through a shell command to
render # certain emails differently, e.g. highlighting them with ANSI
escape codes. #
# The first filter which matches the email's mimetype will be used, so
order # them from most to least specific.
#
# You can also match on non-mimetypes, by prefixing with the header to
match # against (non-case-sensitive) and a comma, e.g. subject,text
will match a # subject which contains "text". Use header,~regex to
match against a regex. subject,~^\[PATCH=awk -f
/usr/local/share/aerc/filters/hldiff
#text/html=/usr/local/share/aerc/filters/html text/*=awk -f
/usr/local/share/aerc/filters/plaintext 
#image/*=catimg -w $(tput cols)

application/pdf = xpdf

##############was aerc.conf####################

But that only opens xpdf, it does not display the PDF. Is there a
switch or something I must use? The syntax seems to be quite different
from that of a normal mailcap-file.

Sorry for this question. But, as I said, I am not a member of the
programmer tribe.

Best,

Uwe
Details
Message ID
<20210322134753.xrtxo4mys4fu6xm6@feather.localdomain>
In-Reply-To
<20210322142233.01397f4b@uwe-LIFEBOOK-U7410> (view parent)
DKIM signature
pass
Download raw message
Hi Uwe,

On Mon, Mar 22, 2021 at 02:22:33PM +0100, Uwe Jochum wrote:
> [filters]

Filters isn't what you want in this case.
They are for the case where you pipe something through a program that then
displays text, to be drawn within the terminal.

What you want is to run an external command running in the graphical shell yes?
Assuming xpdf is your run of the mill pdf viewer.

In that case use :pipe with the part selected, e.g. `:pipe -p zathura -` would do
the trick in my case, not sure how you need to tell xpdf to read stdin as I
personally don't use it.

Liebe Grüsse,
Reto
Uwe Jochum
Details
Message ID
<20210322150403.01680fc8@uwe-LIFEBOOK-U7410>
In-Reply-To
<20210322134753.xrtxo4mys4fu6xm6@feather.localdomain> (view parent)
DKIM signature
missing
Download raw message
Reto,

thanks a lot! I'll try that and play with the command.

Ebenfalls schöne Grüße,

Uwe
Details
Message ID
<20210323234219.kueutjhqe75kqdva@feather.localdomain>
In-Reply-To
<20210322150403.01680fc8@uwe-LIFEBOOK-U7410> (view parent)
DKIM signature
pass
Download raw message
Btw, what I've forgotten is that there's :open as well, which works assuming
the sender set the mime-type properly.
Reply to thread Export thread (mbox)