From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: Emacs Book Vs Emacs Manuals Date: Fri, 15 May 2015 18:45:53 +0000 Message-ID: <155DEC68569B714B86C2C7075F5EDA9892BF7458@DAKIYA1.pegasus.local> References: <554C9356.5000204@gmail.com> <20150508125314086261755@bob.proulx.com> <87bnhuc177.fsf@mbork.pl> <55561B9E.4070101@arlsoft.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1431715574 29252 80.91.229.3 (15 May 2015 18:46:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 May 2015 18:46:14 +0000 (UTC) To: MBR , Rusi , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 15 20:46:10 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YtKcb-0008S0-IY for geh-help-gnu-emacs@m.gmane.org; Fri, 15 May 2015 20:46:09 +0200 Original-Received: from localhost ([::1]:60969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtKca-0007yB-Sc for geh-help-gnu-emacs@m.gmane.org; Fri, 15 May 2015 14:46:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtKcP-0007y5-Vv for help-gnu-emacs@gnu.org; Fri, 15 May 2015 14:45:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtKcM-0000kb-8a for help-gnu-emacs@gnu.org; Fri, 15 May 2015 14:45:57 -0400 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:8394 helo=livemail.shubertorg.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtKcM-0000kM-4B for help-gnu-emacs@gnu.org; Fri, 15 May 2015 14:45:54 -0400 Original-Received: from dakiya1.pegasus.local ([172.16.208.201]) by DAKIYA1.pegasus.local ([172.16.208.201]) with mapi id 14.03.0123.003; Fri, 15 May 2015 14:45:54 -0400 Thread-Topic: Emacs Book Vs Emacs Manuals Thread-Index: AQHQiynefKmgz5q+gEC36d0Ootns6p19gW4A///iOJA= In-Reply-To: <55561B9E.4070101@arlsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 207.246.209.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104457 Archived-At: > -----Original Message----- > On > Behalf Of MBR > Subject: Re: Emacs Book Vs Emacs Manuals >=20 > Instead, why not challenge them to do some task whose end result > they'll > consider useful, but that you know will be a royal pain in the ass to > do > with a simple-minded text editor. Make sure it's not something > contrived. Tell them to use whatever editor they're most comfortable > with. After 15 min. or more of tedious editing in their underpowered, > brain-dead editor, show them that you can do the same thing in 15 > seconds using some general-purpose Emacs feature. I agree. Letting them do a complex repetitive task would be a good demonstr= ation. Here's my proposed task; I do this all the time during development. Given a long structure of some sort, write a print function for it. The wrapper is easy, something like the following: void print_long_structure (FILE *fp, long_struct_t *ls) { fprintf(fp,"long structure name:\n"); return; } Each element should be printed on a line of its own, indented a little with= name and value separated by TAB: structure_element_name: element_value If you know emacs, then it's an obvious keyboard macro. If not, then there's some education to be had,=20 including rehearsing keyboard macros,=20 thinking about initial conditions,=20 preparing for the next iteration (forward-line), etc. Once you get through all that, writing the code for the next, e.g. 30 lines= is easy and very satisfying. I hope this is worthwhile to someone. --=20 ,Doug Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224 or ext 4335 The human brain is the most complex thing known to man, according to the hu= man brain.