all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: reader@newsguy.com
To: help-gnu-emacs@gnu.org
Subject: Re: Beginning Hobbyist Programmer Question
Date: Thu, 17 Jan 2008 18:26:28 -0600	[thread overview]
Message-ID: <uve5sj7wr.fsf@newsguy.com> (raw)
In-Reply-To: 44129c70-807a-4ef0-bc4f-e299caf5e334@k39g2000hsf.googlegroups.com

signups17@gmail.com writes:

> As I get more and more into programming, I get the sense that "real"
> programmers use emacs or vi, or some other editor that from my
> perspective, seems arcane and impenetrable compared to something
> simple like IDLE that comes with Python, or Scite, for example.

> Can anyone provide a cogent explanation for why I should take the time
> to climb that learning curve? What are the benefits, as you see them?

I'm a rather lowlevel user although a longtime user of emacs.  Also a
rather lowlevel programmer but even at my level without the powers of
a real editor (and I just scratch the surface) you will soon tire of
programming since so many things are repetitious.

I'm not sure what the editors you mention are capable of but you will
very soon if not already be needing to insert repetitive things such as
the skeleton of a while or for loop.  Or common strings that recur in
your scripts.

Maybe you will need to quickly comment a chunk for testing something.
I could build up a pretty long list of things emacs does for me but
you must already have run into some of this.

Emacs has the most powerful abbrev mode you are likely to find. 
`abbrevs' are emacs speak for inserting things by typing a
string of characters like:
  pr<spc> to insert `print "mydebug bla bla  ";' 

I know almost no python so not sure what would be appropriate there. 

Here is an example of the kind of thing I use very often in perl.

To insert the skeleton of a getopts section like below I type:
pget<spc>
HERE
## BEGIN GETOPTS SECTION =========================================
  our ($opt_a,  );
  use Getopt::Std;
  my $optstr = "ab:c ";
  getopts($optstr);

  if($opt_) { 
to HERE 

And after hitting space as shown, that whole blob between HEREs (of
course not the HEREs) is inserted.  So a bunch of the coding is done
in a few keystrokes.  Emacs has a whole section called `skeletons' and
using them to bolster abbrevs there is no limit to what you can insert
quickly.  Really whatever can be imagined and done with elisp code can
be brought to bear and inserted in a keystroke or two.

Of course emacs has a developed python mode.  I can't speak much about
it since I haven't used it to speak of but I'm guessing it will be
like all other parts of emacs... something that a goodly number of
experienced coders have added and subtracted to/from for some years.

> Also, assuming I'm convinced, can you point me in the direction of a
> good tutorial?

Aside from this monster windy post of mine; no one is likely to spend
much time trying to `convince' you, but I can tell you that you will
learn some new curse words before you become competent.  Things that
my fingers know how to do without thought now didn't get there real
easily.

Someone already told you about the best tutorial, but let me suggest
that you go at emacs the same way you did python.  I'm guessing you
jumped right in and got your hands dirty.  As problems arose you
sought help either in documentation or on python lists.

I can also tell you that you would be hard pressed to find a more
helpful list.  I've badgered this list for years and still have
never failed to get an answer to my questions.

Emacs has a truly massive customization section that can be accessed in
several ways.  M-x customize-apropos <RET> REGEX (or words) <RET>

Will find dozens of customizations for just about any area of emacs
usage.  With judicious use of REGEX or plain words you can find
something pretty quickly.

There is a truly deep and profound manual with emacs that can be
searched in several ways or just read at in your spare time.
Just reading parts of it will inspire you with possibilities.
I think you can still buy a paperback book of it if so desired.

I bought one long ago.  It is a pretty hefty medium sized book.

It may take you a while to really know how to find stuff in that
manual but it was laid out and prepared to be subjected to the full
power of emacs searching abilities right from the start. 

By now some really talented people have worked on it and made sure a
new user could find something helpful there.

  parent reply	other threads:[~2008-01-18  0:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 22:04 Beginning Hobbyist Programmer Question signups17
2008-01-17 22:47 ` Rupert Swarbrick
2008-01-18  0:26 ` reader [this message]
2008-01-18  1:44 ` Nick Roberts
2008-01-18  9:02 ` Andreas Röhler
2008-01-18  9:04 ` Thien-Thi Nguyen
2008-01-18 10:05 ` Stefan Kamphausen
2008-01-18 11:11 ` Daniel Pittman
2008-01-18 23:22 ` Alan Mackenzie
2008-01-19  0:19 ` Mike Treseler
2008-01-21 16:33   ` rustom
2008-01-22 17:24 ` Sebastian Tennant
2008-01-22 18:10   ` Mike Mattie
2008-01-23  6:02 ` Bob McCormick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uve5sj7wr.fsf@newsguy.com \
    --to=reader@newsguy.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.