From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sAGNJZFExGJEwQAAbAwnHQ (envelope-from ) for ; Tue, 05 Jul 2022 16:02:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0I1ZJZFExGINdAEAauVa8A (envelope-from ) for ; Tue, 05 Jul 2022 16:02:57 +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 42644242DC for ; Tue, 5 Jul 2022 16:02:57 +0200 (CEST) Received: from localhost ([::1]:51226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8j8i-0001ji-CI for larch@yhetil.org; Tue, 05 Jul 2022 10:02:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7z9V-0002bS-HP for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 08:56:42 -0400 Received: from knopi.disroot.org ([178.21.23.139]:56172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7z9Q-00034K-PU for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 08:56:41 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D82B845B14 for ; Sun, 3 Jul 2022 14:56:32 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NyM5vYupyhhW for ; Sun, 3 Jul 2022 14:56:31 +0200 (CEST) From: stasvlasov@disroot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1656852991; bh=8IeLP68UCFfE/DWHK9uOEp0aamXhdepzmbCseWW0o0c=; h=From:To:Subject:Date; b=U0gnZSpL6Bk0NM//ocM19/YmsIRXvwTwK/2kNEaNKxRLXU4uVUMSfRj3NNY3gz31i 1/nl2f258c0nufSGxL6CAPy7byOovCiL9Kdd4Tdw9ugR7olvJ+N34BaAdW16zF0Bw6 Y14eUnnaQcCxEyDbuRZbk4lRX0zqhZFeStEsRfjTgd3CG0k3kQUIS7UrSxdaW0WWgj FlKMuVTGjqJiVNMWvFh+2cfgRORwCWWSYqDACmkDpPakci3nyg0e/HAiCEEX2N0Tlb GsccJi8z0zoCIZq5bZyKdhj3UxnnRPgulPYQf0NnwrCUxup5YMaMrcFbAgSZFf/p7V i70A8qvqp1Z3w== To: emacs-orgmode@gnu.org Subject: [BUG] org-agenda passes current-prefix-arg to commands instead of arg [9.5.3 (9.5.3-g69c588 @ /Users/stas/.emacs.d/straight/build/org/)] Date: Sun, 03 Jul 2022 14:56:19 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.21.23.139; envelope-from=stasvlasov@disroot.org; helo=knopi.disroot.org 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_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-Mailman-Approved-At: Tue, 05 Jul 2022 09:58:25 -0400 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=1657029777; 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=GKEKXh2MEVNEtGipi31XVAFW0QwfkDV+zgSC5UsFlVs=; b=ao32bP0rNg18gSF5mv9tQOI545GdQhZlJWnxsABu/uLdsXxLXQYPCLslypeVB6WQzIdqEP OD/EBAp6+4Jo7pwVdu3fpWKGxmpzRYsGlM5xg/rtxk861Zr8IkSIhe+YAgkT5iGevnDLFT S6Y02TJO3Cj69kWyCqRwe8QqiMuAxfs3WNESds9quwxcorXTL9OIuthKaI40D2HC++vxSL glc5Qw4YOl1L6pV6ek35nesk0AhLrS1qR7azRYfhWtomrrnofsuHrpgdgRg3VgjJ/8EkpT ltyN3SEFfz0YBzvuge91B+dehpU6E6+ODdq3A+TRGH71zWqZPVmKUBnl9kiMjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657029777; a=rsa-sha256; cv=none; b=ULxgvTQlp9iCvZLfuKKun6h0ZVAi3Z4CfWW5mJ9QeYVPEDWwFQxEeJOxCITBGKfUFG/00k Ajx+RqcdK5aAjouz6/IQwd+Leoi+yvk3CnVbTbGUfXRBR/b1ZPi/of1aeS6cmBT51dj5Kd UvJYRmFNr2ieq2GLeXDb8ssTYD3O0roBKcd39eysAjgf0+8bqZ6r3kMCANf/+pIEczRY0P ANUWvFotAk5QBIL3ZfQcRFfuTBIOp2i6/2CcumkWszJC9yhl8orYSt3/keue25QfM6ATc4 UwV4Id1ilgwcuAqHBYfvbz/eErMLOQsaw3xyZ0VNKP3EG4vShbvYiWilWx0rWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=U0gnZSpL; dmarc=pass (policy=quarantine) header.from=disroot.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: -5.95 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=U0gnZSpL; dmarc=pass (policy=quarantine) header.from=disroot.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: 42644242DC X-Spam-Score: -5.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: fAUqEKTvivc+ `org-agenda' function passes `current-prefix-arg' to its commands (e.g., `org-agenda-tags') instead of `arg' This might create unexpected behaviour if one uses `org-agenda' function inside another interactive function that accepts on universal prefix. For example if I define `my/agenda-done-todos' it wont show any DONE todos if I call it with prefix to restrict it to current buffer because `org-agenda-tags' will be limited only to active todos by `current-prefix-arg' and this will always produce empty set: (add-to-list 'org-agenda-custom-commands '("d" "DONE todos" tags "TODO=\"DONE\"")) (defun my/agenda-done-todos (arg) "Show agenda for keyword 'd' (DONE todos). With ARG prefix restrict to current buffer." (interactive "P") (if arg (org-agenda nil "d" 'buffer) (org-agenda nil "d"))) Emacs : GNU Emacs 28.1 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H1519)) of 2022-05-07 Package: Org mode version 9.5.3 (9.5.3-g69c588 @ /Users/stas/.emacs.d/straight/build/org/)