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 ms0.migadu.com with LMTPS id SDnfDWhARmGeLAEAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 21:39:20 +0200 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 MEA7CWhARmFpNgAAB5/wlQ (envelope-from ) for ; Sat, 18 Sep 2021 19:39:20 +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 74FE7BAF5 for ; Sat, 18 Sep 2021 21:39:19 +0200 (CEST) Received: from localhost ([::1]:34526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRgBC-0005Wl-Ej for larch@yhetil.org; Sat, 18 Sep 2021 15:39:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRgAZ-0005Wb-Em for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 15:38:39 -0400 Received: from ciao.gmane.io ([116.202.254.214]:40080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRgAX-00022u-V7 for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 15:38:39 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mRgAV-0005FX-1C for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 21:38:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Jim Porter Subject: [PATCH] Improve org-mouse support for checkboxes Date: Sat, 18 Sep 2021 12:38:29 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5BF2C915E4C4932401E63790" X-Mozilla-News-Host: news://news.gmane.org:119 Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1631993959; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=3W5p7+XNDsMny6d962Xc+983KSJdC7/CP6y9vnb+xKI=; b=QPnSZnLgpR9kI1DzrMIf7n+wfDZL9opYYTHkrxZJ5v+Ypy2GrpmVmJWaweVZh5DUQ4aTZ+ b7i/O83Wmb/NsRi5cZegpgOMHVOV9k6jGGk745XmDoiN7FEO1v25bJ/oW4KFICRXYRwox6 COrTmb822l8P1glBlfhXX2Ot6+bzaiaFzIa2C+cIHKINPRZrC8edSFOFkAI0CPQ6vJMql7 HaBPiOVtqT2x+15c96l0jo10ab8UU26m/eG14vnJW2DJ0mFyIAZjgqdJjFwcbMaduC9aKJ XN2VH+1RcqlvCgHe4R7Kuaqhwt5hjrCfG1Ta668c5g72MlVbp+ky0ezrcqwwJg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631993959; a=rsa-sha256; cv=none; b=JBdvCMr8JgHAJLzkj5CREUlu6d6RsoPpBxo0Ppd2281CoTb1aalM/f9OnSl4n0rjq2o5I+ Hlk9Qd/ID71JSnJDmQfGz+1E1rWEWk8J2dKu1/6VqHxPU6IGCxqi/HtKO5VlP29YCAixxR Q+ZXOQ8oi+chdL6oDP+kSTLhNtsAlSgJqLbsYzePPnaQEZ4SB6V7bE+ELfo357vAlcgXKw e3NbGCVpfhvodq5Q58jdE3yss9d3uH9RHeFo1HOBOdvIUQFGIy6PuKVc1mvyuOyGbpcZ8O g+E614hZPuK9ip1VmyqA5tEj1OE1BuQt3kU8KpJH8BfvdMWEPwgZLiVFLZuOGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: 1.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" 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-Migadu-Queue-Id: 74FE7BAF5 X-Spam-Score: 1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: qxoiTIzBYLe9 This is a multi-part message in MIME format. --------------5BF2C915E4C4932401E63790 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------5BF2C915E4C4932401E63790 Content-Type: text/plain; charset=UTF-8; name="0001-org-mouse-Support-intermediate-state-checkboxes.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-org-mouse-Support-intermediate-state-checkboxes.patch" RnJvbSBiMmJkNTExNWE4OWI5YjI2MTA3YWNhNGI1OWU1MTZkYzdkNjRmMGNjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxpdHNqaW1wb3J0ZXJAZ21haWwu Y29tPgpEYXRlOiBTYXQsIDE4IFNlcCAyMDIxIDEyOjIyOjQxIC0wNzAwClN1YmplY3Q6IFtQ QVRDSF0gb3JnLW1vdXNlOiBTdXBwb3J0IGludGVybWVkaWF0ZS1zdGF0ZSBjaGVja2JveGVz CgoqIGxpc3Avb3JnLW1vdXNlLmVsIChvcmctbW9kZS1ob29rKTogVXNlIHJlZ2V4cCBmcm9t CmBvcmctc2V0LWZvbnQtbG9jay1kZWZhdWx0cycgYW5kIHNldCBmb250LWxvY2sga2V5d29y ZHMgbW9yZSByb2J1c3RseS4KLS0tCiBsaXNwL29yZy1tb3VzZS5lbCB8IDQgKystLQogMSBm aWxlIGNoYW5nZWQsIDIgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1n aXQgYS9saXNwL29yZy1tb3VzZS5lbCBiL2xpc3Avb3JnLW1vdXNlLmVsCmluZGV4IDQ0NzFk OGU4ZC4uZWFlNmNkOThmIDEwMDY0NAotLS0gYS9saXNwL29yZy1tb3VzZS5lbAorKysgYi9s aXNwL29yZy1tb3VzZS5lbApAQCAtODkwLDggKzg5MCw4IEBAIFRoaXMgbWVhbnMsIGJldHdl ZW4gdGhlIGJlZ2lubmluZyBvZiBsaW5lIGFuZCB0aGUgcG9pbnQuIgogICAgICAgICAgICAg KHdoZW4gKG1lbXEgJ2FjdGl2YXRlLWNoZWNrYm94ZXMgb3JnLW1vdXNlLWZlYXR1cmVzKQog ICAgICAgICAgICAgICAoZm9udC1sb2NrLWFkZC1rZXl3b3JkcwogICAgICAgICAgICAgICAg bmlsCi0gICAgICAgICAgICAgICBgKCgiXlsgXHRdKlxcKFstKypdXFx8WzAtOV0rWy4pXVxc KSArXFwoXFxbWyBYXVxcXVxcKSIKLSAgICAgICAgICAgICAgICAgICgyIGAoZmFjZSBvcmct Y2hlY2tib3gga2V5bWFwICxvcmctbW91c2UtbWFwIG1vdXNlLWZhY2UgaGlnaGxpZ2h0KSB0 KSkpCisgICAgICAgICAgICAgICBgKCgiXlsgXHRdKlxcKD86Wy0rKl1cXHxbMC05XStbLild XFwpWyBcdF0rXFwoPzpcXFtAXFwoPzpzdGFydDpcXCk/WzAtOV0rXFxdWyBcdF0qXFwpP1xc KFxcW1stIFhdXFxdXFwpIgorICAgICAgICAgICAgICAgICAgKDEgYChmYWNlIG5pbCBrZXlt YXAgLG9yZy1tb3VzZS1tYXAgbW91c2UtZmFjZSBoaWdobGlnaHQpIHByZXBlbmQpKSkKICAg ICAgICAgICAgICAgIHQpKQogCiAgICAgICAgICAgICAoZGVmYWR2aWNlIG9yZy1vcGVuLWF0 LXBvaW50IChhcm91bmQgb3JnLW1vdXNlLW9wZW4tYXQtcG9pbnQgYWN0aXZhdGUpCi0tIAoy LjI1LjEKCg== --------------5BF2C915E4C4932401E63790--