From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iI0aG6a70GKUswAAbAwnHQ (envelope-from ) for ; Fri, 15 Jul 2022 02:58:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OCkfG6a70GKqYwAA9RJhRA (envelope-from ) for ; Fri, 15 Jul 2022 02:58:14 +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 E1E572A2F3 for ; Fri, 15 Jul 2022 02:58:13 +0200 (CEST) Received: from localhost ([::1]:43380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oC9em-00015d-Ad for larch@yhetil.org; Thu, 14 Jul 2022 20:58:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC9dT-00015V-Ep for emacs-orgmode@gnu.org; Thu, 14 Jul 2022 20:56:51 -0400 Received: from mout02.posteo.de ([185.67.36.66]:46643) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC9dR-00057Z-9V for emacs-orgmode@gnu.org; Thu, 14 Jul 2022 20:56:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6FFBF240107 for ; Fri, 15 Jul 2022 02:56:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1657846606; bh=j4Qa+AI7eJYN+xRX7OPvynyQgIASEeG2pteLye6g1S8=; h=From:To:Cc:Subject:Date:From; b=e3gw5DzaWmlEzcOFqA+5F0KuorF6Tn/KZoFxLtf3w8cQUUR8eoa6tQ0JthsGqBldr LOpAncFj4g3xzyhke7JecS3DfZzryMxxELRddYp5EZL/zrvbQsmhcoj0DI3v0GkmBo Z/kidZc0/IaEp6spDnO/eyflQ+ZcEhwJOuSRA1Fc23F1COnHc8AazUyXvC30VpyLdw QxCL+zDQOR6q8W3R+KUm/i+EPwdyIY4E31aLaXMeg/6zx7DN8I9xPmcV1FdowsU5Zy KCKp2Duwwd6aLddgYSOArN6H9Z1ytWqCk94kDqAEv0Wn7f93UWvCEurHDceK1SYtue ZFSSoGmbGRgkw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LkXxS48FDz9rxX; Fri, 15 Jul 2022 02:56:41 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Marcin Borkowski Cc: Samuel Wales , orgmode Subject: Re: [tip/offtopic] A function to describe the characters of a word at point References: <87y1wxwalv.fsf@posteo.net> <87edyn4sal.fsf@mbork.pl> Date: Fri, 15 Jul 2022 00:56:41 +0000 In-Reply-To: <87edyn4sal.fsf@mbork.pl> (Marcin Borkowski's message of "Thu, 14 Jul 2022 17:42:08 +0200") Message-ID: <87o7xrdwhi.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain 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=1657846694; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=xI6c2yAHoYJYL0a5KCZTgk7X8L7Qbf+/0ddDrYXNVRQ=; b=qzAG+Yg2iJcS+g93992UcY7gzUFZSulqPnUVttpp1qyAah3/MiAboA/k5+zB2rEr7G2puv RoFSvvDRp/dYc2uRPt+x60Uk2JoHlCC9ayR6NYmWZx45JPVkUQanGFWlsdOmYoNBDzUzMl OMLJw8x3vX6oCz6+3MCC/IeOhtTZjjuq9DAFufeOUdzWJUNsRqzbqnpVkd7gBm9kIOqIn0 1RXSXw0nC84LcIwqRmbgZuxuUmYNFSSTQKWF6utJfes344ac86l8ao7ZNlcivmtuILIC0i NF2U4iXohCMjFew7uf0x8pSsl0Nuisr2VD5a6IzGKLQf2Hr7OXwwaUvmKPMSsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657846694; a=rsa-sha256; cv=none; b=ZfHDBDG6npVoYc3gj1S3Y8QXTZpKAvgFpc3F2KX8Atm8OU52lcepLDr8ktfP7CN8xaJk6H L0CL1AFosnCVfqA6WfO6vHjf3HJQc/QGkmve9feWrv25IZbDJUveoShKpUI2TV6oeIBEi7 iSkrdsI6lLuHWkypTWKGFKYn+Qk8kPmWcWOENIU9u3RrZKkTQHZ5l/3RPeBB03LbwYJihd zZSlrEVio9d5t+5s4p8mdR2vOM483Z+q4ZPP6mhioKSUu7fxWTmQn6RNHuhzoVHwmotEs8 e/OuIBGYKo2FMlsHg/c7X+B7CBYpV7Lw1mXMN63O1n69eBRPhTGJxIWBZ4gy7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e3gw5Dza; 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: -9.25 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e3gw5Dza; 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: E1E572A2F3 X-Spam-Score: -9.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: cRLYE+ry2MxZ Hi, Marcin and Samuel, thanks for your comments, Marcin Borkowski writes: > You might want to extend it and create a minor mode which would display > data about the current character in the echo area, Eldoc-style, or in > a tooltip when you hover the mouse pointer over a character. Depending > on what exactly you need, these ideas might be more or less useful, of > course. I also have written a smaller function to display a quick information of a single character at point, something much simpler and not as verbose as describe-char. But it had never occurred to me to do something eldoc-like with it. In my case, although for those contexts I prefer quick information (describe-char also has its relaxing moment), I don't feel such an urgency :-). In any case, something quick and dirty, just as a proof of concept, could be this: (define-minor-mode char-info-at-point-mode "TODO" :init-value nil :lighter ("chinfo") (if char-info-at-point-mode (add-hook 'post-command-hook #'char-name-at-point nil t) (remove-hook 'post-command-hook #'char-name-at-point 'local))) (defun char-name-at-point () (interactive) (let* ((char-name (get-char-code-property (char-after (point)) 'name)) (code (format "#%x" (char-after (point)))) (dec (get-char-code-property (char-after (point)) 'decomposition)) (info (concat char-name " / " code " / descomp: " dec "\s" (mapconcat (lambda (cod) (format "#%x" cod)) dec "\s+\s")))) (message info))) Best regards, Juan Manuel