I am reposting this exchange here in the hope of getting a response. It
originally occurred on perl.porters-gw, but you folks might find it an easier
request... Please cc any replies to i...@wrath.odsnet.com .
Thanks!
In article <980318211...@fahrenheit-451.media.mit.edu>,
orw...@media.mit.edu wrote:
>
> her...@BayView.COM (William R. Ward) writes:
> >
> > One pipe dream I've had for years has been an editor that is to Perl
> > as Emacs is to Lisp. Or at least a Perl interpreter embedded in Emacs
> > so that one can write Emacs extensions in Perl.
>
> John Tobey did just this: check out his "Perlmacs". Announced in TPJ
> #9 (about to be mailed), and to be the subject of an article in TPJ
> #10. Hopefully.
>
That's wonderful I admit, but am I wrong in thinking that it will increase
Emacs's already shocking memory footprint?? On my system Emacs is beaten only
by Netscape and X in its rapacity.
On the other hand I get warm fuzzies at the prospect of making Emacs
extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
because..), like Larry says, it has all the aesthetic appeal of toenail
clippings in a bowl of porridge.
What I would be satisfied with is a little piece of Lisp, a function
definition equivalent to saying in the minibuffer: (courtesy of M-J Dominus in
TPJ #8)
C-u M-| perl /path/extension.pl arg1 arg2
(to apply to a selected region)
or
C-x h C-u M-| perl /path/extension.pl arg1 arg2
(to apply to the entire buffer)
or
C-u M-! perl /path/extension.pl arg1 arg2
(To take effect at cursor)
just so we don't have to do all that typing in the minibuffer each time.
To tell you the truth I don't see the advantage in embedding perl into Emacs
when we can just do this. I'm starting to write lots of extensions this way
and it requires no extra effort or know-how besides remembering the above, and
hopefully someone will post a little Lisp function template to make that
unnecessary.
Unless people want more than text processing capabilities?? So far I don't
want or need anything more than that.
Cheers,
ira
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
*AUGH*, I _HATE_ reruns of stupid discussions with clueless people.
go away!
#:Erik, who hopes that counts as "a response"
--
religious cult update in light of new scientific discoveries:
"when we cannot go to the comet, the comet must come to us."
> On the other hand I get warm fuzzies at the prospect of making Emacs
> extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
> because..), like Larry says, it has all the aesthetic appeal of toenail
> clippings in a bowl of porridge.
This is flame bait. I've long lost count of the languages I know,
and reckon there are only two languages with less aesthetic appeal
than Perl: InterCAL and TECO.
There is a very nice editor indeed called Alpha, which is available
for 68k and Power Macintoshes, which is very Emacs-like but uses Tcl
as its extension language. Alpha is half a megabyte on disc (I don't
know if that's the "fat" binary or just the Power version) and wants
2Mb to run, not too much! TCL was designed as an extension language;
in particular it is quite convenient for interactive use. Whatever
the merits of Perl (I've just spent a day reinstalling it simply to
run weblint, which is merit enough for me), it was't designed to be
so used. In fact, raw Tcl/Tk has very useful editable text widgets,
so it doesn't take very much to make a useful extensible editor in
Tcl/Tk. Come to that, wish on a PowerMac is tiny, and prefers 4M to
run, and claims to get by in 1M.
This leads to the obvious point that tkperl probably includes the
tk editing widget, so would make an excellent basis for a Perl Emacs.
Actually, a nice framework already exists! See http://mongoose.bostic.com/vi/
for the latest "Nvi" ("new vi") which has (for more than a year now!) hooks
for both Tcl and Perl as extension languages. The Tcl/Tk example in the
distribution shows that you can put the extension language "in front of"
the editor (a la Emacs), not only write "macros" in it. Although they
don't give an explicit example of doing the "Emacs style" with Perl, one
should be able to do it much the same way as the Tcl/Tk example.
So... To the original poster [not Stacy], I strongly suggest starting with
Nvi -- already a robust, good-performing editor -- as a base, so you can
spend more time on your "extensions" and less on getting a basic editor core
to work.
+---------------
| In any event, if Perl is so great for this task, then by all means
| get to it, and let us all know when you want us to take a look at it.
| The proof is in the pudding.
| Meanwhile please go away and spare the bandwidth. I'm getting tired
| of seeing this thread on all Emacs and Lisp newsgroups and mailing lists.
+---------------
Indeed. Hopefully pointing them to Nvi will quieten things down.
(But I've always been an optimist...)
-Rob
p.s. The extension hooks in Nvi are not specific to Tcl or Perl. It looks
like one should easily be able to hook in any of the Schemes that use a
C-compatible GC as an Nvi extension language, too. "Film at 11..."
p.p.s. Nvi-1.79 is the current version, and FWIW I've been using it
instead of "vi" as my main editor for over a year (though w/o using any
of the extension-language features... yet). Seems pretty stable.
-----
Rob Warnock, 7L-551 rp...@sgi.com http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673 [New area code!]
2011 N. Shoreline Blvd. FAX: 650-933-4392
Mountain View, CA 94043 PP-ASEL-IA
> On the other hand I get warm fuzzies at the prospect of making Emacs
> extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
> because..), like Larry says, it has all the aesthetic appeal of toenail
> clippings in a bowl of porridge.
Hmm, that's the best description of Perl I think I've
ever heard! Thanks! (Trying to start another Perl vs
Lisp flame war, are we?)
Mike McDonald
mik...@mikemac.com
I have finally seen the light. Thank you dear sir.
Perl is elegant.
Slavery is freedom.
Larry Wall is God.
--
*********************************************
Semi-encrypted email address: m_b_p_o_m_i_j_e_ a_t_ i_n_a_v_ d_o_t_
n_e_t_
All non-solicited commercial email will be billed $1,000.
(funcname (args)
;; do something with args
(;; args not mangled to flat list ...)
;; (lisp is more handy than perl)
)
[compile] (lisp is more handy than perl)
It's just a question of task context.
Regards, Clayton Weaver cgw...@eskimo.com (Seattle)