help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too fine design granularity leads to numerous macro/function/command


From: Hongyi Zhao
Subject: Re: Too fine design granularity leads to numerous macro/function/command existed in Emacs.
Date: Sat, 14 Aug 2021 07:49:30 +0800

On Sat, Aug 14, 2021 at 2:25 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]