From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Too fine design granularity leads to numerous macro/function/command existed in Emacs. Date: Sat, 14 Aug 2021 07:49:30 +0800 Message-ID: References: <87czqh3b8u.fsf@zoho.eu> <87eeax6w9t.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26248"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 14 01:50:21 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEgwO-0006f6-QC for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 14 Aug 2021 01:50:20 +0200 Original-Received: from localhost ([::1]:41226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEgwN-0001jk-GM for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 19:50:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEgvp-0001jC-Iy for help-gnu-emacs@gnu.org; Fri, 13 Aug 2021 19:49:47 -0400 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:33286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEgvn-00075r-P6 for help-gnu-emacs@gnu.org; Fri, 13 Aug 2021 19:49:45 -0400 Original-Received: by mail-lf1-x129.google.com with SMTP id p38so23099839lfa.0 for ; Fri, 13 Aug 2021 16:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=o7SftQ6pBuvX2FmO0yNZaeaGZ87V70bamqgtgeAWCKA=; b=KZhLJydI3XUD2lnXd3jPoM6Ys0uciyqm5Ou5kP5nvqxkfye0pAhFO+6ximr7KXW6J6 JTztXxivFmEBdmomysk2lMMjJBPVBDIOjuMbbYzY3baRg4vWqn4g4Dfsqafe9cvLfae0 YLOXYhXMOr2qOSRxVqFk85HXbqo0McSKo6J//LNliFRp3LaLymYbjJAhKnELHrZGhmIW bp9rn5DdgvWu9eJqx2AaKAZzWqd0OSH4uyPX8zeV9lX7GT0QBE1/CrHz6dteDsmEeXKI G7bEPJxQMY4zfpMpqezfcT5eAZ7onavFvX2wagn8lq3YCdgW6cMLx5616+mt3AzONoOP cxSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=o7SftQ6pBuvX2FmO0yNZaeaGZ87V70bamqgtgeAWCKA=; b=k9qXlFiBEmcPwzGHkme403MDapBtubcFNvVM+9bQHleKjmrsYufJQvVtCtCYLEbxtt kWzJtXjYYA/oAOguM0DDQo6CHaYTvITULWytvv6zcc8f03r2dvWrdrw5skTV4N/ekNRz OyGQWN6Z/5m2dfX49A66C14FlfFTFfzByUgwakBF3yampXSAwglZZBI91e2oBX1l2s1U uYxlKHfugYo+U2iWE0ExViGiv7Xe0t3/Axc6rBS3XYZuieFYJH1gRQlXBYcw/o8WF8Iv CkgZ8CL4Bt4fh/EkskvQHRZ0m/UvWzBGyqVWsbBUMhi18xnxXQuWuTFJl8zlioMfhAWh eNDQ== X-Gm-Message-State: AOAM533c1gfZcm7D5wqP0nR7k8cATmPObwU2WcI2bPPkwOfqIhn5CGZc odaae2UvDxazaA42ZQ2BO9rFzVlaWmY0GZMurSI= X-Google-Smtp-Source: ABdhPJxxjj8A/IE4Wr9mtDUVhG8ERgJDHmnchj7DqJqohMnf7VuHyIokpQkc3qcIXsYyZ6pAnSipAapFpL7w8eVbbro= X-Received: by 2002:ac2:4e46:: with SMTP id f6mr3454549lfr.75.1628898581637; Fri, 13 Aug 2021 16:49:41 -0700 (PDT) In-Reply-To: <87eeax6w9t.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132514 Archived-At: On Sat, Aug 14, 2021 at 2:25 AM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Arthur Miller wrote: > > > learn relatively recently, say one year ago, but I find lisp > > much faster to code than shell. That what you coded there > > requires knowledge of zshell, awk, sort and tail. > > They are just basic building blocks the basic usage of which > is known to everyone, it is like building Lego or something, > meanwhile the below code requires both some general > programming fluency AND some inside knowledge how the > particulars work in Lisp and even Emacs/Elisp. > > Everyone that writes it can also combine a bunch of shell > tools, but everyone who can combine a bunch of shell tools > can't write that - many of them can't program at > all, actually. So I've heard that "LISP is the language of GOD!". Using LISP basically means the continuous evolution of pure thought and logic until the problem is solved. > (defun sort-lines-length (beg end) > (interactive (if (use-region-p) > (list (region-beginning) (region-end)) > (list (point-min) (point-max)) )) > (save-excursion > (save-restriction > (narrow-to-region beg end) > (goto-char (point-min)) > (sort-subr nil > #'forward-line > #'end-of-line > nil nil > (lambda (a b) (> (- (cdr a) (car a)) > (- (cdr b) (car b)) )))))) > (defalias 'sll #'sort-lines-length) > > -- > underground experts united > https://dataswamp.org/~incal