From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Emacs Book Vs Emacs Manuals Date: Wed, 01 Jul 2015 02:00:39 +0200 Message-ID: <876164ycew.fsf@nl106-137-147.student.uu.se> References: <554C9356.5000204@gmail.com> <20150508125314086261755@bob.proulx.com> <87bnhuc177.fsf@mbork.pl> <55561B9E.4070101@arlsoft.com> <87y4kpfvct.fsf@debian.uxu> <87mvzmv7ef.fsf@nl106-137-147.student.uu.se> <871tgycjae.fsf@mbork.pl> <87lhf53v4t.fsf@nl106-137-147.student.uu.se> <87h9pqul7q.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435708949 14287 80.91.229.3 (1 Jul 2015 00:02:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jul 2015 00:02:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 01 02:02:20 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 1ZA5Tm-00082d-ME for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Jul 2015 02:02:18 +0200 Original-Received: from localhost ([::1]:49071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA5Tl-0001GQ-NQ for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2015 20:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA5Tb-0001G1-Fw for help-gnu-emacs@gnu.org; Tue, 30 Jun 2015 20:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZA5TX-0003nS-I6 for help-gnu-emacs@gnu.org; Tue, 30 Jun 2015 20:02:07 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:56005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA5TX-0003n1-Bo for help-gnu-emacs@gnu.org; Tue, 30 Jun 2015 20:02:03 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZA5TU-0007uL-E6 for help-gnu-emacs@gnu.org; Wed, 01 Jul 2015 02:02:00 +0200 Original-Received: from nl106-137-246.student.uu.se ([130.243.137.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jul 2015 02:02:00 +0200 Original-Received: from embe8573 by nl106-137-246.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jul 2015 02:02:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 88 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-246.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:M1SniQOy7j4aAiG5hSvawp+/g3E= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:105346 Archived-At: Filipp Gunbin writes: > A macro is a program, too, and it's editable as you > know, but written in a different language. > When I record a macro I get some code in the end, > yet it's not elisp. A macro is a program but is it in another language? If the inputs are commands, and the commands are Elisp, isn't the language actually a subset of Elisp? And this is what I've said since day one, macros is poor man's programming. Or do you mean how that language is perceived and/or displayed? > That's what I meant by saying that macros help write > code _using interactive editor facilities_ - that > is, not directly typing language syntactic > constructs. It's quicker and simpler to record > a macro, but the cost of it is the lack of > general usefulness. It may be quicker if you do not make any mistakes and if you can envision what to do from start to finish. In Elisp you don't have to worry about the interactive distinction and instead you are able to use the full power of the tool Emacs. But yes, I'm sure some people who did lots of it compared to the amount of Elisp they did, it makes sense it is quicker for them. > This is obvious, and I'm writing it because you time > after time refuse to admit that sometimes macros are > better than elisp. I suppose you have reasons to say > that, that's why this discussion can be interesting > to me. The reason I have for saying that is that it is logical: you can do everything with Elisp that you can do with macros, but not remotely so the other way around. I also say that because I haven't seen any good examples where a macro saves the day. I also say that because of a more bigger view. Nother else works like that. Say that ten guys are digging a hole with shovels. That sounds pretty fun, ey? Unfortunately, some guy thought that to be inefficient so he constructed the excavator. Now, that machinery does the job as well as the ten guys but it doesn't look or work like the ten guys at all. This is the Elisp approach. The macro approach would be to construct ten robots that look exactly like the guys and have them to the exact same thing to produce the exact same result. If A solves problem B, and I want to solve B in another way, I don't think "how can I replicate A?", instead I examine B to think how I can solve it in terms of the problem itself. If I can't find a solution, I might examine A to learn how to do it, but not in order to exactly replicate it! > Yes, thanks, that was a rhetorical question :-) *nod* (note then smiley) > Meant to underline that programs written in > a language not general enough to handle all and > everything also can be useful sometimes, and awk is > a good example, I think. Yeah, but are macros more specific than Elisp just because they are less general? No, I think this is rather something on the human side of the equation. I want to type the actual commands and see them appear in front of me. You, perhaps do not care about that and have it all in your fingertips and muscle memory. And that is interesting because I'm all into fingertips and muscle memory (finger habits) as well... -- underground experts united http://user.it.uu.se/~embe8573