From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CNvgBDmN814JKQAA0tVLHw (envelope-from ) for ; Wed, 24 Jun 2020 17:28:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MP2QADmN8144OQAAbx9fmQ (envelope-from ) for ; Wed, 24 Jun 2020 17:28:25 +0000 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 454F3940145 for ; Wed, 24 Jun 2020 17:28:24 +0000 (UTC) Received: from localhost ([::1]:44510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo9CA-0004nl-62 for larch@yhetil.org; Wed, 24 Jun 2020 13:28:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo9Bm-0004nd-Fa for emacs-orgmode@gnu.org; Wed, 24 Jun 2020 13:27:58 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:42266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo9Bk-000157-IP for emacs-orgmode@gnu.org; Wed, 24 Jun 2020 13:27:58 -0400 Received: by mail-qt1-x841.google.com with SMTP id e12so2314602qtr.9 for ; Wed, 24 Jun 2020 10:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version:content-transfer-encoding; bh=idojObl/6Ps7Lv3h/Gl6/+1wLF47JFWIhbMhIoZOZSw=; b=VJ2uRHDTH1OpxuY5aIVVlUjWVeYLYJhBd+j1L4aOxHwuoaofKgx9r31LWlG0n6Z/+3 ACN2BqGyq1q9nNTobyOzB9TVGI0mfNv6nPMDxABYxv8BPBlDJPEjqq/WwZogDpZGUR6U +eUGr5ssgFjJeFkKalzq74DQEak99A+vQCGo4IQCHYXyhpCi8o1GMq0tWyPCQBpy+LTC QbS0I87Hn1gGZIX07VAcuPStyEb9wGi2Sgb+d9pPF5ErrZyjLEa6tqcLMXGz9VnvgGhw nIaBUZyluTrXk3cNc3Lxjo3AR4ATZwID08Fcbnn5kHku22QeRsqyAIX00xRO2y+bDJg8 qLUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=idojObl/6Ps7Lv3h/Gl6/+1wLF47JFWIhbMhIoZOZSw=; b=bq6zSVagbWVsqJ42j6Ow7syz906nJetCU77u+ui14oIjREBlUGun8ClyOC0lfmUAZE 1SLA5p8nME3lOhZlaRDYuTqOwAYKTxDSPwhpr+Ss4a7Pd/DkyqOd+7j6E1wzKOUy6m+I OCWkzF2QRnO8bC6HdqL2urd7M9V8AVd+Qxf23co4w3RRVx06qkeiJdNzrZPjyFFvCY/S rDrcxENvXf8CelZjNREYadGz5czfpPdFHkD8nLu4tcMKrXy24+mjFdcp2s+EtB6OL5XJ U3iMI0vTbpcyWiZS23piGlaliUaVQ2Q28o3zcadSAgfzZvCpWl0PDLtxLUyq4WfeiwMJ W9Cw== X-Gm-Message-State: AOAM532EjaCc+QQ5QxXl7Q587V6w3PDDZUijVsJxQw0Nwex1OM2tW5Uq JXuR5tVLzsfx7XhkSQSwAtqUup/wVR4= X-Google-Smtp-Source: ABdhPJzs+8G3EpL//H/MVb+jgn9t8WU1jK1frSPsKFswfR8EbaUeXesEIHLY5Gnj1zVTeg9Oiy2TNA== X-Received: by 2002:ac8:3438:: with SMTP id u53mr20806697qtb.102.1593019674881; Wed, 24 Jun 2020 10:27:54 -0700 (PDT) Received: from gusbrs-laptop ([193.37.252.174]) by smtp.gmail.com with ESMTPSA id j198sm3544931qke.71.2020.06.24.10.27.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jun 2020 10:27:54 -0700 (PDT) References: <877dvzwtdy.fsf@kyleam.com> <87d05rcpgh.fsf@gmail.com> <871rm6wson.fsf@kyleam.com> <87mu4svaj9.fsf@gmail.com> <87lfkctqkl.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.4.10; emacs 27.0.91 From: Gustavo Barros To: Nicolas Goaziou Subject: Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region In-reply-to: <87lfkctqkl.fsf@nicolasgoaziou.fr> Message-ID: <87a70sml0q.fsf@gmail.com> Date: Wed, 24 Jun 2020 14:27:49 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::841; envelope-from=gusbrs.2016@gmail.com; helo=mail-qt1-x841.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Shankar Rao Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=VJ2uRHDT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: rs7fPHXR/UHx Hi Nicolas, On Wed, 24 Jun 2020 at 12:46, Nicolas Goaziou =20 wrote: > Hello, > > Gustavo Barros writes: > >> You have a good point here. When I made the suggestion I was naively >> thinking the featured could be plugged/hooked somewhere in Org, when >> fontification is done. But that's not really true, as the feature >> requires being run every time the point moves too. So, as far as >> I can tell, it seems using post-command-hook is unavoidable, and if >> so, you are right in not wanting to add some load to it for everyone, >> regardless of whether they want this feature or not. You and Kyle >> have me convinced here. > > Sorry for being late to the party, but, IMO, this doesn't sound like > a right approach to the problem of invisible emphasis markers. A user > choosing to hide emphasis markers should not need to=E2=80=94or even be g= iven > the opportunity to=E2=80=94display them in order to edit them efficiently. > I do agree with what you said, as you have stated it: It'd be good if=20 the user of `org-hide-emphasis-markers' didn't need to display the=20 invisible character to edit them efficiently. And it is true that I=20 argued in favor of this proposed patch giving the related editing=20 inconveniences as a main point. But the feature is the equivalent of=20 `prettify-symbols-unprettify-at-point' for `org-hide-emphasis-markers'=20 and it does have an appeal in itself, for the visual cue it offers,=20 besides the editing improvement, which is a byproduct. I like=20 `org-hide-emphasis-markers', but if I was not "given the opportunity to=20 display them" or if I could not edit them directly even if invisible, as=20 a word processor does, I would probably not consider ever hiding them in=20 the first place. > I think we should upgrade `org-emphasize' command instead, so it=20 > handles > both marker visibility states in a DWIM, or in a word processor, > fashion. Indeed, since emphasis markers of a given type cannot be=20 > nested > in Org, the WIM part is usually easy to guess, according to the=20 > context, > i.e., the syntax at point, and the region. I have some draft lying > somewhere in that direction. > > WDYT? I think that it would be great independently of the proposed patch.=20 Indeed, that would be very useful including for users which set=20 `org-hide-emphasis-markers' to nil. On the other hand, even with a more=20 capable dwim `org-empasize', I'm pretty sure many users will still add=20 emphasis markers by directly typing them, even if occasionally, or they=20 will delete them inadvertently if invisible, in which case, the proposed=20 patch remains very useful for this reason too. If I may, `TeX-font' in AUCTeX would be my dream `org-emphasize'. Two=20 things it does that `org-emphasize' doesn't (as far as I know of): i)=20 when there is no region selected, and point is within a font macro, it=20 operates on the imediate enclosing font macro, not requiring region=20 selection, so that we can change the font macro by calling `TeX-font'=20 with a prefix, or remove the font macro with "C-c C-f C-d"; ii)=20 `LaTeX-font-list' is customizable, allowing for better key bindings;=20 it's easier to type "b" than "*", "s" than "+" etc., anyway, it gives=20 choice. Again, just an user here, just offering a data point. (And I was quoted=20 ;-). Best, Gustavo.