emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding a generic mathematical library


From: Emanuel Berg
Subject: Re: Adding a generic mathematical library
Date: Sun, 21 Jul 2024 22:17:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Christopher Dimech wrote:

> To get what you want, you have to agree with something.
> Otherwise you get the resistance you have witnessed. I am in
> agreement with Eli on this thing. We should first discuss
> its scope and design.

To show you an example of what I mentioned in a post that
hasn't arrived, check out line number 8. What do you see?

Yes: ERC!

Elisp is the only language when you include an IRC client to
sort a bunch of wards. Yeah, crazy.

[ BTW don't understand why this is so complicated, should
  re-write that last part. Anyway, very useful! ]

PS. Now I've talked about this enough. You want the truth?
    You can _handle_ the truth. What I can come up with at
    home fiddling with a bunch of Elisp files, Emacs
    programmers cannot solve collectively since 1984?

    That is: 39y 6m 20d if we count from 1984-12-31; no idea
    what exact date GNU Emacs was first operational. Should be
    enough time to get libraries one would think but wrong
    policy, people that are used to leaders that they don't
    question ever ... then this is what happens. Anyway enough
    of this then but some of it was fun :)
DS.

(defun sort-line-words (beg end &optional set-delim)
  (interactive "r\nP")
  (or beg (setq beg (point-at-bol)))
  (or end (setq end (point-at-eol)))
  (let*((str       (buffer-substring-no-properties beg end))
        (delim-str (or set-delim (read-string "delimiter: ")))
        (str-list  (split-string str delim-str))
        (sorted    (erc-sort-strings str-list)) )
    (kill-region beg end)
    (if set-delim
        (progn
          (dolist (s (nreverse (cdr (nreverse sorted))))
            (insert (format "%s%s" s delim-str)))
          (insert (format "%s" (car (last sorted)))))
      (insert-string-list sorted) )))

;; sort me: a is just string test this
;; sorted:  a is just string test this
;; and me with a dash delim: this-is-just-a-test-string

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




reply via email to

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