Sorry, no cool snippets. I basically use it for s/// loops when
I'mforced to edit text outside of Emacs (e.g. editing this reply).
WhenI installed it, I honestly expected to use it more than I have.
Update: Actually, I have found a use for it. This little
nasty in ~/Library/PerlPad/startup.pl lets me use Emacs to edit PM
posts:
#!/usr/bin/env perl
use File::Temp 'tempfile';
register_function 'emacsify',
q{
my ($fh, $f) = tempfile;
print $fh $_;
close $fh;
open OSA, "|osascript " or die $!;
my $osa = <<EOS;
-- set theapp to path to frontmost application as string
tell application "Emacs" to activate
do shell script "emacsclient '$f'"
-- tell application theapp to activate
EOS
print OSA $osa;
close OSA or die $!;
open IN, "$f";
unlink $f;
undef $/;
$_ = <IN>;
close IN;
s/^(.{70,80})\n/$1/gm;
$_;
};
1;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.