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 qNC0E82vxmJjkwAAbAwnHQ (envelope-from ) for ; Thu, 07 Jul 2022 12:05:01 +0200 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 8NCyE82vxmIBaAAA9RJhRA (envelope-from ) for ; Thu, 07 Jul 2022 12:05:01 +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 F0B2F36D14 for ; Thu, 7 Jul 2022 12:05:00 +0200 (CEST) Received: from localhost ([::1]:34442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9ONX-00078I-LA for larch@yhetil.org; Thu, 07 Jul 2022 06:04:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9ON2-00077w-He for emacs-orgmode@gnu.org; Thu, 07 Jul 2022 06:04:28 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:43000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9ON0-00065W-TM for emacs-orgmode@gnu.org; Thu, 07 Jul 2022 06:04:28 -0400 Received: by mail-pg1-x536.google.com with SMTP id o18so16394989pgu.9 for ; Thu, 07 Jul 2022 03:04:26 -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=omqSEAhKOIhuThIESURap/BmrnuF/oaMx+rxcsrZslo=; b=NwgrypNHIyqCjh+63+SOAvVJLfdnCzNmjAOjzdcaXMfYdENrr1T0ZbKMK7VltFPI4g ccZR598uUHj5KloNkLTSwj9ycm2WxMeM1s2aYKgBSJC6EPG9Q4a0+Rg08JCxTvS4xnYb xLRFbGC+BHa8K6DZKcafNDEgEuWRx6iI81SXkSbEkiTqT+tLVl8vmAEI+iCK4Rew+1h+ vgerpbAznacTr74Vk32DCQ8rxwfiV8a+jRnYaVgAFkO5PS7CJxWTiKYbqniBm9ziysSu tFjT1hsb2Se6l6vn1d/OQ/ClSQ0hLxjgEu3dR+ZGBJ+ZusY0bJgfMQNAwJleHTq5Q7h0 XmpA== 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=omqSEAhKOIhuThIESURap/BmrnuF/oaMx+rxcsrZslo=; b=Mpjh9gEwuNy26yqi/B2MVrXC5qBjvYCfDNrcIENwVpUzptZSFHT9sDDS7D4uaOX7pH Z1u66EIIc3rb4c68etBlyV5rw/aVXnTH45468lGb/oVFvbVhLaLo84PLUOkiakN5ceUk bJT06r+Hjc+yYNbf7WJDMzYvG+aqDsF0RzgEQuXi+CLbXllKZwZ+gJEBtz/v8Si9Tzeo aAnN3Jaog4lMFHkUDr1nBA329YSqoeHrd1Y1vy/sONmZ+BCxr1C6jrawvzzB4oQl06iy jQ50ZjM6XnHwlMb8ChCTyclybE+MyNSUTVgnulA6X33OAkKQUAKpgEu38bM4+S2G4NDj myMA== X-Gm-Message-State: AJIora/PsFaaYgFaMW0beS08y4mfNxwwdzaykINCSM/dJ5k6smDh1J1k SG2AbC3RE5m0KLc6tVTzsiI= X-Google-Smtp-Source: AGRyM1vlqL0mFaD/K8l+3ZupUv94dM2bo3GtMB/eAu0KACIUQYnmqWmGVU1OpeT5k+NwUOr7bcXkOQ== X-Received: by 2002:a63:1d20:0:b0:411:9f92:43c3 with SMTP id d32-20020a631d20000000b004119f9243c3mr34983888pgd.115.1657188265255; Thu, 07 Jul 2022 03:04:25 -0700 (PDT) Received: from localhost ([209.95.60.151]) by smtp.gmail.com with ESMTPSA id k6-20020a654346000000b0041296bca2a8sm2778641pgq.12.2022.07.07.03.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 03:04:24 -0700 (PDT) From: Ihor Radchenko To: stasvlasov@disroot.org Cc: emacs-orgmode@gnu.org Subject: Re: [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/)] In-Reply-To: References: Date: Thu, 07 Jul 2022 18:05:31 +0800 Message-ID: <874jztw844.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=yantar92@gmail.com; helo=mail-pg1-x536.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=1657188301; 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=omqSEAhKOIhuThIESURap/BmrnuF/oaMx+rxcsrZslo=; b=pJypQUPsHqzk/hXay8poa4x25LRDS0eeNuOUf6aOdr7l5LqBYj0bUvijldh6Dg8+yzTqZb mzONq3ywZ8ni9/qCwNniQKTKZ3Aohv/HlEong3/V64lCfQp8S3N3V+XfQvbLIMU7iShgXN fFloIX9Rzze4LSKnm6fv3xaT+eLY8pqujBpJYGPJDlon+v+Ry8lwrtc8WTi51w/RFaNcOA su8RStL3X3GCKitzi0+8RyAOu11KQRxN42Rwg+SC1wLHJqe5Lfl4cKH5qB12HAOE0IkTJq QGfbw0PjySJ7Haz910UikwU5TSavUaLb4KAeKAllDLxJKqEUi/EHtcQ3KaN8ew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657188301; a=rsa-sha256; cv=none; b=le4mOCAEElRvlaI8arnVnhIF6xsbBelcHSCQZAg8KLLF23kdJzk9Uk7OBtpy4c2cPXB6UY geaoLf/1X8x0bDgzU1Il44xzUT+H9pGcL0zMTn7bdWP41jC1WvAAeKe9LMaN0ayhnqfn3b iis48ZhwkO7tnFuF4+fEQqd6IDaG2Q5RTXfP1uDGMQUMSIuU+KxnhcFOnI0OIqLBhVycPL QMqAMXAnbblZxkKWJp4FpLarV7mG2y2vxUcbA9KGD6c7AuOatwJa54/XS9yzA2L+SjKOxP b6dG8SRrOAhRBaKVnuKnXIY/3iIahBq0v4PEklreDbittwGzT8WdD7DPHY/rPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NwgrypNH; 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: -3.45 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NwgrypNH; 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: F0B2F36D14 X-Spam-Score: -3.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2p7Mzjll9cLd stasvlasov@disroot.org writes: > `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: Thanks for reporting! Your examples makes sense and I do not see any reason why `current-prefix-arg' should be used instead of ARG. The present usage appears to be introduced in the initial agenda implementation back 14 years ago. Fixed on main via db12a497d. Best, Ihor