From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eNMRFm6V8F4wKAAA0tVLHw (envelope-from ) for ; Mon, 22 Jun 2020 11:26:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +KnnEW6V8F5OCgAA1q6Kng (envelope-from ) for ; Mon, 22 Jun 2020 11:26:38 +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 A1357940AFA for ; Mon, 22 Jun 2020 11:26:37 +0000 (UTC) Received: from localhost ([::1]:38164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnKaw-0007Mb-Gt for larch@yhetil.org; Mon, 22 Jun 2020 07:26:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnKZx-0007L9-Vh for emacs-orgmode@gnu.org; Mon, 22 Jun 2020 07:25:33 -0400 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]:39611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnKZv-0007yT-MI for emacs-orgmode@gnu.org; Mon, 22 Jun 2020 07:25:33 -0400 Received: by mail-qk1-x742.google.com with SMTP id l6so11415962qkc.6 for ; Mon, 22 Jun 2020 04:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wa2egygrgNyY/+8eaQCz3juCIDi9Lq2d5P0liygn0bM=; b=SwftBm1D+Man2HDuLyBxEoApIw5HjiXq2lUAFWTMWDgEAj8GRqrlYfPUUQYmChCTuV /ZFRL8LA8f9GDv8soTTdMlFWEchStQSA/sqR/QtT3y701UUytb5ictLL+dexwm11BnEv dwnoKbYLhLJokU3tKoZiyGCTpBJo9eRTrf857yVLfyCi5LGPKv9MrsEdColWvZwqPrjx rw5eW98/2w5VYQgz9+xAkMQ13xcE3bSBTm9zM0/N883d4MzHBif9w2+/UWNR0EHN9FFn 23Uq42A1H35k3vBvZZhLEeslk1Xot7wHdWSpIo016dqEiJ22uowzORpUnCfa92983bMJ LbLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=wa2egygrgNyY/+8eaQCz3juCIDi9Lq2d5P0liygn0bM=; b=IQfWZ5+jGLcbiLaw3MDRv73WmrA7kjJs/jAecpap+cuJ1X37uV4zx4GJzvtL0t/PUu NLkj1/DHj2rKYFAjjh3Jiie83+55LZzTrG1d6G9VSlvIzBGiLB3PmGbVVbSPaEsvU4Oo pDUSrbItq7lFFNzeME/98FjMaxQs3OlvFO/YnznEmoNAgKJieNY8PK2sVYFs5/dck547 RhixklbjzsxuBE8st5Hjp+2TAKGxFUQHTAJJHIFPNxtTeukYjGpgUu2x0ES/iec0aJxp QboBu3xor677CijLqGERoLS7HwK/sLGIZ7V9WSGjQy7qzaRuJxXmS+++FjW7U3NB6qeQ vcnQ== X-Gm-Message-State: AOAM533Gmw06wvCjojQ/pa+nZc9vzsfLEbFnU45+/4WJeYtSXAp1KK3H msXw+HKAqm2KxjJlm1YlcZwRHPN0CjQ= X-Google-Smtp-Source: ABdhPJySSNdiO0tWtzQAlbCt+tGP6aTApSlyfso1rwziefVpWMSUqFlYLYRFb6VlGEstWbfZGnlsfg== X-Received: by 2002:a05:620a:753:: with SMTP id i19mr15463316qki.357.1592825129424; Mon, 22 Jun 2020 04:25:29 -0700 (PDT) Received: from gusbrs-laptop ([196.52.2.97]) by smtp.gmail.com with ESMTPSA id 71sm13232064qkg.21.2020.06.22.04.25.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jun 2020 04:25:28 -0700 (PDT) From: Gustavo Barros To: Kyle Meyer Subject: Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region References: <877dvzwtdy.fsf@kyleam.com> Date: Mon, 22 Jun 2020 08:25:18 -0300 In-Reply-To: <877dvzwtdy.fsf@kyleam.com> (Kyle Meyer's message of "Mon, 22 Jun 2020 05:40:09 +0000") Message-ID: <87d05rcpgh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::742; envelope-from=gusbrs.2016@gmail.com; helo=mail-qk1-x742.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, URIBL_BLOCKED=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=SwftBm1D; 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: J2yOLeIC4dyv Hi Kyle, Hi Shankar, On Mon, 22 Jun 2020 at 05:40, Kyle Meyer wrote: > Shankar Rao writes: > >> This patch adds a minor mode that makes emphasis markers be automatically >> unhidden when the point is inside the region of emphasis and then the >> markers are rehidden when the point is moved elsewhere. I posted this on >> /r/orgmode on reddit ( >> https://www.reddit.com/r/orgmode/comments/gss1g4/update_i_made_my_own_sbrorgemphasizemode_that/), >> and people there suggested that I submit this here as a patch. > > I don't prefer my emphasis markers hidden (i.e. I leave > org-hide-emphasis-markers at nil), so perhaps I'm not the best to judge, > but that does sound like a nice feature. > > I'm hoping others will try this out and give their thoughts. Just an user here, but I'd like to leave my +1 to this proposed feature. I did use org-hide-emphasis-markers in the past and I liked it, but eventually dropped it because of the inconveniences of editing at the border of an emphasized region. This proposed feature eliminates the "which side of the invisible character are we?" ambiguity, so I repute it very nice indeed. I would certainly appreciate the inclusion of such a feature and, since I've been around, I've seen folks demanding something of the sort (memory here, no hard data). Indeed, I was one of the people at Reddit who suggested Shankar submitted this to the list. I did (lightly) test the code as posted on Reddit, and liked what I saw. I tried a number of cases I could think of: multiple lines, nested emphasis markers etc. As far as I tried, it did work as advertised. I also did report a corner case I found: > The only edge case I found, which in no way mars the absolute coolness > of this, is when you are actually inserting the emphasis marker. For > example, if you type *word*. Right after you type the last "*" the > emphasis will be hidden, even though the point position would have it to > be shown. Same thing if you select word and "C-c C-x C-f *". You have to > actually move point, for the mode to work in this situation. Shankar replied me this behavior is the same in prettify-symbols-mode, on which the code is based. I do not use prettify-symbols-mode myself, but did play with it a little because of this, and could not infer a regularity, so I must trust Shankar's point here. And it is indeed just a corner situation, which has no further implication I can conceive, and which does not diminish the usefulness of the feature. I can add another thought on the matter. While prettify-symbols is a mode, org-hide-emphasis-markers is an option/variable. So I wonder if the feature would fit better the current state of things in Org as either another option/defcustom or by simply expanding the range of possible values for org-hide-emphasis-markers (e.g. t, nil, not-at-point, not-at-point-right-edge). But this is just a thought, I'd be happy to see this feature be included either way. So, thanks Shankar for proposing the patch, and thanks Kyle for reviewing it. HTH. Best, Gustavo.