Rather then just blather on about the theoretical uses of some
theoretical text editor, there's an article on how to customize emacs
in perl:<br>
<br>
<a href="http://www.perl.com/pub/a/2005/03/31/lightning2.html">http://www.perl.com/pub/a/2005/03/31/lightning2.html</a><br>
<br>
Also, I would recommend looking up narrowing and widening in the emacs elisp tutorial:<br>
<br>
<a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Narrowing---Widening.html">http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Narrowing---Widening.html</a><br>
<br>
And, the elisp reference has information on &quot;the region&quot;, which is the
text between the point and the mark... or, the currently selected text:<br>
<br>
<a href="http://www.gnu.org/software/emacs/elisp-manual/html_chapter/elisp_31.html#SEC492">http://www.gnu.org/software/emacs/elisp-manual/html_chapter/elisp_31.html#SEC492</a><br>
<br>
Ultimately, just about anything you can do in Perl can probably be done
better in elisp... except for expressing a regular expression, its very
similar to Python or Java :(.&nbsp; See Ahh, the Regexes for what I'm
talking about:<br>
<br>
<a href="http://obsidianrook.com/devnotes/whinery/elisp-regexps.html">http://obsidianrook.com/devnotes/whinery/elisp-regexps.html</a><br>
<br>
And, along that same vein, if you're thinking about learning elisp, here's a translation of common perl idioms to elisp:<br>
<br>
<a href="http://obsidianrook.com/devnotes/elisp-for-perl-programmers.html">http://obsidianrook.com/devnotes/elisp-for-perl-programmers.html</a><br>
<br>
I don't know how well they map to good &quot;lisp-style&quot;, but they appear to be pretty good.<br>
<br>
Finally, I must say that even though I prefer emacs, Vim can be
compiled with Perl support built-in, so you can use it directly in your
vim scripts, and don't have to shell out to Perl.<br>
<br>
Unfortunately, I don't have much experience with that, so you'll have to ask someone else about it :).<br><br><div><span class="gmail_quote">On 11/14/05, <b class="gmail_sendername">benh</b> &lt;<a href="mailto:ben.hengst@gmail.com">
ben.hengst@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ok I've been beating my head on this one. Any one know if there is an
<br>editor that embeds perl in to the editor? Kinda like a super fancy<br>copy/paste/search/replace .... I currently use jEdit and love it...<br>well for the most part. Heres an example of something that I just got<br>done doing,&nbsp;&nbsp;build a nav with every image in a dir nav_cat* files are
<br>categorys and nav_*_* are links<br><br>ls -lh *.gif &gt; list<br><br>[open list in jEdit]<br>using regex find s/^.*14:(49|50)//<br><br>[copy trim list to new buffer]<br>my @imglist = ( ** list here ** );<br><br>my $cat=q{};
<br>foreach (@imglist) {<br>&nbsp;&nbsp;&nbsp;&nbsp;if(m/^nav_cat/) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($cat)= $_ =~&nbsp;&nbsp;m/nav_cat_(.*?).gif/;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print
&quot;&lt;tr&gt;&lt;th&gt;&lt;img src='$_'
alt='$cat'&gt;&lt;/th&gt;&lt;/tr&gt;\n&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;else{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my ($alt)= $_ =~ m/nav_.*?_(.*?).gif/;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print
&quot;&lt;img src='$_' alt='A link to $alt $cat'&gt;&lt;/a&gt;\n&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><br><br>[save that off and run script in term... copy output]<br>[open new buffer in jEdit ... paste]<br><br>take a seperate list of the actual links that have the category id's
<br>and link them up by hand...<br><br>and tada... final table of links.... total time about 15 minutes, much<br>faster then doing it all long hand like most of the production folks<br>but ... it got me thinking... why am I bouncing back and forth and
<br>side steping STD(IN|OUT) ... what I would love to see is an editor<br>that could fork a background process as a perlscript and plug in<br>STDOUT in to the buffer... almost like bluring the lines between<br>terminal and editor? Is that possible... well I'm sure that any emacs
<br>guru would yell at me because emacs is the answer to everything... any<br>takers on this one?<br>_______________________________________________<br>Pdx-pm-list mailing list<br><a href="mailto:Pdx-pm-list@pm.org">Pdx-pm-list@pm.org
</a><br><a href="http://mail.pm.org/mailman/listinfo/pdx-pm-list">http://mail.pm.org/mailman/listinfo/pdx-pm-list</a><br></blockquote></div><br><br clear="all"><br>-- <br>Ben Prew<br><a href="mailto:ben.prew@gmail.com">ben.prew@gmail.com
</a>