From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KMjxMQQBA2WJOQAAauVa8A:P1 (envelope-from ) for ; Thu, 14 Sep 2023 14:48:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KMjxMQQBA2WJOQAAauVa8A (envelope-from ) for ; Thu, 14 Sep 2023 14:48:04 +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 BB8A14D48A for ; Thu, 14 Sep 2023 14:48:03 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="j0I/QAv4"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694695684; 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=Xxb4kNWWcKPee4oDqaHjMYPQ5WW4OqXgEDPCuBaeL1U=; b=kxYvT0JqhO4sVOEeCvbFItVoBFOXm/QbBr4ILiPEi7YHlEvGhE8JX1L0HzL7XIJbzfXHD2 qcECe/HrXLo+pgIUYVSkB3Nh4sQXbcQyytrpl992flvIt33ya+l710ftsOHBE4EeHY/Svd yGIccSoXrRyiQ6seE5dkPAWykgq1yqi+pt8IHFgTRja1ccwPT8QhZDz7IAPSA2KZsiKsh0 W6ICmDmfcnjZU0oXIOJuwJyYgG7mR8F2uGQ3CQ8wQ2+POSFdd3rhdkD6P+dgHEaourVrXF A8wMqOU1tAm0xt0ZdQhC1hlQ5RKfF8CiOJBA1PCeJAOKoyCOoX3aFyMJZrK1aw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="j0I/QAv4"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694695684; a=rsa-sha256; cv=none; b=biWfuhjV3GoJccFAnygIQIJ5oXCb9nSZUHAo51Eqq8PMm3XewzuGwJGaoO4Db08CTydA9K aRQMB6VJh4zs+6VH1bMddYrenO6lVvW9IQAqZECjoKU+CaA4d0KeXwFbayrVGC191mox0Q KQPU/MmUyR5xeOLnxsqe60HsUlrwWbvkGeePbd3mOVF4pQM68yKMUbAoDktIfM7hZRtj0H rl1ZsTbxIFsO+f+eLItRpg25HJfYRxtrKsj/F/iQNBSHDQLCxvUw+m8QppqsIlk2uXCRMD Eh0HB1zfmyZQmp1uWK0cQj1O7f5GJMSsCr3mdoq80rjgjQGnF030UkGg2TkLfg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qglkF-0001qL-AF; Thu, 14 Sep 2023 08:46:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qglkC-0001o6-PI for emacs-orgmode@gnu.org; Thu, 14 Sep 2023 08:46:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qglkA-0002GD-3G for emacs-orgmode@gnu.org; Thu, 14 Sep 2023 08:46:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3A6C0240027 for ; Thu, 14 Sep 2023 14:46:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1694695607; bh=Pp8Bj2j09vtLLmLs6EBgv/kE/wtQT5sJsKozFLv6lHE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=j0I/QAv4cyKBnkrNf9JvuZ+RvS2HZUs/nY4Ly1traIVBqEZNbg1FsdGXnRaWwNpwp VV2D8Nu1IsMeLV7RGO6SUL4DA9GGvh2zBvJUEB2baiow7kRE4N7bt1zm1lRb2ntxLl j1hCO9T3KRWC09Gmx5QUU1yi5HTM9saeayaT81/XjuRpNTqKjikuzXepZWg3/8n0iD Z7m39keduqn0hFoWVOKkhO6FGKtlI8s1vTzKD80BhiHcw4j+gUSUuVbQYJO/8hsiZt ES8OA+DMNW3pIqT809JzEYzQTDNfUv5VEq4ziIF7JhvGC7mV3WlcpBV/TGk4oo/FT1 figDV52UARJ+w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RmcX64JYKz9rxF; Thu, 14 Sep 2023 14:46:46 +0200 (CEST) From: Ihor Radchenko To: Tommy Phillips Cc: emacs-orgmode@gnu.org Subject: Re: Patch: hiding org emphasis markers In-Reply-To: References: Date: Thu, 14 Sep 2023 12:47:38 +0000 Message-ID: <87pm2kc45x.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.81 X-Spam-Score: -0.81 X-Migadu-Queue-Id: BB8A14D48A X-TUID: eeb7CstCby+F Tommy Phillips writes: > Here is a suggested small patch for how org hides emphasis markers. > It's my first patch so hopefully I'm submitting it correctly. The patch is ok. Thanks for submitting! > Subject: [PATCH] lisp/org.el: Only hide-emphasis-markers that are in > org-emphasis-alist > > * lisp/org.el (org-do-emphasis-faces): Add additional predicate to the > 'and' clause that determines whether emphasis markers are hidden. > > Problem: > Want to hide only the emphasis markers mentioned in org-emphasis-alist. > After removing "underline" from org-emphasis-alist, '_underline_' is not underlined (correct behaviour), but the '_'s are hidden (incorrect behaviour). Currently, `org-emphasis-alist' works independently from `org-hide-emphasis-markers'. Your patch will constitute a breaking change for users who removed entries from `org-emphasis-alist', but still expect the markers to be hidden. You may instead introduce a new allowed value for `org-hide-emphasis-markers' to hide markers for non-nil entries in `org-emphasis-alist'. Maybe even allow the value to be an explicit list of the markers to be hidden '("*" "_" ...). And do note that the effect of `org-emphasis-alist' is purely visual - Org still considers entries removed from the alist as markup. It is just the display in Org buffers that is changed. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at