all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Vigouroux via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Find the longest word in the word list file.
Date: Thu, 12 Aug 2021 17:53:14 +0200	[thread overview]
Message-ID: <87h7fuy80l.fsf@laposte.net> (raw)
In-Reply-To: <874kbuk6oe.fsf@zoho.eu> (Emanuel Berg via Users list for the's message of "Thu, 12 Aug 2021 17:45:53 +0200")

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Kevin Vigouroux via Users list for the GNU Emacs text editor wrote:
>
>>> Here you go,
>>>
>>> (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)
>>>
>>> https://dataswamp.org/~incal/emacs-init/sort-incal.el lines 18-32
>>
>> How do we know that the “sort key” is a cons cell?
>
> I suppose #'forward-line (NEXTRECFUN) and #'end-of-line
> (ENDRECFUN) collectively define what is a record...

No, the manual only states that these functions move the point.
-- 
Best regards,
Kevin Vigouroux



  reply	other threads:[~2021-08-12 15:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 23:14 Find the longest word in the word list file Hongyi Zhao
2021-08-11  1:51 ` [External] : " Drew Adams
2021-08-11  3:00   ` Hongyi Zhao
2021-08-11  6:46     ` tomas
2021-08-11  8:58       ` Hongyi Zhao
2021-08-11 10:03         ` tomas
2021-08-11  9:52       ` Arthur Miller
2021-08-11 10:06         ` tomas
2021-08-11 13:32           ` Hongyi Zhao
2021-08-11 13:58 ` Stephen Berman
2021-08-11 14:17   ` Hongyi Zhao
2021-08-11 14:27     ` Stephen Berman
2021-08-11 16:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  2:10   ` Hongyi Zhao
2021-08-12  2:29     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  3:13       ` Hongyi Zhao
2021-08-12  3:17         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  3:34           ` Hongyi Zhao
2021-08-12  3:41             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  3:52               ` Hongyi Zhao
2021-08-12  4:05                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  4:25                   ` Hongyi Zhao
2021-08-12  4:38                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  4:53                       ` Hongyi Zhao
2021-08-12  5:27                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  6:25                           ` Hongyi Zhao
2021-08-12  6:46                             ` Hongyi Zhao
2021-08-12  6:51                             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12  6:59                               ` Hongyi Zhao
2021-08-12  2:53     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12 14:47       ` Kevin Vigouroux via Users list for the GNU Emacs text editor
2021-08-12 15:45         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12 15:53           ` Kevin Vigouroux via Users list for the GNU Emacs text editor [this message]
2021-08-12 16:10             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-12 16:24               ` Kevin Vigouroux via Users list for the GNU Emacs text editor

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=87h7fuy80l.fsf@laposte.net \
    --to=help-gnu-emacs@gnu.org \
    --cc=ke.vigouroux@laposte.net \
    /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.