From mboxrd@z Thu Jan 1 00:00:00 1970 From: drymer Subject: Using org-entities to escape symbols Date: Tue, 10 May 2016 19:26:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QEAmw8qDERtrNJJqm6JvaWFmhowijf9pm" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0DJj-00074X-Rt for emacs-orgmode@gnu.org; Tue, 10 May 2016 15:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0DJg-0001DN-UJ for emacs-orgmode@gnu.org; Tue, 10 May 2016 15:27:39 -0400 Received: from perdizione.investici.org ([2001:41d0:2:33d0::19]:51531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0DJg-0001CQ-F2 for emacs-orgmode@gnu.org; Tue, 10 May 2016 15:27:36 -0400 Received: from [94.23.50.208] (perdizione [94.23.50.208]) (Authenticated sender: drymer@autistici.org) by localhost (Postfix) with ESMTPSA id 6845412011E for ; Tue, 10 May 2016 19:27:32 +0000 (UTC) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QEAmw8qDERtrNJJqm6JvaWFmhowijf9pm Content-Type: multipart/mixed; boundary="pAqPA9m7lxAjdQjL1W5cHNMcc01onvfab" From: drymer To: emacs-orgmode@gnu.org Message-ID: Subject: Using org-entities to escape symbols --pAqPA9m7lxAjdQjL1W5cHNMcc01onvfab Content-Type: multipart/mixed; boundary="------------8781A61043171CE25BFFCAEC" This is a multi-part message in MIME format. --------------8781A61043171CE25BFFCAEC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, So I saw this thread (first link at the very bottom) which response was to use a couple of functions. So the thing is that I evaluated the functions, and supposedly it should something like \ast when executing C-u *, but it doesn't happen. Any idea on what I could be doing wrong? The functions are: (defun modi/org-entity-get-name (char) "Return the entity name for CHAR. For example, return \"ast\" for *." (let ((ll (append org-entities-user org-entities)) e name utf8) (catch 'break (while ll (setq e (pop ll)) (when (not (stringp e)) (setq utf8 (nth 6 e)) (when (string=3D char utf8) (setq name (car e)) (throw 'break name))))))) (defun modi/org-insert-org-entity-maybe (orig-fun &rest args) "When the universal prefix C-u is used before entering any character, insert the character's `org-entity' name if available." (let ((pressed-key (this-command-keys)) entity-name) (when (and (listp args) (eq 4 (car args))) (setq entity-name (modi/org-entity-get-name pressed-key)) (when entity-name (setq entity-name (concat "\\" entity-name "{}")) (insert entity-name) (message (concat "Inserted `org-entity' " (propertize entity-name 'face 'font-lock-function-name-face)= " for the symbol " (propertize pressed-key 'face 'font-lock-function-name-face)= ".")))) (when (null entity-name) (apply orig-fun args)))) (advice-add 'org-self-insert-command :around #'modi/org-insert-org-entity-maybe) https://emacs.stackexchange.com/questions/16688/how-can-i-escape-the-in-o= rg-mode-to-prevent-bold-fontification Regards --------------8781A61043171CE25BFFCAEC Content-Type: application/pgp-keys; name="0x5DDFDAAD.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0x5DDFDAAD.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFOHzMgBEACStcqgOGesZo7beR2XwR4+KFRG7QcpB6Wb1/x3JtWlDkXEYWxB 4axGr2Xo9hzqIJt0Q9c83nxPuQMMrG2FoxwLszNpJmR2lmknme9C/tSGFitR/pn5 c6yNWl+m8s5FiRw7xcUUmVCjQWksEVc8go3DOROdiYE78gRitgc+Zomg/bVSAYrc QU/q66GtyviFGPUEL696f20pGg4T2XKiQCZmJkMojjepPY4BBntOz/egyrW4XCSK x20KWy+oC2JpirhkUbW5mDxKeri9X+diGDTbz+wWKnczw9oq20PGyZHwrz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HR3l22+JtuFmQ5AvmCK 3Kcp25YZbQoGhvTbV9f0IO+vXCIPyzRwJ/jRI0RaCthBMtpOof0sCzgrmmfG4bX6 n22Q20ZkGxT40x57jyQdn6lJWHH/G1AH0JtpHc30PSbkuEsOyuDGCj8K/nYGOWHZ WM30hGkzif4RzNNKxQNnG0EUd5059SuC/aI0UlYY7R450zIOKvQIZxTMX+s2qpTw LmgeE1T27LQZoHsBf6rkGa1uMa6se03gWLbOAhH8/S8tktZ6pxu0CWfuv2H5RcNe 8F2zNEv9UQ=3D=3D =3DhL2w -----END PGP PUBLIC KEY BLOCK----- --------------8781A61043171CE25BFFCAEC-- --pAqPA9m7lxAjdQjL1W5cHNMcc01onvfab-- --QEAmw8qDERtrNJJqm6JvaWFmhowijf9pm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJXMjYhAAoJEKMH1k1d39qtXxAQAI3l25sdCXo3hhA65+XfK0Ou oJoOM63pTa+h7EpWirIfoWI1vXULNkVfyZ9h/hz5JQF7TlhMiEeddumxePuDb8kX gAJ+51MnWoLaOxhJy1T/+oFvPzsYqDX6DSwbx3dcsvlRE+KdiKJqqF1fj/yTZj2j QilGwzlzy1U026oTfghn0RdvPJfxob8hzJNhMXhNUK6qUc/dZIgtaISLjIB9fVEA 7nSbSjMbhuEhBLj2jXTv9RTqpHh1wRy0u+av3RaPxPBV1Hkk6OycbOQXgp/ndQ2D 605JtPbkOIlRVuLngDBP55S26pWevpJODj3TUQWM7/G9YEYsNx/0vHODYIlnKVEG QuIuC1icTYsg4sN5Tk2yUscC8qgqmKI3vDFs5XfOUGYol30EfsvKl9wZvK+SGFqr MgaGhTKaWKZA6YbJ9L7L0I9t75G9r1IcyskJG56uo91jwXDZhWRVjdOhdowzptgb CFkVaJyvK+YzMwavG75UmvNEW7LylYsn8ikpk6eLp/uOi3Q9GitHBKODWWhSssgx +bFMoaFJoWeeuY+x8rFkzziPQVwSUcuxfciBaSskPDFEC8sEYfZH7fr0W4YNlXO2 Y/jPIU+lpY+gi0axw/wCsiju0DAnCDQsdbss9gT5NauFxqAUAAhMm0CxWSpYlIW8 7JwuXC3ISNURjx2puTar =scql -----END PGP SIGNATURE----- --QEAmw8qDERtrNJJqm6JvaWFmhowijf9pm--