From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 998PCs+tJGAUGQAA0tVLHw (envelope-from ) for ; Thu, 11 Feb 2021 04:08:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YCdBBc+tJGAGMQAAbx9fmQ (envelope-from ) for ; Thu, 11 Feb 2021 04:08:47 +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 8BE649402BD for ; Thu, 11 Feb 2021 04:08:46 +0000 (UTC) Received: from localhost ([::1]:40036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lA3HX-0003WT-VF for larch@yhetil.org; Wed, 10 Feb 2021 23:08:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lA3Gt-0003WL-8z for emacs-orgmode@gnu.org; Wed, 10 Feb 2021 23:08:03 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lA3Gq-0001R2-VH for emacs-orgmode@gnu.org; Wed, 10 Feb 2021 23:08:03 -0500 Received: by mail-pf1-x42f.google.com with SMTP id k13so2862205pfh.13 for ; Wed, 10 Feb 2021 20:07:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=hZyZd6Au2nHSNK6L0kZgEYz3f3YMjaAYs2rQh7REhNU=; b=QAfwGrVvJvfwBmU2jF7Fu89FfyLLFoN5Zjsb0+helg8dPHuoAgwz77TdnM2n3TU8qe k+HOD9apNDYAt84DyVW3S075tafx6/oukToT4rcopLSMrQZLNelk1m3N47QcDU21w6Si uXtSpuMOGiLK4t+mMzy6kW54WN1AC8yptMFBi661ZoKebhv8DDA50eEqPss3Zvcz5jYC eXfF/buWa0M9JktP8Ch7Dw+RYsZpNKbv4Wsohb/rYCSE86GAgJuvueEwJhSr670qad8b mcDCQe7f2uT5aX7aKGiqfpgs1s66TRSbk7hbq6/3AM7P0Ouvbx7Y1r2xU2wGF/DzaafH 81Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=hZyZd6Au2nHSNK6L0kZgEYz3f3YMjaAYs2rQh7REhNU=; b=Sc5nroSuufAAhjRtmbQp0aJquullTCYvrdsmf7JSUCD2V2IPqSbUV1rPn1ZrCAoeJK Yv3UMVvwuErwNviIj6ynUoGf/tCeIufUwdv/C86XXt25k+vt+HfId1nTcwHd+u2BfSEy ljzykdrF1QZVionFjbDTmawoBj6LZGinvEwkbFXCLGuutJS4fKMKuPhUaCjh4Xv9fOr8 /K5CwPULsv/BusIRnxoEeJenu0CgpBhiFE3STthLL5XXU0G9PaUEQTCaB+6qf33m4Vu/ kGr523RgyoQXLBwXV6DBcj/z0p7pxWA3b+/8AD3DRvBlR1+SiYypdnhnf5olzpUZ5+SR TnTQ== X-Gm-Message-State: AOAM533l1VuKyRxUfHlo7TTmcXoFLu9hYQxzWDkH+9ivUco6CrMeS+zM TZmCZilN8t78Z2RJY/Bx6dT/6kj99/0= X-Google-Smtp-Source: ABdhPJycn6aIqoKpUFZOjVmcrILmpHhOkeLWSaIdEuIqXmFxaeSCoXRdZZE0gFuvgiDzhwazT0EcMw== X-Received: by 2002:a63:1a44:: with SMTP id a4mr6131924pgm.41.1613016478281; Wed, 10 Feb 2021 20:07:58 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id j4sm3513765pfa.131.2021.02.10.20.07.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 20:07:57 -0800 (PST) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [PATCH] Allow tags containing capital letters in org-agenda-filter X-Woof-Patch: yes Date: Thu, 11 Feb 2021 12:12:02 +0800 Message-ID: <87k0rftf8t.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42f.google.com 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=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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=QAfwGrVv; 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: 8BE649402BD X-Spam-Score: -2.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5+InUVTABo04 --=-=-= Content-Type: text/plain Hi, I recently noticed that org-agenda-filter does not match tags with capital letters because all the stored tags in agenda are downcased. The attached patch is fixing the issue. Though, ideally, it would be better if agenda filter were case-sensitive for tags. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Allow-tags-containing-capital-letters-in-org-agenda-.patch >From 9d7a966497458bdb0ab5e5171d2bab1fa8612bc5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 11 Feb 2021 12:03:15 +0800 Subject: [PATCH] Allow tags containing capital letters in org-agenda-filter * lisp/org-agenda.el (org-agenda-filter): Downcase tags in the search string provided by user. This is needed because all the tags stored in 'tags text property are downcased. Example when old code did not work is a tag like COMMON. The user would not expect a need to input +|-common in the agenda filter instead of +|-COMMON. The latter would only result in "COMMON filter ignored because tag/category is not represented". --- lisp/org-agenda.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 90920ef41..0845d0ca6 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7767,8 +7767,8 @@ the variable `org-agenda-auto-exclude-function'." (setq s (replace-regexp-in-string ; Remove the temporary special string. "~~~" "-" (match-string 3 f-string))) (cond - ((member s tag-list) - (add-to-list 'ft (concat pm s) 'append 'equal)) + ((member (downcase s) tag-list) + (add-to-list 'ft (concat pm (downcase s)) 'append 'equal)) ((member s category-list) (add-to-list 'fc (concat pm ; Remove temporary double quotes. (replace-regexp-in-string "\"\\(.*\\)\"" "\\1" s)) -- 2.26.2 --=-=-=--