9front - general discussion about 9front
 help / color / mirror / Atom feed
From: mycroftiv@sphericalharmony.com
To: 9front@9front.org
Subject: plumb rules for page
Date: Fri, 19 Jan 2018 04:50:03 +0000	[thread overview]
Message-ID: <B8686B0C6CDCC532A8172992B102B2AA@sphericalharmony.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 1673 bytes --]

I was playing around with sharing plumber between different machines
and found something I don't understand in the default 'basic' plumber
ruleset as it relates to 'page'.  Relevant excerpt from
/sys/lib/plumb/basic follows:

# image files go to page
type is text
data matches '[a-zA-Z¡-￿0-9_\-.,/]+'
data matches '([a-zA-Z¡-￿0-9_\-.,/]+)\.(jpe?g|JPE?G|gif|GIF|tiff?|TIFF?|ppm|PPM|bit|BIT|png|PNG|pgm|PGM|bmp|BMP|yuv|YUV)'
arg isfile	$0
plumb to image
plumb client page -wi

# page bookmarks
type is text
data matches '(([a-zA-Z¡-￿0-9_\-.,/]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI|doc|DOC|epub|EPUB|cb[tz]|CB[TZ]))!(.+)'
arg isfile	$1
data set	$file
attr add	addr=$4
plumb to image
plumb start page -wij $0 $file

# postscript/pdf/dvi/doc go to page but not over the a plumb port
# the port is here for reference but is unused
type is text
data matches '[a-zA-Z¡-￿0-9_\-.,/]+'
data matches '([a-zA-Z¡-￿0-9_\-.,/]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI|doc|DOC|epub|EPUB|cb[tz]|CB[TZ])'
arg isfile	$0
plumb to postscript
plumb start page -w $file

My question is, why do we send image files to a running page over the
plumb port, but not ps/pdf type files?  We send page bookmarks to
running page via the plumb port, but not standard files.  It is clear
from the comments that this is a delibrate decision, is there a good
reason for it?  From my perspective, the "plumb to postscript" in the
final ruleset shown here should be "plumb to image" to make all the
behavior consistent.

It's obviously a trivial point and easy to change if you want to, but
if there isn't a justification for this divergence in behavior,
perhaps we should just standardize it?

-mycroftiv


             reply	other threads:[~2018-01-19  4:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  4:50 mycroftiv [this message]
2018-01-19 15:53 ` [9front] " Steve Simon
2018-01-19 16:39   ` Stanley Lieber
2018-01-21 14:36   ` Ethan Grammatikidis
2018-01-21 16:28     ` Ethan Grammatikidis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B8686B0C6CDCC532A8172992B102B2AA@sphericalharmony.com \
    --to=mycroftiv@sphericalharmony.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).