A "better pause/resume script" question

What is the problem?
I use a combination of absolute- and relative-extrusion GCODE files. Upon pausing a print, I notice a string of filament as it pulls off the part. I'd like to compensate for this in the built-in scripts but I can't just do the following in the pause script:

G91 E
G1 E-1
G90 E

...because this would potentially wreak havoc after the resume because I didn't start the job with absolute extrusion in half the cases.

I noticed some snippets are available. Is there one for remembering the previous extrusion mode setting?

What did you already try to solve it?
I searched in Google, the FAQ/Guides here.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
OctoPrint 1.3.8 running on OctoPi 0.15.0
Robo C2

Send: M115
Recv: FIRMWARE_NAME:Marlin 1.1.7-C2 (Github) SOURCE_CODE_URL:https://github.com/Robo3D/Marlin-C2 PROTOCOL_VERSION:C2 MACHINE_TYPE:RoboC2 EXTRUDER_COUNT:1 UUID: ... EMERGENCY_CODES:M108,M112,M410

No, this is currently not tracked by core. But since you can extend GCODE scripts and their available variables through plugins you could write a plugin that takes care of that for you.