From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: Learning LISP; Scheme vs elisp. Date: Sat, 2 Aug 2008 06:51:26 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <55dbm5-qcl.ln1@news.ducksburg.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1217688047 20763 80.91.229.12 (2 Aug 2008 14:40:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2008 14:40:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 02 16:41:38 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KPIIZ-0003UZ-5t for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2008 16:41:35 +0200 Original-Received: from localhost ([127.0.0.1]:35575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPIHe-00007F-G1 for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2008 10:40:38 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1217685086 9814 127.0.0.1 (2 Aug 2008 13:51:26 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 2 Aug 2008 13:51:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l33g2000pri.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:160825 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56173 Archived-At: On Aug 1, 5:45 am, Adam Funk wrote: > In the long term I hope I'll be able to customize Emacs more in its > native way instead of wrapping external Perl programs in > shell-command-on-region (as I often do now). if all you need to do is text processing and perl currently satisfies your needs, then what you are doing now is good enough. Trust me. Learning elisp would be like waste of time. however, elisp for text processing is actually more powerful, because of the buffer datatype, where you can move cursor to and pro. (i.e. in perl, you just slurp the text file so that you have a array of lines or the whole file as a single string. In emacs, the whole file text is a buffer, where you can move the index to arbirary points using various highlevel functions such as regex. In perl, you can also move the index in a file, but then you deal with the file as a stream and bytes) As a concret example, suppose you need to do some simple manipulation of nested text such as XML. In perl with regex, you quickly fail because regex is unable to match nested syntax. You end up either with covoluted solution or go full using a XML parser (at which point it becomes rather complex and no longer text processing and you lose your xml formatting) But in elisp, because you deal with buffers, you can move cursor into or out of nested text. So, you can still use text processing method to do simple xml manipulation. For concrete examples, see: elisp lessens on text processing: http://xahlee.org/emacs/elisp_text_processing.html http://xahlee.org/emacs/elisp_process_html.html text processing in elisp vs perl (essay) http://xahlee.org/emacs/elisp_text_processing_lang.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84