emacs-devel
[Top][All Lists]
Advanced

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

enum (was: Re: Display of undisplayable characters: \U01F3A8 instead of


From: Emanuel Berg
Subject: enum (was: Re: Display of undisplayable characters: \U01F3A8 instead of diamond)
Date: Mon, 05 Sep 2022 08:08:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> That would degrade Emacs to Vi level.
>
> Here are the top 25 channels right now on Libera. As you see
> #emacs (position 19) just barely beats vim (22) and is
> severely under-gunned by neovim (10).
>
> #matrix                2068
> #linux                 2050
> #libera                1673
> [...]

Or, using

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/enum.el

(require 'cl-lib)
(require 'subr-x)

(defun enum (beg end)
  (interactive "r")
  (goto-char beg)
  (let*((lines   (count-lines beg end))
        (pad-len (length (number-to-string lines))) )
    (cl-loop
     for line from 1 to lines
     do (goto-char (line-beginning-position))
     (insert
      (format "%s. " (string-pad (number-to-string line) pad-len nil t)))
     (forward-line) )))

 1. #matrix                2068
 2. #linux                 2050
 3. #libera                1673
 4. #archlinux-cn          1654
 5. #python                1600
 6. #fedora                1493
 7. #archlinux             1402
 8. #ubuntu                1080
 9. #archlinux-cn-offtopic 1054
10. #neovim                 958
11. #networking             900
12. #ansible                897
13. ##rust                  871
14. #c                      842
15. #git                    830
16. #postgresql             820
17. #security               804
18. #bash                   801
19. #emacs                  798
20. #gentoo                 796
21. #debian                 760
22. #vim                    735
23. ##programming           732
24. #go-nuts                723
25. #haskell                691

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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