From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Earl Newsgroups: gmane.emacs.help Subject: Re: Open Hypspec with w3m Date: Sat, 29 Jan 2011 22:06:12 -0700 Organization: XMission http://xmission.com/ Message-ID: <87mxmjx9ob.fsf@notengoamigos.org> References: <87bp30bzdg.fsf@notengoamigos.org> <87mxmkft81.fsf@notengoamigos.org> <87vd17y70i.fsf@notengoamigos.org> <87r5bvb9u1.fsf@puma.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296366066 13001 80.91.229.12 (30 Jan 2011 05:41:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2011 05:41:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 30 06:41:01 2011 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.69) (envelope-from ) id 1PjQ20-0004f3-TD for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jan 2011 06:41:01 +0100 Original-Received: from localhost ([127.0.0.1]:55805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjQ20-0005nZ-5Z for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jan 2011 00:41:00 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.glorb.com!xmission!nnrp.xmission!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 136 Original-NNTP-Posting-Host: jearl.fttp.xmission.com Original-X-Trace: news.xmission.com 1296363973 29236 166.70.233.10 (30 Jan 2011 05:06:13 GMT) Original-X-Complaints-To: abuse@xmission.com Original-NNTP-Posting-Date: Sun, 30 Jan 2011 05:06:13 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAAAFz UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlw SFlzAAASmwAAEpsB4JJZDAAAAAl2cEFnAAAAMAAAADAAzu6MVwAAAaFJREFUSMe1VtuxxSAIzIz9 2Iyl2Aj1bBX0k5+LrwjGjJyPy2ROwtGNBJbVCwwwy1UNoOL3f+SBxkj15Lr4NsboN24DWMZxYQNA TjGmjC1gswJiqBbpDeANYMwXBFyAFB5L7ADMBcoSDgAFBSDHR2tA8ABMSB4AawB76pAnILsKx2lm 1VfpgUi3kxrySylRHdmQj40Jva2/jl8EY3Twv/phhsC9nIQR0hnAOUptYsL3RxvAk+YIH2AWsvTH GYBgKn8GaPYm5jNANaCQ8WfAzyH9x0crFfGl9X4QVdg8gEqN2KjBHi6V/iBq6iyAxTqd+Yvupwai VwM9LZkxQ6otihmS6H+mHlK5URwi0UQgWxHoxS5JagBSed7IzJRCallS2pg2QsamcGUFNSHgLZUv augJIUualv1Bv6+yVat1oeMq92s/mBBWQJH7dQX7CnpvWWs/4CazpHlB2RR1BFSzNGdIaTbbLil8 U76BKKU0GztapXP3C78bNYQ6MTQybY8OkIaITf9HPzyHkXE4YXs4mf5VDz+jAepj3RTQ3Ubv0SPy 9AcCrfKh0TBgvgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMC0wNC0zMFQyMzo1NDo0My0wNjowMKID BVQAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTAtMDQtMzBUMjM6NTQ6NDItMDY6MDB1KbZcAAAAAElF TkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Iimb+8WNT0lnpVeNqIu8HdK2C/0= Original-Xref: usenet.stanford.edu gnu.emacs.help:184687 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:78839 Archived-At: On Sat, Jan 29 2011, Tim X wrote: > Jason Earl writes: > >> On Fri, Jan 28 2011, Stefan Monnier wrote: >> >>>> within my grasp. You do realize, of course, that you are essentially >>>> volunteering to look over some potentially very bad Elisp. The only >>> >>> There's no worse Elisp than the one that's not yet written. >>> And believe me, I've seen my share of bad Elisp, >> >> Thank you very much for the encouragement then. >> > > The things I've found with lisp generally and elisp in particular > (because I use it more and more) > > * Lisp and elisp are actually very easy to learn. Very little syntax, > no difficult to remember operator precedence and consistent form. The more I learn about Lisp the more I wish I had become curious about Lisp years ago. I have been *using* Emacs to write software for years. I can not believe that it never occurred to me to spend more time actually hacking Emacs. When I think of all of the tiny throwaway Python scripts I have written over the years to mangle text files (usually so that I could edit them in Emacs) it makes me want to cry. > * Mastering lisp is an on-going process. I suspect this can take years. > Its actually one of the aspects I like about it as I am always seeing > new bits of code or ways of expressing various common idioms. I find > this keeps things 'fresh' and interesting. Any skill worth mastering is an on-going process. > * Really search the manual. Many times I've been trying to implement > some extension or customization and am struggeling with how to > implement some feature only to find, after searching the elisp manual, > that either it already exists or most of the hard work has been done > and all I need to do is glue the bits together. Yes, if I would have gotten all the way to defadvice in the manual I would not have needed to ask my questions. Although, I will admit that getting sucked into /Practical Common Lisp/ did not help my study of the Emacs Lisp Reference. I realize that I need to study harder, but I am still grateful to you and to Stefan for pointing me in the right direction. > * Have a go. Just get in there and do it. At first, it will probably be > slow and sometimes frustrating, but it gets much easier as the various > pennies drop into place. While everyone is a bit different, many find > (including me) that writing lisp is almost like a flow of > consciousness - as I'm working out the solution, I'm jotting down > these notes/rough draft and it just turns out that my notes are lisp. > Often, once the basic outline is written down, all I need to do is go > through refining and editing "the story". One thing is certain, the parentheses no longer bother me. That's certainly progress. > * Use the scratch buffer and IELM (M-x ielm) to experiment and try out > ideas. I find 'exploring' a problem this way really helps cement a > solution. Also useful when learning. The *scratch* buffer is pretty handy. I have been using it for experimentation, and with company-mode on it is a pretty good tool. However, I was wondering why there wasn't something like Slime's REPL for Emacs Lisp. As I mentioned above, I have been working through /Practical Common Lisp/ using w3m to read the HTML version and Slime to experiment in a REPL as I read. If you ask me that is the most brilliant way to learn a language imaginable. I am going to buy the actual book, as I believe that Peter Seibel and Apress richly deserve my money. But that setup is *way* better than reading a book. I have done most of my studying on my netbook, and so the whole thing is even more portable than the book. Anyway, it turns out that there was something like Slime's REPL for Emacs Lisp. I just did not know what that something was called. Thank you. > * Read/browse the source code. You will learn various techniques and > 'tricks' and get to see how to do many common tasks. This is an > excellent way of understanding a new mode and gives you insight into > how you can tweak it for yourself. That is definitely one of the real advantages of Emacs. Today I decided I would "port" one of my small test CL programs to Emacs Lisp. This seemed like an easier first Elisp project than figuring out how to patch browse-url.el so that browse-url can use different browsers depending on the URL. Baby steps. I needed a function that returned the list of files in a directory. Firing up ielm I was quickly able to find directory-files (simply by starting to type directory hitting TAB and seeing what showed up). Unfortunately, that returned the '.' and '..' entries as well as the files I actually wanted. My first impulse was to simply special case those entries, but I was curious to see what actual Emacs hackers did. So I poked around in files.el and came across directory-files-no-dot-files-regexp. This: (directory-files "/home/jearl/" t directory-files-no-dot-files-regexp) was precisely what I needed. Emacs not only has a ridiculously comprehensive manual, easy access to all of the docstrings in all of the Elisp (and C) code, and tools like the *scratch* buffer and ielm, but it also comes with piles and piles of the actual Elisp source that makes up the program. I hate to admit it, but I basically use Emacs because it was basically the only tool around when I first started using Linux. I got used to it, and even for pure end users it is a pretty impressive tool. Now that I am beginning to see it as a learning tool/development environment I am a little surprised it is not more popular ;). > As you get more comfortable with elisp, you will likely be surprised > how often you crank out a simple rough emacs function to automate some > task your doing - even just one-offs that were maybe a little too > complicated for just a macro. However, just one warning. It can become > addictive. f your not careful, you may find yourself spending too many > hours hacking out bits of elisp or re-inventing features which already > exist. Not really a problem unless it starts cuasing negative impact > on the rest of your life! Everyone needs a hobby. Hacking Emacs at least is potentially useful. Thanks again. Jason