From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 4CwFGwyArmIQBgEAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 03:46:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6MjPGgyArmLAWAAAauVa8A (envelope-from ) for ; Sun, 19 Jun 2022 03:46:52 +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 2201A97B5 for ; Sun, 19 Jun 2022 03:46:52 +0200 (CEST) Received: from localhost ([::1]:54402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2k1b-0006mn-7s for larch@yhetil.org; Sat, 18 Jun 2022 21:46:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2k12-0006me-SI for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 21:46:16 -0400 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:40736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2k0z-0004Ib-WB for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 21:46:15 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id cu16so10987358qvb.7 for ; Sat, 18 Jun 2022 18:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=AuYvyPY/+eA3mef5an1WclyUceBGtuWgc0/pgdtic4Q=; b=MkMsen+XRkNMQDhZdlTS+vxXkECztAOoWyMK3FsxmSYFI1+kKkT27mc4nHX9i+ZMaT RZQFyy+PvGUPszj8NArfNsDpVj3BOlmLmH0xc2h2avdYOg14cA7Funvsxzohrcu3x74H S8HRLlCj/f998wQgbsFY90RBl7bECw+3n4R0VeN2phruYV1N+e1AKYxUFXQu7oslu4XP SdkRTqHKdLtO5/LU5wMSExclwM59fbn5+loxkpLnuZbdQtT9lhrUKlSmHrn0qx+A639t 2QMfJbVl2qmFYE2HMNc9aXn8JOu3bszQpf2yG3ZrOzF3hANuPLKcgpivFf8WdxG8K+lC hTwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=AuYvyPY/+eA3mef5an1WclyUceBGtuWgc0/pgdtic4Q=; b=aGsBCuFvbg452V5kitCqijUZpaIkhozRL3TLlM1cQMgH8qk1wSjrojEeMYvwPlsr7T 0EToKzLhvLlq21TEFXt03/iUBAq6iLnhHDb2FFgZ/q53s87LuQlTvFgHTYEkV/hbvsw4 u/NJbRgN40X64dv+8q8miezzzQnnR+43czrHQ9DAHFqHMQz/7w/ecZbXaPLEftsbG3ye pSEGHUJDMLVvXT3jsFSAqqf0YBT/poBdBHyG9c+EwZCnIoqgP5JRwBHNOwL9LIHnxc5w JoD17TxLJJHlH02fnQGb4mP9t5dBOCZuwA4Rl8B8BlaBpmzPBpBvQnV0FqfB4bzRGCfp G+Ag== X-Gm-Message-State: AJIora8RFWhr8aZy6wMsRiIAAZs2Rc4HdTn1BGCmzeszrFpujBVToDuL U3e6NtZF289jjllJajdCG6am6GvN3LsFQANV X-Google-Smtp-Source: AGRyM1s1AouGIFdID+Tvdgh39oxL6zkNcoofkqql7FbMZWqXfx4WYvH0R8aXTfI+Wp5Aa/mFzOJoaQ== X-Received: by 2002:a05:622a:58c:b0:305:79a:f53 with SMTP id c12-20020a05622a058c00b00305079a0f53mr14779703qtb.601.1655603173045; Sat, 18 Jun 2022 18:46:13 -0700 (PDT) Received: from localhost ([208.167.237.62]) by smtp.gmail.com with ESMTPSA id x14-20020ac87ece000000b00304f6f4199dsm7145710qtj.65.2022.06.18.18.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 18:46:12 -0700 (PDT) From: Ihor Radchenko To: Asilata Bapat Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-agenda-skip fails in batch mode because comment-start-skip is nil In-Reply-To: <87fsk5955a.fsf@gmail.com> References: <87fsk5955a.fsf@gmail.com> Date: Sun, 19 Jun 2022 09:47:22 +0800 Message-ID: <87edzl4e6t.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=yantar92@gmail.com; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, 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=1655603212; 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=AuYvyPY/+eA3mef5an1WclyUceBGtuWgc0/pgdtic4Q=; b=g5HFHGlUH/ZvZ0y13CBNy50f08/+YLe2OS57+d8MyN74se1SxHCVq2UhrDydmphgOPcuNl aIzbkeDJ+8NJBzKxFDG/S9Q0TJwLDFqwGgOc+MKSMSckVf/ZrQfe2d7OuMPv3yrXx981ec ZEuzs/ccnlvjGhep6UoGBdqunrRk2T5rmG1FR3TZzDIuWdc3UAhnW+QYcE7iZFPMUkXhtz /zPR9IPKFmwdx+tMf/VsrwX2Rlb9thANDZc5WDaF1G4WmHQa1taWK/YtsbJevL5WPVIQ92 oYAlnHFmO1xAVSzGTFVzM3XAgA/BrJS2AbIgsPTYfbLJ1F1v2mvLUIfETERY0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655603212; a=rsa-sha256; cv=none; b=sSRDgJG8uGN/KsodU848x6IjbOh1RELaqZ40foDqeULmQIftLP5GoTmJveGE2SoJp5GYwz 8QThZwhwA9wE4nV48hyAoYVCrL5s+M2SIde+iQgY53sxcDDCapUGBy6Bngs+v1j3GYSBxQ p2Sww4AdwJPacsEmjsEpMcNwXLVbyq7Ts4DnhvV7yicpcGXGS5AKAKDNoTTLN+TLUqWErG tpIT8I5Bc2fkGhYrCsX5dIiFHUgijOFJrSJ812WIzMTUXdBMQ1TEBnjnnDho4PUbWRNkXH DlkGIcjlY1l8Ii6AAyuAVqQH0ZdJVlex66H+Ri8gfSVMOPrkgYbdF7EIduzSHg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MkMsen+X; 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-Migadu-Spam-Score: -6.59 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MkMsen+X; 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-Migadu-Queue-Id: 2201A97B5 X-Spam-Score: -6.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: iOo6+OuixoDE Asilata Bapat writes: > When org-scan-tags runs in a batch mode invocation, the value of the variable comment-start-skip is nil even while scanning an org file. The function org-scan-tags calls (org-agenda-skip), which in turn calls (looking-at comment-start-skip). Since the value of comment-start-skip is nil, it triggers the error (wrong-type-argument stringp nil). > To fix this, the function org-agenda-skip should ensure that the variable comment-start-skip is set to the appropriate value. Could you please provide a detailed reproducer? > 2. The issue can indeed be fixed, e.g., by changing the source of org-agenda-skip to invoke (org-mode) immediately before the let statement. Doing this presumably sets the variable comment-start-skip to the expected value, and the invocation succeeds. org-agenda-skip should be operating after org-agenda-prepare-buffers, which, in turn, should call org-mode. org-mode calls org-setup-comments-handling which must set comment-start-skip to non-nil. Best, Ihor