From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UG4IOCJSRmGQRwEAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 22:54:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4O29MiJSRmHWQgAAbx9fmQ (envelope-from ) for ; Sat, 18 Sep 2021 20:54:58 +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 12F3779AD for ; Sat, 18 Sep 2021 22:54:58 +0200 (CEST) Received: from localhost ([::1]:58084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRhMO-00008s-3B for larch@yhetil.org; Sat, 18 Sep 2021 16:54:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRhLo-00008W-63 for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 16:54:20 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:41616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRhLm-00028j-MA for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 16:54:19 -0400 Received: by mail-lf1-x12d.google.com with SMTP id t10so42221209lfd.8 for ; Sat, 18 Sep 2021 13:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CISGi4Hi0uHd8h6kAlA/6PvtCPShVq99KCvYIn8+3GM=; b=Tj7ZFSoNVWBu8obhR0RgtQ4aN6app3ZGo9JNCvEwrN8H+jgJ37ax3kke0D4vX1xT4R 3VAik3bUVZpHT5v2A5VOTJ35p2tPb0m9IucJ+aX6K0zaMI3qLINdfLubaKYFi1xg04GL Nz0m66MAc+mmkEOU8z1/zxpqBqRAe3OoEjMCERtEK9Ehjp5U/cdXhwKNWS1uDSQ1i2xw A31rCv1LTWdHgOkBXtV/3LO6Q4Mij96NvD7qTMQdhDIIKIOl4TUZwsdCFhK8tgmrdCuL fJ1OJUBYzAeTblQKqsd99xV57qhnXqdqESgyMBpiUrfPgNmT/e5j5gih0Vg3ymRMbNv7 noRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CISGi4Hi0uHd8h6kAlA/6PvtCPShVq99KCvYIn8+3GM=; b=IiCmiSuiOBFkD727Gy0AEucHD1Cb4Q+GD6pM3GsDRcLX8ClQp9vAQ7Yavg5+FdV9u5 z8wOq9OZpRZwD7eO532wZ8ds6JC37OmSQSKUIlSx61pYaZZeuQ+isa76tLkKgNXp/nw3 XLos7IhJ4Kz0J9U1pj/fT8Yk8IKm86UlZA9pVKQ3UuFzwF2nZxg3zQIDUrCz4O0bB7gM rkGQ9KLzMgOBVAwiSMFYaDLIF1wE6LA3w5pwFGXY8l/txVVt29OlK4jGMTMzG27phN9s k77hmBP++cPDzMcSxos4Ujt3de6mZI+MzhRCSqWgsb074Lxr+eL7GJ1Tibp+gjzO3ygD jKbg== X-Gm-Message-State: AOAM530etG2Fnu1npbIWdrIlMPilUN5aTfvQAIK5aZ6GDbJij1ZA1ic7 589aknrim14QpgsN8NfaKX/TpefzQrx1yIPoDisKJ0tk2EQqHg== X-Google-Smtp-Source: ABdhPJzDlshfSzgUJA2bxx2h+JCKGYmNdWwLc2cxuEAkMkYBHxxZl7bZIzzdFHBdTt9V4BFqf0UWRSjyo7EYlNBSbdE= X-Received: by 2002:ac2:57cb:: with SMTP id k11mr13028847lfo.70.1631998456460; Sat, 18 Sep 2021 13:54:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6504:4086:0:0:0:0 with HTTP; Sat, 18 Sep 2021 13:54:15 -0700 (PDT) In-Reply-To: References: From: Samuel Wales Date: Sat, 18 Sep 2021 13:54:15 -0700 Message-ID: Subject: Re: [PATCH] Improve org-mouse support for checkboxes To: Jim Porter Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=samologist@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631998498; 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=CISGi4Hi0uHd8h6kAlA/6PvtCPShVq99KCvYIn8+3GM=; b=P02hDWYlyvFnFwl8LbA8doPCqmi0nrQPE+fOSqRq+RkA3NVyY53+KTssxIcReAszhhKr6l QYRzVfOnAYKpsdQ9gE1i/C7GUndocZTr+UF1MstbNqDd1/H2rQessCIvuUL/duownpe4FR YxngrqL2JhLTXZ13MLfl3VcnEyFj4/YYnpygVF/ye7S/8sWdXYoN5F1+GBZhR2DxPBTh2c PIj5pTdjWK6gsYq+XXwLmEPnaf81/QsZeFqcnzC3MsWkunyN74/74fXKd2teK1lgt7SL1a rVI3yzwsMaLU56EPLW4pP2l3oHeIUNrZs51fQl9NHo3FdUVoSyn3j9x+KbOMHQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631998498; a=rsa-sha256; cv=none; b=YtSs4F8PghXr/ldTullyaPXDRR95AgzWN7TqT6ZhfLcK2YgQtpmTRRjmuVFDFW01TglZLw F6Nnh868gCCMd9njVYEdSPCNdEF5qsgJ88LWZ2wwCRa4LafCOa8t+8CfxAzdZVN8uIfpGh 5llN4zh65RuV3xF4/PPdqm/QTmaGy5nxeFCXd7eGsPgouLRFzXFDcmKlPVEoEU1E9zEQIr 4eASzcMV+GZOMv1t8GKr/KFEcEmVKOUJzmQylE9J7b1MHMeCyZktXW1sGNyPSrMAfHhCkV TM3RtdDIRM9QRF9rjlilkM2Bz8VI4PiroYziJc4u7pzUHZBucckNWk/ACNtH3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Tj7ZFSoN; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Spam-Score: -1.59 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Tj7ZFSoN; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: 12F3779AD X-Spam-Score: -1.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4e3xchxS8xYF thanks for this. if tests are written, might be useful to include the case where half-checked are parents. On 9/18/21, Jim Porter wrote: > While trying out `org-mouse', I noticed two semi-related issues with > checkboxes. First, intermediate-state checkboxes (like [-]) aren't > clickable. Second, if the checkboxes are inside a block and the theme > gives the block a background color, the block's background is removed > behind the checkbox. To see both of these in action: > > $ cat file.org > * Regular > - [X] Checked. > - [-] Half-checked. > - [ ] Not checked. > * In block > #+begin_src org > - [X] Checked. > - [-] Half-checked. > - [ ] Not checked. > #+end_src > > $ emacs -Q --eval '(progn (setq org-modules '"'"'(org-mouse)) > (custom-set-faces '"'"'(org-block ((t :background "green")))))' file.org > > The attached patch fixes both of these issues. For the first problem, > maybe it would be useful to put the regexp for checkboxes in a variable > somewhere so it doesn't get out of sync. I wasn't sure though, so I went > with the simpler solution for now. > > My FSF copyright assignment should be on file, but let me know if there > are any issues there. > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html