[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: Strange whitespaces.
From: |
Emanuel Berg |
Subject: |
Re: [External] : Re: Strange whitespaces. |
Date: |
Fri, 01 Oct 2021 12:24:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao wrote:
>>> I presumably basically figured out the logic behinds the
>>> nomenclature: Based on the Description given on the above
>>> URL:
>>>
>>> a space character (of various non-zero widths)
>>>
>>> So, the Z <---> non-zero, and s <---> space.
>>
>> The logic is it must be something and it can't be S since
>>
>> S Symbol Sm | Sc | Sk | So
>>
>> Zo why not Z inztead? Zimple az that! Mozt likely anyway.
>>
>> Zs Space_Separator a space character (of various non-zero widths)
>> Zl Line_Separator U+2028 LINE SEPARATOR only
>> Zp Paragraph_Separator U+2029 PARAGRAPH SEPARATOR only
>> Z Separator Zs | Zl | Zp
>
> OMG. I didn't notice the last line above.
'z' is actually the separator between the English alphabet and
what comes after it ...
Maybe we can have a cyclic alphabet in Lisp - no need for
Z then! Z in English aren't even toned (or are they? Mask of
Zorro - no!) so it can be dropped from the English ABC, even.
Mask of Sorro - hm, doesn't have the same elan to it ...
;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;; http://user.it.uu.se/~embe8573/emacs-init/abc.el
;;; https://dataswamp.org/~incal/emacs-init/abc.el
(require 'cl-lib)
(defun alphabet (&optional as-list)
(let ((abc "a b c d e f g h i j k l m n o p q r s t u v w x y z"))
(if as-list
(cl-remove ?\s (string-to-list abc))
abc) ))
;; (alphabet) ; a b c d e f g h i j k l m n o p q r s t u v w x y z
;; (alphabet t) ; (97 98 99 100 101 102 103 104 105 106 107 108 ...)
(defun echo-alphabet (&optional number)
(interactive "p")
(let*((num (or number (length (alphabet t))))
(part (cl-subseq (alphabet t) 0 num))
(str-list (cl-mapcar (lambda (c) (char-to-string c)) part))
(str-almost (format "%s" str-list))
(str (substring str-almost 1 (1- (length str-almost)))) )
(message str) ))
;; (echo-alphabet) ; a b c d e f g h i j k l m n o p q r s t u v w x y z
;; (echo-alphabet 10) ; a b c d e f g h i j
;; (echo-alphabet -10) ; a b c d e f g h i j k l m n o p
(defalias 'abc #'echo-alphabet)
--
underground experts united
https://dataswamp.org/~incal