From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AG0xG8iI22McAgEAbAwnHQ (envelope-from ) for ; Thu, 02 Feb 2023 10:56:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SONFG8iI22OVhAEA9RJhRA (envelope-from ) for ; Thu, 02 Feb 2023 10:56:24 +0100 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 3215647D4F for ; Thu, 2 Feb 2023 10:56:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNWJW-0002hz-Ij; Thu, 02 Feb 2023 04:55:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNWJO-0002f0-Td for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 04:55:25 -0500 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNWJI-0002AF-75 for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 04:55:21 -0500 Received: by mail-oi1-x229.google.com with SMTP id p185so984505oif.2 for ; Thu, 02 Feb 2023 01:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=UQ8gTvpB29WbnH47yyWJzmd6f1BXWU5JkM2F+6UxP3U=; b=QEUGV6xB/V8Zq5HmYy9itQ3V2QFoCunqFbqp7zCk/2dc4inIp35UhVoGs+tmuqCUbE uFZScBsG533FJRLAgSW7LvdUmFQj1B71poea8Qi0jfMFqni5yCTOcSbYi+3GIF10sYZi QOH2PeGQQhN3qb0txLTAd4epYr3N2GdOOM4gBFLg5U253BLE4Ynp/X1a+m4NPbCOA4r8 fvlYePZjKY06y1CnsbAyYfIhut1e5lxZoY4iQI907X4anGvFK+qUAF9zQEF5UM+0eSlP mIE2Q7TE/od+WfMyygyyvWUxGhLOOlxPugLlSUgVxTGo9DCg8gdNisoePjyBXVZMqC/X S/sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UQ8gTvpB29WbnH47yyWJzmd6f1BXWU5JkM2F+6UxP3U=; b=YJ2xJyRNMtKCGRa3guFnigws29nzYNApza+1RoLacctMh7B9FkyCP+gsumPgRd8dbI QWjkg9m++Q1H2hnFvl4iq44BOJGYakRbe7fLQ29qMdMfLGU0HHIbBAs2H1oXlpeD0GNC h8y3JdEzyGqklLHBS7bdJSCm0CNQN97OhfX8xMFgTonBHXuUXuAmDRw5MQv6fHLgxhV4 LE6FUbI0PKEo8kCM6H0eDWjgZYaqpzODHrfG6kInqWEnL576nSXNgPbnzCwDVqHXlBfz ndLOWRG/TGDSL9IzLRN+ibDwqoMQFMmA9jiZhSk9XpI/js0gWywgsSIx7E0cx6gHGI+y J6ag== X-Gm-Message-State: AO0yUKXOmqzl9iqK7BWzdi0PY2BUwWN3VmJ2aZXeqttEK8XhIi5AHhY1 Juhb2/MgbftbNFxBMMnXCarj9XVURliKS9x95Fzj7Vb7hiE3zuUq X-Google-Smtp-Source: AK7set83Gi61XFRqH+Q/lMWfMXin1NsEeD+y5CSOleNvfnG5C4Ih2UpWRIylLwr0ytkL5TXPJFYY0bkrc7LhL3zu+Tc= X-Received: by 2002:a05:6808:3a2:b0:378:f2c:3090 with SMTP id n2-20020a05680803a200b003780f2c3090mr106583oie.134.1675331714478; Thu, 02 Feb 2023 01:55:14 -0800 (PST) MIME-Version: 1.0 From: Liu Hui Date: Thu, 2 Feb 2023 17:55:02 +0800 Message-ID: Subject: [PATCH] org-agenda-filter-by-category: fix 'no category' error To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000b941aa05f3b48fd6" Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=liuhui1610@gmail.com; helo=mail-oi1-x229.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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675331784; a=rsa-sha256; cv=none; b=iNenklYqCTbYVvoxoWjibSWrasQfEH8HBp2blNTZJFJz8GKqaD+2yu0PzJJmgULeqzVr15 wQk+01FZADPyYZFi+PVRBBuA976NhETp7d9O9xI3R33JOOcoflnKZwNKvmtTCV90ewNMUv rQQWy8FShqTqG6Mc86FEvGZKLQa0sc1B7lSSc+xEmkzIRZ9EO6exzkhvbkSuz0YCGIjS06 62NWbM/7hiKrr42dLL/gKKaeOKshX0b5ZN4wc/795Byn50FB4S6kAW11cvhwKdsL9EkMmy QDsDmM/p0FjOENdKIsWWAeoiN/31UgSwd7/QQGlGI0InRV4pCG1bxsggGR+dXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QEUGV6xB; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675331784; 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:dkim-signature; bh=UQ8gTvpB29WbnH47yyWJzmd6f1BXWU5JkM2F+6UxP3U=; b=LQ7MUh12C6JjZx+h/XTveIDeviZd0SAlTf0TfIVuDmGV58YnRlbaMWY9D+9rXbtbUePYv5 qHD9JHKeI+bt9JcHYzjd+TlUWEokMgfqZj5gxf45gBdZBRygK/qCYRmkQZR6RaRWwhxmJq gyWJq/rudMbxfEJf2HiicUJ+zodUoxp6WE9x0XjwyCpa89HkCsGX27xcy8Anp9vwWUuHtK ppwljsP/PFCEMAMm6f3RVb+TGs56MTZlmu9IcjPMV++uoeibKwu6Z7EwDsjwFKSY0Vo4dF B6bD+2lpZEuzVQkju7YA7RE5CWNtBBf8QZI/ox4CtwiUHu/93PnGWwEAZf2TkA== X-Migadu-Spam-Score: -5.17 X-Spam-Score: -5.17 X-Migadu-Queue-Id: 3215647D4F X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QEUGV6xB; dmarc=pass (policy=none) header.from=gmail.com; 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-TUID: v/BoV83ZFmAT --000000000000b941aa05f3b48fd6 Content-Type: text/plain; charset="UTF-8" Hello, To reproduce the bug: 1. emacs -Q --eval "(require 'org-habit)" 2. Open the following org file: ---------------begin---------------------- * TODO foo SCHEDULED: <2023-02-01 Wed .+2d/4d> :PROPERTIES: :STYLE: habit :CATEGORY: foo :END: * TODO bar SCHEDULED: <2023-02-01 Wed> ------------- end ---------------------- 3. M-x org-agenda, then press < a to create an agenda buffer 4. Go to the line containing foo, press < Expected result: the agenda buffer shows only foo Actual result: org-agenda-filter-by-category: No category at point --000000000000b941aa05f3b48fd6 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org-agenda-Fix-org-agenda-filter-by-category.patch" Content-Disposition: attachment; filename="0001-org-agenda-Fix-org-agenda-filter-by-category.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ldmx7hkq0 RnJvbSAyYWMwN2FlYjY0ZDBiMTI3MDhiNTRlYzhlZjI2MjY1YzY0YWY2MzBlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaXUgSHVpIDxsaXVodWkxNjEwQGdtYWlsLmNvbT4KRGF0ZTog V2VkLCAxIEZlYiAyMDIzIDEzOjM1OjQ5ICswODAwClN1YmplY3Q6IFtQQVRDSF0gb3JnLWFnZW5k YTogRml4IGBvcmctYWdlbmRhLWZpbHRlci1ieS1jYXRlZ29yeScKCiogbGlzcC9vcmctYWdlbmRh LmVsIChvcmctYWdlbmRhLWZpbHRlci1ieS1jYXRlZ29yeSk6IFVzZQpgb3JnLWFnZW5kYS1nZXQt Y2F0ZWdvcnknIHRvIGdldCB0aGUgY2F0ZWdvcnkgYXQgY3VycmVudCBsaW5lLgotLS0KIGxpc3Av b3JnLWFnZW5kYS5lb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