From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KEbxBKyjzmKgLwAAbAwnHQ (envelope-from ) for ; Wed, 13 Jul 2022 12:51:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cC7zBKyjzmJmAgEA9RJhRA (envelope-from ) for ; Wed, 13 Jul 2022 12:51:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BBC72C019 for ; Wed, 13 Jul 2022 12:51:23 +0200 (CEST) Received: from localhost ([::1]:51862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBZxi-00039a-Fm for larch@yhetil.org; Wed, 13 Jul 2022 06:51:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBZwK-00038o-Dh for emacs-orgmode@gnu.org; Wed, 13 Jul 2022 06:49:56 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBZwI-0001s2-D1 for emacs-orgmode@gnu.org; Wed, 13 Jul 2022 06:49:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8D13224010A for ; Wed, 13 Jul 2022 12:49:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1657709392; bh=26T5lrMDMQPf46iIY2DmSYvhq+VsgpH3ha2Km3ZOAEQ=; h=From:To:Subject:Date:From; b=fjJNFaCh2NZFBbOub7bKCIIsHu+aCCXgC9avWazrBpEDDJOI8bzGKcJZ+ou7OyhvR R/KYvSro6cO5VxDV5dOkCY6EuolhQDRykwriONx9Mm90Bo0jOdOGn1ikpRLAd+65/s NIvsoVyADND4lLQ5lS/6fOrDvYGk0m5hPN6xHzs3nm4XIiyH+ou6OTfCEmKvy5A06m OngRPF+eSxgwpoxFJPk4vjofjUBLJ6oOdsQajlgi/i95glkL61xZe/Srij5OYRY2oz O1iHdmtlIltIYcSx+w1Tj6E2gE3KNDdsTpm0D8OQgZ54ibG6v+KaBU85+TzwS88mWA FEa7Enlad1jIg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LjZBm08VDz9rxV for ; Wed, 13 Jul 2022 12:49:51 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [tip/offtopic] A function to describe the characters of a word at point Date: Wed, 13 Jul 2022 10:49:48 +0000 Message-ID: <87y1wxwalv.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657709483; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8OlLB0kZfq+vIA7EEs2ykP+0ui3dFcw1gTx06efjEbM=; b=KlmqtFJ+lnUClHkpqHwbIRiPhAKxy6JKupuuFOebymjzI/Hln5JvpyrhR9Ow2+MIbXt2GB IA39hxKMt4+Z+TG/lyQHacQmiMBy4YvG2qea51SyTEAjK48WEpgYKXax01r0F+jCfJwpY4 +GhbJoUgA0NjmewJOcUaK/5KBwXaWF+H1Edi0WO4/u31MjD54Xk5fEqPCDfwahYfRimy2t In+vAWZe3k7K5qzyq4lUwb/pc6//hjoUwtxuxyk3wRBwEiID1MywGIF/yBBYukq6na9+ET 5qvPLyKF56ZWUqVrV1+rRhbG0shnBcD5MKr2sHhlZteO0q9wxZW5K247B/iwuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657709483; a=rsa-sha256; cv=none; b=q36d9aWDNx8TbJplsTktUGZ6xoAnGS4mfDQHqJBGuPAEMOWHVLbhNBwPQ0ssI6hrTrCp6e yWMwRr4khh7ZMrZwIQtxR+dBDy4GXTvZhMCJmS4OKgWt16LyV4SxhthC3TtJ8BW2Qng/4u AIRbyfLw3Ev8Mo+GnWa0byvSa74jfzu2gDypThObTulrkKusViZYyQ8L52fHyHFZeYy1sw KDY02u7H8JCsICNVdDcrNjcYTa7Jxwu50W3P7DFgMDJwoe8gcffjARo/mBuWvWgd/Shs1a UNI77/3uZwXq19D/boyehof/O6rhQsg40e1sC0CisKhaZmbhEXDsUx1k6g7NVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fjJNFaCh; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fjJNFaCh; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BBC72C019 X-Spam-Score: -4.15 X-Migadu-Scanner: scn1.migadu.com X-TUID: qCcF8l/O9cUs Sorry for the slight offtopic. Since Unicode and character issues come up here from time to time, I'm sharing this 'homemade' function that I wrote a long time ago for my work, in case someone finds it useful. It Shows a brief descriptive list of all characters in a word at point. Each character includes the Unicode name, code, and canonical decomposition. Example: =E1=BC=84=CF=81=CF=87=CE=BF=CE=BD=CF=84=CE=B1 >> =E1=BC=84 (#1f04) ... GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA ... desc= omp: #1f00 #301 =CF=81 (#3c1) ... GREEK SMALL LETTER RHO ... descomp: #3c1 =CF=87 (#3c7) ... GREEK SMALL LETTER CHI ... descomp: #3c7 =CE=BF (#3bf) ... GREEK SMALL LETTER OMICRON ... descomp: #3bf =CE=BD (#3bd) ... GREEK SMALL LETTER NU ... descomp: #3bd =CF=84 (#3c4) ... GREEK SMALL LETTER TAU ... descomp: #3c4 =CE=B1 (#3b1) ... GREEK SMALL LETTER ALPHA ... descomp: #3b1 #+begin_src emacs-lisp (defun describe-chars-word-at-point () (interactive) (setq chars-in-word nil) (if (not (current-word t t)) (error "Not in a word at point...") (let ((word (current-word t t))) (save-excursion (with-temp-buffer (insert word) (goto-char (point-min)) (while (re-search-forward "\\(.\\)" nil t) (let* ((char-name (save-excursion (backward-char) (get-char-code-property (char-after (poin= t)) 'name))) (char-desc (save-excursion (backward-char) (get-char-code-property (char-after (poin= t)) 'decomposition))) (char-format (concat (match-string 1) "\s" "(" (format "#%x" (string-to-char (ma= tch-string 1))) ")\s...\s" char-name "\s...\sdeco= mp:\s" (mapconcat (lambda (cod) (format "#%x" cod)) char-desc " ")))) (push char-format chars-in-word))) (when (get-buffer "*chars in word*") (kill-buffer "*chars in word*")) (get-buffer-create "*chars in word*") (set-buffer "*chars in word*") (insert (mapconcat 'identity (reverse chars-in-word) "\n")) (view-mode) (temp-buffer-window-show "*chars in word*" '((display-buffer-below-selected displ= ay-buffer-at-bottom) (inhibit-same-window . t) (window-height . fit-window-to-buffe= r)))) (pop-to-buffer "*chars in word*"))))) #+end_src