From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation Date: Tue, 26 Jul 2022 09:59:07 +0200 Message-ID: <87ilnk8fuc.fsf@gmail.com> References: <165875050243.3275.8867100069985547389@vcs2.savannah.gnu.org> <20220725120142.D1283C0F203@vcs2.savannah.gnu.org> <87r1298hxp.fsf@gmail.com> <864jz513nb.fsf@mail.linkov.net> <83h735dpno.fsf@gnu.org> <86tu75doeq.fsf@mail.linkov.net> <867d41dlc8.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28335"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 26 10:02:14 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGFW9-00072u-RW for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 10:02:13 +0200 Original-Received: from localhost ([::1]:46518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGFW5-0001Vs-R7 for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 04:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGFTJ-00080B-Br for emacs-devel@gnu.org; Tue, 26 Jul 2022 03:59:19 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGFTE-0001bz-0O; Tue, 26 Jul 2022 03:59:13 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id b26so19029229wrc.2; Tue, 26 Jul 2022 00:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:from:to:cc; bh=eeYtj1ZFq/9hIFEmmPU23LJlIsDbOQ3PT47NicxsdhY=; b=dpoAK0T7rMHYms0YFLpzW/HOpvNXcRV4Qw++A37y/MH9TuBEeCYc98HKB9CvbnPTBT 6Xaf+riIUiMgy+2xu74OwTUW+paDTlkHL2uXfAlqqOuSa8d7azONhtB7Pk5zzzPGhnlu nDYNaJvC5yotBMkKEHKulSFMzQ4TUy8x91uYUlI89mCddt27Rmx0v0vrGiUlSIrof0rt h9aKZ4jHNBrKH/cLqt41yKTsjUXjC+wsTaQFuz/7JOPIg/b2z82jl3zsH/1GmMnSrkfc wyoj2yXX7rUefI2btgo5hY6HaThAcvs3WumuvsPI2HpfoTCV8j87RCbjQO1gYQRYt9dm cQGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=eeYtj1ZFq/9hIFEmmPU23LJlIsDbOQ3PT47NicxsdhY=; b=6NOWvaDxrytp3lcc5pI3RPT2voWFyjixQ2wuZvH4W9tCc0iKcYJB7HjKcMGyobLG3V aOZBdyY5guQyOQtReGtbs1msZFUI5k49bi9tJAHLNZlzz55qnFdjGPDczHyVQQDSDO6B xo7X6L4U3XFYtQr2DVLNeQxcbjGhbZe+JJJURhQDyD2GVWcfUbfV/qJnKKxOgPnkp+w6 l0F+TnO3Vopurpny4yxQ/3x8D9Jw5hMdhGMX0UctAwASshhaxarov49P2Hkteb6ai2oq pDWA0Atg2fXZ7ZbVHRkJwAPty+pTA+nP9QU2Cxajvl97yJwoXMmadrBB0byBWXPFEBq2 CUNg== X-Gm-Message-State: AJIora+OXOZTDsaVEH+r4KUykcBLynA/miSKncnrQU2GD9w0/0PfBIz1 6kLLjxQm+nbqHVmV4Wmqjb3mjmz7fu8= X-Google-Smtp-Source: AGRyM1tmkk2RetJ+YXGgghXK1FJEkkmks1Qb/naqzknxoybsfxRZc7RVyPJ/xqmx/YXsqTILd0WAKA== X-Received: by 2002:a5d:50c4:0:b0:21e:8776:bb95 with SMTP id f4-20020a5d50c4000000b0021e8776bb95mr5780549wrt.461.1658822348995; Tue, 26 Jul 2022 00:59:08 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:7834:6702:759c:618d]) by smtp.gmail.com with ESMTPSA id c25-20020a7bc859000000b003a0375c4f73sm16729014wml.44.2022.07.26.00.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 00:59:08 -0700 (PDT) In-Reply-To: <867d41dlc8.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 25 Jul 2022 22:49:11 +0300") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=rpluim@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292666 Archived-At: >>>>> On Mon, 25 Jul 2022 22:49:11 +0300, Juri Linkov said: >>>> > Should we make `char-fold-to-regexp' into a command and refer to it >>>> > from here? Or add something like `char-fold-show-equivalences'? >>>> >>>> A better name would be `describe-char-fold'. >>> >>> For a command, I'd say describe-character-foldings. But >>> char-fold-show-equivalences is IMO a better name. >> >> All similar commands have names starting with the `describe-' prefix like >> `describe-char', `describe-character-set'. So maybe then >> `describe-char-fold-equivalences'. Juri> Ok, then let's use describe-char-fold-equivalences: Ah, that lists *all* the equivalences. I was thinking more along the lines of the following (we can give it a different name, or combine them) (defun char-fold-char-equivalences (char &optional lax) "Display characters equivalent to CHAR. Prompt for CHAR. Interactively, a prefix arg means also include any ligatures that CHAR partially matches." (interactive (list (read-char-by-name "Character (Unicode name or hex): ") current-prefix-arg)) (require 'help-fns) (let ((help-buffer-under-preparation t)) (help-setup-xref (list #'describe-char-fold-equivalences) (called-interactively-p 'interactive)) (let* ((equivalences nil) (char-fold--no-regexp t) (table (char-fold--make-table)) (extra (aref (char-table-extra-slot table 0) char))) (setq equivalences (aref table char)) (when lax (setq equivalences (append equivalences (mapcar (lambda (entry) (cdr entry)) extra)))) (setq equivalences (cons (char-to-string char) equivalences)) (with-help-window (help-buffer) (with-current-buffer standard-output (insert (mapconcat (lambda (c) (format "%s: \?\\N{%s}\n" c (or (get-char-code-property (string-to-char c) 'name) (get-char-code-property (string-to-char c) 'old-name)))) equivalences))))))) Robert --