Howdy Y'all. I was wondering if I could come up with a way to use
emacs like less or more. Interactively, I can type something like the
following. (The command w is just a concise example of anything that
you want to page.)
$ emacsclient -t (w | psub)
That is cumbersome compared to
$ w | less
so I wrote a script called ep:
#!/usr/bin/fish
emacsclient -t (psub)
Now I can use
$ w | ep
and it shows up in an emacs buffer! This is really awesome. Thanks to
fish for making this possible and easy.
A few notes:
I am using fish, version 2.1.1 (2.1.1-3) on Manjaro Linux I am running
fish within dvtm within an xterm.
psub makes a regular file (not a named pipe), with or without the -f
option. Is that a bug? It doesn't cause any problem for me in this
use case.
When I try to make the ep script into a function it doesn't work. Not
a big deal to me, but interesting.
Changing emacsclient to nano or vi doesn't work in the script, but
does work in the cumbersome interactive way. I guess because they
don't like their stdin being redirected.
I happen to like the -t option for emacsclient currently, but it's not
important/relevant for the topic of this post. You can certainly do
without it.
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users