From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CMuHNkh1EGPJkgAAbAwnHQ (envelope-from ) for ; Thu, 01 Sep 2022 11:03:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eOebNkh1EGP8GAEA9RJhRA (envelope-from ) for ; Thu, 01 Sep 2022 11:03:04 +0200 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 4BDA32F135 for ; Thu, 1 Sep 2022 11:03:04 +0200 (CEST) Received: from localhost ([::1]:38462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTg6J-0001gg-5L for larch@yhetil.org; Thu, 01 Sep 2022 05:03:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTfOB-0003nY-Hr for emacs-orgmode@gnu.org; Thu, 01 Sep 2022 04:17:29 -0400 Received: from cpu0.net ([5.39.76.37]:33594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTfO8-0007YG-L0 for emacs-orgmode@gnu.org; Thu, 01 Sep 2022 04:17:26 -0400 Received: from smtpclient.apple (unknown [86.56.77.179]) by ks-mail.localnet (Postfix) with ESMTPSA id 0C3C980132 for ; Thu, 1 Sep 2022 10:17:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq0.org; s=201509; t=1662020234; bh=g3IC3lQJUYMppj3Y+oO22yMyZDtpWuh8HOUjAIfuVZs=; h=From:Subject:Date:To:From; b=cLOi82tzrCudNbMAU4we4EVGJRTTREzVkpVycoEAosMgHb8jphkOXHCpESuHCMYjQ wmdjy13Q0CwvDz5gDiPhhv6zcivBpGDcN21Kv73nAR1K1asg1n0UlQJ7TBAnuLxR2f azrcbhSI7H97h5v0ViU0GsgwSqC6OFmCT/g/ESkI= From: Marcel Lauhoff Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Unicode TODO keyword issues in agenda search leading to org-scan-tags regex Message-Id: Date: Thu, 1 Sep 2022 10:17:13 +0200 To: emacs-orgmode@gnu.org X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=5.39.76.37; envelope-from=ml@irq0.org; helo=cpu0.net 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662022984; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=g3IC3lQJUYMppj3Y+oO22yMyZDtpWuh8HOUjAIfuVZs=; b=axs95deBfKqJvsXHjUrF9Zg9Bod2XLucBZyG4WiryEkai1xBeGD4IbNhcFQjppew9Og9pU nkai9Q9OM8D7xBgTK2QW1rSUvggj7oUR6ixLAhJV7x6W4aT1bkDyfw5KddnQkjHb0nyACC 4U63KABa2KHRkn1wBe736yM2MUEwoYDgMKRXzTjHKvfDU3kQQ3ZVQTKRrOGWX7Ay6P89dy oqPgtSjLMhwgfnXVSES6XlGl+WSVoB3/QqhwX4pvuJI3QEaB50PahhUWEigbe2lPlOugxQ krRLezA0bfTkVsaFb5G+d+IzH5peFxV0PxkCnDo303B1oNAtyzFI9uu79G4rSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662022984; a=rsa-sha256; cv=none; b=hKA6Z/eGlJXlmeeURKzH0xxU8bTIkpL5jIlD9qxK309LfKlHX7IdlT5FZcRdu+T1pS2ZMH 3rwCCf3X4zdjbpsgH+v2Em/PXfodCRFBV2QNns10Qz2V0QtHQUKLG4H9cIGopKyuLBYaxA Ge3mPHCIjH+1QgF+vSYmteF8L25zIjl+tSyQ39zHH0FbovzymJpncas/M59PUzqxtG9GZk nkq4mOISXsZoTJR6LvKYpL2XVNlauNZlJKH60ZecEHjGW/SWaGQbiyLNXyetRqCiWMVnfC YhVUGOQJPM0UQPitWSDj2TSMKbQaGKjROg8umukZhs3L4mjWwEarYRm55gsI6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=irq0.org header.s=201509 header.b=cLOi82tz; dmarc=pass (policy=none) header.from=irq0.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.78 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=irq0.org header.s=201509 header.b=cLOi82tz; dmarc=pass (policy=none) header.from=irq0.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4BDA32F135 X-Spam-Score: -4.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: HPnGXyHaW3tG Hello! I use unicode characters as TODO keywords and noticed that the "M" agenda view doesn't find all my TODO entries. My TODO keywords: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 org-todo-keywords '((sequence "=E2=89=A3(p)" "|" "=E2=88=8E(f)")= =E2=94=82 (sequence "=E2=97=87(t)" "=E2=98=85" = "=E2=8C=9B(w)" "=F0=9F=94=A5(.)" "=E2=9A=99(s)" "=E2=8E=87(r)" "=E2=8F=B5(= e)" "|" "=E2=9C=94(d)" "=E2=9C=98(c)") =E2=94=82 (sequence "=E2=9B=B1(m)" "|")) =E2=94=82=20 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Digging a bit I found that the `re' regex at be beginning of `org-scan-tags' is responsible: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (re (concat "^" =E2=94=82 (if start-level =E2=94=82 ;; Get the correct level to match =E2=94=82 (concat "\\*\\{" (number-to-string = start-level) "\\} ") =E2=94=82 org-outline-regexp) =E2=94=82 " *\\(" (regexp-opt org-todo-keywords-1 = 'words) "\\)?" =E2=94=82 " *\\(.*?\\)\\([ \t]:\\(?:" org-tag-re = ":\\)+\\)?[ \t]*$")) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 The `(regexp-opt org-todo-keywords-1 'words)' excludes most of my TODO keywords (but not all). Changing `'words' to `'symbols' give me my desired result. Short reproducer for some TODO keywords: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (let* ((todo-keywords '("TODO" "DONE" "PROJECT" "=E2=89=A3" = "=E2=88=8E" "=E2=97=87" "=E2=98=85" "=E2=8C=9B" "=F0=9F=94=A5" "=E2=9A=99"= "=E2=8E=87" "=E2=8F=B5" "=E2=9C=94" "=E2=9C=98")) =E2=94=82 (re-words (regexp-opt todo-keywords 'words)) =E2=94=82 (re-symbols (regexp-opt todo-keywords 'symbols))) =E2=94=82 (list =E2=94=82 (-map (lambda (kw) (when (string-match-p re-words kw) kw)) = todo-keywords) =E2=94=82 (-map (lambda (kw) (when (string-match-p re-symbols kw) = kw)) todo-keywords))) =E2=94=82 (("TODO" "DONE" "PROJECT" nil nil nil nil nil "=F0=9F=94=A5" = "=E2=9A=99" nil nil "=E2=9C=94" "=E2=9C=98") =E2=94=82 ("TODO" "DONE" "PROJECT" "=E2=89=A3" "=E2=88=8E" "=E2=97=87" = "=E2=98=85" "=E2=8C=9B" "=F0=9F=94=A5" "=E2=9A=99" "=E2=8E=87" "=E2=8F=B5"= "=E2=9C=94" "=E2=9C=98")) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I have no idea why "=E2=9A=99" is a word and "=E2=8C=9B" isn't, but = would you accept a patch that changes `'words' to `'symbols'? Or is there another way around my problem? ~marcel