From mboxrd@z Thu Jan 1 00:00:00 1970 From: a@xkqr.org (Chris) Subject: Suggestion: Add zero-width nbsp to emphasis-regexp-components Date: Wed, 06 Jun 2018 09:54:37 +0200 Message-ID: <87h8mgmjsy.fsf@surprise.skruttet> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQTHK-0001Ov-HY for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 03:54:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQTHH-0002mL-Ee for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 03:54:46 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:40473) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fQTHH-0002kb-7g for emacs-orgmode@gnu.org; Wed, 06 Jun 2018 03:54:43 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id C66641403 for ; Wed, 6 Jun 2018 03:54:40 -0400 (EDT) Received: from localhost (vps.xkqr.org [109.74.206.55]) by mail.messagingengine.com (Postfix) with ESMTPA id CEF28E41E6 for ; Wed, 6 Jun 2018 03:54:39 -0400 (EDT) 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! I'm not an experienced mailing list user, but I will try to be brief. Please excuse my lack of common courtesy. * Problem There needs to be a way to coax Org into interpreting something as an emphasis marker, even if it ordinarily would not look like it (for example, because it is in the middle of a regular word, when putting emphasis on only part of a word.) - Version of Org: 9.1.6 - Version of Emacs: GNU Emacs 25.3.2 (x86_64-pc-linux-gnu) * Suggested Solution Include the Unicode zero width no-break space character (U+feff) in both ~pre~ and ~post~ sections of ~org-emphasis-regexp-components~. I currently have trouble accessing code.orgmode.org (502 Bad Gateway), but I imagine the solution to look something like --- org.el 2018-06-06 09:33:56.602335268 +0200 +++ org-zwnbsp-emphasis.el 2018-06-06 09:39:37.985958647 +0200 @@ -4355,7 +4355,7 @@ ;; set this option proved cumbersome. See this message/thread: ;; http://article.gmane.org/gmane.emacs.orgmode/68681 (defvar org-emphasis-regexp-components - '("- \t('\"{" "- \t.,:!?;'\")}\\[" " \t\r\n" "." 1) + '("- \ufeff\t('\"{" "- \ufeff\t.,:!?;'\")}\\[" " \t\r\n" "." 1) "Components used to build the regular expression for emphasis. This is a list with five entries. Terminology: In an emphasis stri= ng like \" *strong word* \", we call the initial space PREMATCH, the fi= nal This has the added tiny benefit that legacy documents that still use U+feff as a byte order mark may be able to get emphasis also on their first word... (Not sure if this is a problem, actually, just throwing it out there.) * Discussion - Does this even make sense to begin with, or is it just me? - Is the zero-width no-break space the most sensible character to do this with? I see the zero-width joiner as the alternative =E2=80=93 but that appea= rs to have more legitimate uses inside words, especially in some non-Western scripts such as Arabic and Indic. I use U+feff mostly because it is actually sort of a space but not quite. * Related Reports I found an email in the archives which touches on the same point[1], but suggests a more radical change. [1]: https://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00363.ht= ml Regards, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSnhhl1PrVuOSPiCuJ63EO1dkwMBQUCWxeTPQAKCRB63EO1dkwM BXQEAP9xIt+cgatcD62ny5RvI1QmXqKjkKKYHI3ClHWj0tEFIQD/dNtN0vrJ8dOv CHKVXXsoj3usk24nehphrMZ4vaCabw4= =NsUP -----END PGP SIGNATURE----- --=-=-=--