From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aMtQHDld816fUgAA0tVLHw (envelope-from ) for ; Wed, 24 Jun 2020 14:03:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QBAuGDld816NDQAAB5/wlQ (envelope-from ) for ; Wed, 24 Jun 2020 14:03:37 +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 9E66B940703 for ; Wed, 24 Jun 2020 14:03:36 +0000 (UTC) Received: from localhost ([::1]:54908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo5zy-0003Rr-1Z for larch@yhetil.org; Wed, 24 Jun 2020 10:03:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo5mV-0000lh-41 for emacs-orgmode@gnu.org; Wed, 24 Jun 2020 09:49:39 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:39234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo5mT-0003kQ-DW for emacs-orgmode@gnu.org; Wed, 24 Jun 2020 09:49:38 -0400 Received: by mail-qt1-x841.google.com with SMTP id o38so1687120qtf.6 for ; Wed, 24 Jun 2020 06:49:36 -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; bh=6kgLrSZmgOok4NzaaZxiSrbsXyLvTE4KPFTsTyal6Ig=; b=JH6X3blsblWIuZ73ggxsNmhrE27nFVQ9p+IkZHHkV70g/NGCj7jkHxBTeYVp5G/xdM B0TkvAcSjthD5NrVhJRGOQeefveh9fp/wonqdQK9qxbzB0VqwRhmst66CCEIemglv7vl 2KomVM5+2l81uhXB08c3/T+jNNL/2Cut7zWfpPxhQksooEuKiAcEQuili6dHfTDJU24S uqc2PLKQ0xZoNx9yucUoBKWNlzJz8/SqZJAq5lcS22jZIjWxugyhyJrEitur6QFtgbcu tcsqcF8x556diM8bTf7deGcAHgZfTgzQIwl65vwPlZSH/S9KEXe1akO29ak3KcJZAXRg Qj9w== 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; bh=6kgLrSZmgOok4NzaaZxiSrbsXyLvTE4KPFTsTyal6Ig=; b=cYR3yZjSvQ6TlS702DLC8SYfD9ilAST1AOutPSyvaXwM0t2ZKBSy+mwvveE+Oqmgua rnKFxYO+XSdGgMTHZCOTA4uPhsNSLL7hsKKVzfgz1BeIHLlivh/V+Cs/DnJA2BkCFvS0 qgn4QztKkZAObzhQgc4k+RoSwgUzmRo9RzdHHqYTB1N8O7yqoyuMBQghuXY5iUmn4w7Q ty7Qmf3mwNfCnN4v5hnhhYM9zd95b0K+Voa+QVuYcyeLnS3vs0wgSEvTjTvzgDe4e5L2 asr8HuNROcArWCvpsOQ111MmxfTCfMIjootxjvhaUnBRFCyu5vP/xQIESwI1RCGm9lNP P21Q== X-Gm-Message-State: AOAM530FEZpKEyul3M6iezNprnWpmoyCeBPWj+ZCatEGHNaQpVN6rfdW 4qHrc3w4lq9OIa71yxpMdwS19GJKz+k= X-Google-Smtp-Source: ABdhPJxYheBTKhg2pv/OtvpDLn8H6bTN4AbVJrEY3tmhXinUNyKrMZUoZCUY0s9lORLlb1hAo4GwZQ== X-Received: by 2002:ac8:35d8:: with SMTP id l24mr20275762qtb.300.1593006575415; Wed, 24 Jun 2020 06:49:35 -0700 (PDT) Received: from gusbrs-laptop ([193.37.252.174]) by smtp.gmail.com with ESMTPSA id c7sm3170189qta.95.2020.06.24.06.49.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jun 2020 06:49:34 -0700 (PDT) References: <877dvzwtdy.fsf@kyleam.com> <87d05rcpgh.fsf@gmail.com> <871rm6wson.fsf@kyleam.com> User-agent: mu4e 1.4.10; emacs 27.0.91 From: Gustavo Barros To: Shankar Rao Subject: Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region In-reply-to: Message-ID: <87mu4svaj9.fsf@gmail.com> Date: Wed, 24 Jun 2020 10:49:30 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed 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 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=JH6X3bls; 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: ezJ8zRnHKneP Hi Shankar, Detailed comments are up for Kyle, or someone more qualified than myself, but I leave one further comment regarding the suggestion I had made. On Wed, 24 Jun 2020 at 09:53, Shankar Rao wrote: > I agree that adding this functionality as additional options to > org-hide-emphasis-markers would be more intuitive and elegant for > users, as > they wouldn't have to perform (add-hook 'org-mode > #'org-auto-emphasis-mode) in order to enable this mode. I didn't > implement > it this way first because I wanted to make the simplest, least > disruptive > way possible, and secondly because I didn't quite know how to > implement it > :-). As you can see in the patch, besides the additional functions and > variables, my code only modifies one preexisting org function, > replacing > four lines with my new eight lines. > > To implement this functionality in the way Gustavo suggests, we would > have > to for all users add org-auto-emphasis--post-command-hook to > post-command-hook, and modify it so that it only operates when > org-hide-emphasis-markers is 'not-at-point or > 'not-at-point-right-edge. I > can try to implement this if you think it would be a good idea, but I > have > one concern. Even if a user is not interested in > org-auto-emphasis-mode, > this implementation would add a small amount of code to > post-command-hook, > so would have the effect of slightly slowing down their system. 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. And thanks again! Best, Gustavo.